Skip to content

Commit

Permalink
move trainers group to end of playbook
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdjscott committed Apr 28, 2024
1 parent cbcae2f commit a6ff138
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions setup-training-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,20 +161,6 @@
roles:
- ldap_add_users

# should be a way to do this without rebooting
- name: Verify trainers group
become: yes
hosts: servers
tasks:
- name: Check trainer1 in trainers group
ansible.builtin.shell: groups trainer1 | grep trainers
register: trainers_group_test
failed_when: trainers_group_test.rc != 0 and trainers_group_test.rc != 1

- name: Reboot if trainer1 not in trainers group
ansible.builtin.reboot:
when: trainers_group_test.rc == 1

- name: Setup keycloak
become: yes
hosts: servicesnode
Expand Down Expand Up @@ -269,3 +255,17 @@
- ondemand-config.yml
roles:
- container-apps/webnode

# should be a way to do this without rebooting
- name: Verify trainers group
become: yes
hosts: servers
tasks:
- name: Check trainer1 in trainers group
ansible.builtin.shell: groups trainer1 | grep trainers
register: trainers_group_test
failed_when: trainers_group_test.rc != 0 and trainers_group_test.rc != 1

- name: Reboot if trainer1 not in trainers group
ansible.builtin.reboot:
when: trainers_group_test.rc == 1

0 comments on commit a6ff138

Please sign in to comment.