Allow sudo commands to postgres to run without a tty
This commit is contained in:
parent
1e7869952d
commit
9594724b74
2 changed files with 5 additions and 0 deletions
1
files/lists-dev/sudoers-norequiretty-postgres
Normal file
1
files/lists-dev/sudoers-norequiretty-postgres
Normal file
|
@ -0,0 +1 @@
|
|||
Defaults>postgres !requiretty
|
|
@ -73,6 +73,10 @@
|
|||
- name: start 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:
|
||||
- include: "{{ handlers }}/restart_services.yml"
|
||||
- name: restart postgresql
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue