Re: [ansible-project] create a systemd service without write access to /etc/systemd/system

2022-09-02 Thread dulhaver via Ansible Project
it has turned out that our entire approach creating the postgres service needs to be different and that the different approach provides an editable .env file. So this was kind of a false alarm, sorry > On 09/02/2022 7:17 AM CEST dulhaver via Ansible Project > wrote: > > > > I am wonderi

Re: [ansible-project] create a systemd service without write access to /etc/systemd/system

2022-09-01 Thread dulhaver via Ansible Project
I am wondering whether granted limited write access to the postgres user (who is the one executing that TASK) to only write files like postgresql.*.service inside /etc/systemd/system could be a solution. I guess using the template module would be the way to do this. postgres@server> sudo -l

Re: [ansible-project] create a systemd service without write access to /etc/systemd/system

2022-09-01 Thread dulhaver via Ansible Project
; > Stan > > > > > > > > > > > > From: 'Rowe, Walter P. (Fed)' via Ansible Project > > > > Sent: Thursday, September 1, 2022 8:08 AM > > To: ansible...@googlegroups.com > > Subject: [EXTERNAL] Re: [ansible-project] create a

Re: [ansible-project] create a systemd service without write access to /etc/systemd/system

2022-09-01 Thread Kevin Shumaker
lter P. (Fed)' via Ansible Project < > ansible...@googlegroups.com> > *Sent:* Thursday, September 1, 2022 8:08 AM > *To:* ansible...@googlegroups.com > *Subject:* [EXTERNAL] Re: [ansible-project] create a systemd service > without write access to /etc/systemd/system >

RE: [ansible-project] create a systemd service without write access to /etc/systemd/system

2022-09-01 Thread 'Hearn, Stan J.' via Ansible Project
From: 'Rowe, Walter P. (Fed)' via Ansible Project Sent: Thursday, September 1, 2022 8:08 AM To: ansible-project@googlegroups.com Subject: [EXTERNAL] Re: [ansible-project] create a systemd service without write access to /etc/systemd/system Nope. Ansible uses sudo to elevate

Re: [ansible-project] create a systemd service without write access to /etc/systemd/system

2022-09-01 Thread 'Rowe, Walter P. (Fed)' via Ansible Project
Nope. Ansible uses sudo to elevate privileges on Linux. If you don't have a service account that can sudo, you can't do this with ansible. Your service account is the "remote_user" that ansible uses to SSH into the machine. The sudoers file must grant this account sudo rights. It does not have

Re: [ansible-project] create a systemd service without write access to /etc/systemd/system

2022-09-01 Thread Andy Smith
Hi, On Thu, Sep 01, 2022 at 07:15:42AM +0200, dulhaver via Ansible Project wrote: > the challenge I am facing is that the only way to do this manually > is via > >sudo systemctl edit --full postgresql@[db_service_name].service If you can use sudo then can you not just do the equivalent of s