Browse Source

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

Update ansible in jessie
Mike Ashley 8 years ago
parent
commit
a38dd89adf
5 changed files with 7 additions and 6 deletions
  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 View File

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

+ 1
- 2
requirements.txt View File

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

+ 2
- 2
roles/common/tasks/google_auth.yml View File

@@ -26,8 +26,8 @@
26 26
 - name: Generate a timed-based, no reuse, rate-limited (3 logins per 30 seconds) with one concurrently valid code for default user
27 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 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 31
   when: ansible_ssh_user != "vagrant"
32 32
 
33 33
 - name: Retrieve generated keys from server

+ 1
- 1
site.yml View File

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

+ 1
- 0
test-requirements.txt View File

@@ -0,0 +1 @@
1
+ansible-lint>=2.3.9,<3

Loading…
Cancel
Save