Skip to content

Commit 2cfe394

Browse files
committed
chore: run user check on both stages
1 parent a22335b commit 2cfe394

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

ansible-nix/tasks/stage2/playbook.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,15 @@
5050
import_tasks: test-image.yml
5151
tags:
5252
- unit-tests
53+
54+
- name: Check if postgres user is part of users group
55+
shell: "id -nG postgres | grep -qw users"
56+
register: check_user_group
57+
ignore_errors: yes
58+
become: yes
59+
args:
60+
executable: /bin/bash
61+
62+
- name: Print result to Ansible log output
63+
debug:
64+
msg: "The postgres user is {{ 'not ' if check_user_group.rc != 0 else '' }}part of the users group"

common-nix.vars.pkr.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
postgres-version = "15.6.1.33-nix-staged"
1+
postgres-version = "15.6.1.34-nix-staged"

0 commit comments

Comments
 (0)