Skip to content

Commit

Permalink
ansibleをsudoersに追加
Browse files Browse the repository at this point in the history
  • Loading branch information
hico-horiuchi committed Aug 6, 2015
1 parent 4c9e50f commit 345c6a5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions provision/tasks/useradd.yml
Expand Up @@ -28,3 +28,12 @@
owner=ansible
group=ansible
mode=0600

- name: check ansible in sudoers
shell: cat /etc/sudoers | grep ansible
register: sudoers_check
ignore_errors: yes

- name: add ansible to sudoers
shell: echo "%ansible ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
when: sudoers_check|failed

0 comments on commit 345c6a5

Please sign in to comment.