Allow sudo commands to postgres to run without a tty

This commit is contained in:
Aurélien Bompard 2015-03-13 14:22:16 +00:00
parent 1e7869952d
commit 9594724b74
2 changed files with 5 additions and 0 deletions

View file

@ -0,0 +1 @@
Defaults>postgres !requiretty

View file

@ -73,6 +73,10 @@
- name: start postgresql - name: start postgresql
service: state=started name=postgresql service: state=started name=postgresql
- name: allow running sudo commands as postgresql for ansible
copy: src="{{ files }}/lists-dev/sudoers-norequiretty-postgres" dest=/etc/sudoers.d/norequiretty-postgres
owner=root group=root mode=0440
handlers: handlers:
- include: "{{ handlers }}/restart_services.yml" - include: "{{ handlers }}/restart_services.yml"
- name: restart postgresql - name: restart postgresql