Skip to content

Commit

Permalink
Merge pull request #82 from insspb/sudo_fix
Browse files Browse the repository at this point in the history
Sudo fix
  • Loading branch information
otakup0pe authored Nov 3, 2016
2 parents 8a8f868 + a50f33b commit 96d0e69
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
language: python
python: "2.7"
env:
- INSTALL_METHOD=source ANSIBLE_VERSION=1.5.0
- INSTALL_METHOD=source ANSIBLE_VERSION=1.9.0.1
- INSTALL_METHOD=source ANSIBLE_VERSION=2.0.0.2
- INSTALL_METHOD=package ANSIBLE_VERSION=1.5.0
- INSTALL_METHOD=package ANSIBLE_VERSION=1.9.0.1
- INSTALL_METHOD=package ANSIBLE_VERSION=2.0.0.2

before_install:
Expand Down
4 changes: 2 additions & 2 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

- name: restart nginx
service: name=nginx state=restarted
sudo: yes
become: yes
when: not nginx_first_start.changed

- name: reload nginx
service: name=nginx state=reloaded
sudo: yes
become: yes
2 changes: 1 addition & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ galaxy_info:
author: pjan vandaele
company: ANXS
description: Install and configure Nginx
min_ansible_version: 1.4
min_ansible_version: 1.9
license: MIT
platforms:
- name: Ubuntu
Expand Down
4 changes: 2 additions & 2 deletions tasks/user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@

- name: Nginx | Check the current password expiry
command: grep {{nginx_user}} /etc/shadow
sudo: yes
become: yes
register: nginx_old_password
changed_when: false

- name: Nginx | Set the right expiration on the nginx user
shell: "chage -I -1 -E -1 -m -1 -M -1 -W -1 -E -1 {{nginx_user}} && grep {{nginx_user}} /etc/shadow"
sudo: yes
become: yes
register: nginx_new_password
changed_when: nginx_new_password.stdout != nginx_old_password.stdout

0 comments on commit 96d0e69

Please sign in to comment.