Skip to content

Commit

Permalink
onr(get): add task to ensure user and group exist
Browse files Browse the repository at this point in the history
Otherwise this role fails - as it's setting permissions for users and
groups which may not exist yet.
  • Loading branch information
keirwilliams committed Apr 16, 2024
1 parent a77c659 commit 3f49db9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ansible/roles/onr-get/tasks/ensure-user-group.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
- name: Ensure {{ boe_install_group }} group exists
ansible.builtin.group:
name: {{ boe_install_group }}

- name: Ensure {{ boe_install_user }} user exists
ansible.builtin.user:
name: {{ boe_install_user }}
group: {{ boe_install_group }}
5 changes: 5 additions & 0 deletions ansible/roles/onr-get/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---
- import_tasks: ensure-user-group.yml
tags:
- amibuild
- ec2provision

- import_tasks: download-software.yml
tags:
- amibuild
Expand Down

0 comments on commit 3f49db9

Please sign in to comment.