File tree Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Original file line number Diff line number Diff line change 6262 loop_var : conf_item
6363 when : stage2_nix
6464
65- - name : Symlink pgBackRest binary
66- file :
67- path : /usr/bin/pgbackrest
68- src : /var/lib/pgbackrest/.nix-profile/bin/pgbackrest
69- state : link
65+ - name : Configure sudoers for pgBackRest
66+ ansible.builtin.lineinfile :
67+ create : yes
68+ line : ' postgres ALL=(pgbackrest) NOPASSWD: /var/lib/pgbackrest/.nix-profile/bin/pgbackrest'
69+ mode : ' 0440'
70+ path : ' /etc/sudoers.d/pgbackrest'
71+ validate : ' visudo -cf %s'
7072
71- - name : Sticky bit the pgBackRest binary
72- file :
73- path : /var/lib/pgbackrest/.nix-profile/bin/pgbackrest
74- mode : ' 4755'
75- become : true
73+ - name : Create pgBackRest wrapper script
74+ ansible.builtin.copy :
75+ content : |
76+ #!/bin/bash
77+ exec sudo -u pgbackrest /var/lib/pgbackrest/.nix-profile/bin/pgbackrest "$@"
78+ dest : ' /usr/bin/pgbackrest'
79+ group : ' root'
80+ mode : ' 0755'
81+ owner : ' root'
You can’t perform that action at this time.
0 commit comments