Pārlūkot izejas kodu

Merge pull request #508 from ariddell/feature/ansible-lint

Update ansible in jessie
Mike Ashley 9 gadus atpakaļ
vecāks
revīzija
a38dd89adf
5 mainītis faili ar 7 papildinājumiem un 6 dzēšanām
  1. 2
    1
      .travis.yml
  2. 1
    2
      requirements.txt
  3. 2
    2
      roles/common/tasks/google_auth.yml
  4. 1
    1
      site.yml
  5. 1
    0
      test-requirements.txt

+ 2
- 1
.travis.yml Parādīt failu

1
 language: python
1
 language: python
2
 python: "2.7"
2
 python: "2.7"
3
 install:
3
 install:
4
-  - pip install ansible ansible-lint
4
+  - pip install -r requirements.txt
5
+  - pip install -r test-requirements.txt
5
 script:
6
 script:
6
   - ansible-playbook --syntax-check -i hosts site.yml
7
   - ansible-playbook --syntax-check -i hosts site.yml
7
   - ansible-lint site.yml
8
   - ansible-lint site.yml

+ 1
- 2
requirements.txt Parādīt failu

1
-ansible==1.9.3
2
-nose
1
+ansible>=1.9.3,<2

+ 2
- 2
roles/common/tasks/google_auth.yml Parādīt failu

26
 - name: Generate a timed-based, no reuse, rate-limited (3 logins per 30 seconds) with one concurrently valid code for default user
26
 - name: Generate a timed-based, no reuse, rate-limited (3 logins per 30 seconds) with one concurrently valid code for default user
27
   command: /usr/bin/google-authenticator -t -f -d --label="{{ main_user_name }}@{{ domain }}" --qr-mode=ANSI -r 3 -R 30 -w 1 --secret=/home/{{ main_user_name }}/.google_authenticator
27
   command: /usr/bin/google-authenticator -t -f -d --label="{{ main_user_name }}@{{ domain }}" --qr-mode=ANSI -r 3 -R 30 -w 1 --secret=/home/{{ main_user_name }}/.google_authenticator
28
            creates=/home/{{ main_user_name }}/.google_authenticator
28
            creates=/home/{{ main_user_name }}/.google_authenticator
29
-  sudo: yes
30
-  sudo_user: "{{ main_user_name }}"
29
+  become: yes
30
+  become_user: "{{ main_user_name }}"
31
   when: ansible_ssh_user != "vagrant"
31
   when: ansible_ssh_user != "vagrant"
32
 
32
 
33
 - name: Retrieve generated keys from server
33
 - name: Retrieve generated keys from server

+ 1
- 1
site.yml Parādīt failu

3
 
3
 
4
 - hosts: all
4
 - hosts: all
5
   user: deploy
5
   user: deploy
6
-  sudo: True
6
+  become: True
7
   gather_facts: True
7
   gather_facts: True
8
   vars_files:
8
   vars_files:
9
     - vars/defaults.yml
9
     - vars/defaults.yml

+ 1
- 0
test-requirements.txt Parādīt failu

1
+ansible-lint>=2.3.9,<3

Notiek ielāde…
Atcelt
Saglabāt