From 9594724b7409577c0f83902c31be4c70cb4a611b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Bompard?= Date: Fri, 13 Mar 2015 14:22:16 +0000 Subject: [PATCH] Allow sudo commands to postgres to run without a tty --- files/lists-dev/sudoers-norequiretty-postgres | 1 + playbooks/hosts/lists-dev.cloud.fedoraproject.org.yml | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 files/lists-dev/sudoers-norequiretty-postgres diff --git a/files/lists-dev/sudoers-norequiretty-postgres b/files/lists-dev/sudoers-norequiretty-postgres new file mode 100644 index 0000000000..5f28d197c4 --- /dev/null +++ b/files/lists-dev/sudoers-norequiretty-postgres @@ -0,0 +1 @@ +Defaults>postgres !requiretty diff --git a/playbooks/hosts/lists-dev.cloud.fedoraproject.org.yml b/playbooks/hosts/lists-dev.cloud.fedoraproject.org.yml index 5af08d0c22..1606b9cb48 100644 --- a/playbooks/hosts/lists-dev.cloud.fedoraproject.org.yml +++ b/playbooks/hosts/lists-dev.cloud.fedoraproject.org.yml @@ -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