Skip to content

Commit

Permalink
fix: explicit group add for each group after user created
Browse files Browse the repository at this point in the history
  • Loading branch information
samrose committed May 15, 2024
1 parent 5df9ec8 commit 80af04e
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion ansible-nix/tasks/setup-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,24 @@
# password: ''

- name: create postgres user
shell: useradd -m -r -s /bin/bash -d /home/postgres postgres -g postgres -g ssl-cert
shell: useradd -m -r -s /bin/bash -d /home/postgres postgres
args:
executable: /bin/bash
become: yes

- name: add postgres user to postgres group
shell: usermod -aG postgres postgres
args:
executable: /bin/bash
become: yes

- name: add postgres user to ssl-cert group
shell: usermod -aG ssl-cert postgres
args:
executable: /bin/bash
become: yes


- name: Create relevant directories
file:
path: '{{ item }}'
Expand Down

0 comments on commit 80af04e

Please sign in to comment.