File tree Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Original file line number Diff line number Diff line change 1717 when :
1818 - nixpkg_mode
1919
20- - name : Allow pgBackRest to run commands
21- ansible.builtin.copy :
20+ - name : Allow postgres to run pgBackRest commands as pgbackrest
21+ ansible.builtin.lineinfile :
22+ create : yes
23+ line : ' postgres ALL=(pgbackrest) NOPASSWD: /usr/bin/pgbackrest'
2224 dest : /etc/sudoers.d/pgbackrest
23- owner : root
24- group : root
2525 mode : ' 0440'
26- content : |
27- pgbackrest ALL=(ALL) NOPASSWD: /usr/bin/pgbackrest
26+ path : ' /etc/sudoers.d/pgbackrest'
27+ validate : ' visudo -cf %s'
28+
29+ - name : Configure sudoers for pgBackRest
30+ ansible.builtin.lineinfile :
31+ create : yes
32+ line : ' postgres ALL=(pgbackrest) NOPASSWD: /var/lib/pgbackrest/.nix-profile/bin/pgbackrest'
33+ mode : ' 0440'
34+ path : ' /etc/sudoers.d/pgbackrest'
35+ validate : ' visudo -cf %s'
2836
2937- name : Install pgBackRest
3038 ansible.builtin.shell : |
7785 when :
7886 - stage2_nix
7987
80- - name : Configure sudoers for pgBackRest
81- ansible.builtin.lineinfile :
82- create : yes
83- line : ' postgres ALL=(pgbackrest) NOPASSWD: /var/lib/pgbackrest/.nix-profile/bin/pgbackrest'
84- mode : ' 0440'
85- path : ' /etc/sudoers.d/pgbackrest'
86- validate : ' visudo -cf %s'
87-
8888- name : Create pgBackRest wrapper script
8989 ansible.builtin.copy :
9090 content : |
You can’t perform that action at this time.
0 commit comments