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