Skip to content

Commit

Permalink
Fix order of roles to fix dependency over notifications (#44)
Browse files Browse the repository at this point in the history
Notifications can be add to projects, job_templates and probably many
others. To prevent failure we have to set them first.
  • Loading branch information
laurent-indermuehle authored Jan 26, 2024
1 parent 4f91e6b commit 3ca613f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions playbooks/controller_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@
name: infra.controller_configuration.organizations
when: controller_organizations | length is not match('0')

- name: Include Notification role
ansible.builtin.include_role:
name: infra.controller_configuration.notification_templates
when: controller_notifications | length is not match('0')

- name: Include projects role
ansible.builtin.include_role:
name: infra.controller_configuration.projects
Expand Down Expand Up @@ -136,11 +141,6 @@
name: infra.controller_configuration.schedules
when: controller_schedules | length is not match('0')

- name: Include Notification role
ansible.builtin.include_role:
name: infra.controller_configuration.notification_templates
when: controller_notifications | length is not match('0')

- name: Include roles role
ansible.builtin.include_role:
name: infra.controller_configuration.roles
Expand Down
10 changes: 5 additions & 5 deletions playbooks/install_configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,11 @@
name: infra.controller_configuration.organizations
when: controller_organizations | length is not match('0')

- name: Include Notification role
ansible.builtin.include_role:
name: infra.controller_configuration.notification_templates
when: controller_notifications | length is not match('0')

- name: Include projects role
ansible.builtin.include_role:
name: infra.controller_configuration.projects
Expand Down Expand Up @@ -211,11 +216,6 @@
name: infra.controller_configuration.schedules
when: controller_schedules | length is not match('0')

- name: Include Notification role
ansible.builtin.include_role:
name: infra.controller_configuration.notification_templates
when: controller_notifications | length is not match('0')

- name: Include roles role
ansible.builtin.include_role:
name: infra.controller_configuration.roles
Expand Down

0 comments on commit 3ca613f

Please sign in to comment.