Skip to content

Commit

Permalink
Fix task ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
scrungus authored and Scott Davidson committed Feb 27, 2024
1 parent b5caec0 commit 9b7fb2b
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions ansible/roles/magnum/tasks/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,32 @@
when:
- kolla_copy_ca_into_containers | bool

- name: Check if management cluster kubeconfig is provided
stat:
path: "{{ node_custom_config }}/magnum/kubeconfig"
register: kubeconfig
delegate_to: localhost

- name: Optionally configure magnum for cluster-api driver
set_fact:
magnum_cluster_api_driver_enabled: true
when: kubeconfig.stat.exists

- name: Copying over kubeconfig for management cluster
vars:
service: "{{ magnum_services['magnum-conductor'] }}"
copy:
src: "{{ node_custom_config }}/magnum/kubeconfig"
dest: "{{ node_config_directory }}/magnum-conductor/kubeconfig"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
- magnum_cluster_api_driver_enabled is defined
notify:
- Restart magnum-conductor container

- name: Copying over config.json files for services
template:
src: "{{ item.key }}.json.j2"
Expand Down Expand Up @@ -67,32 +93,6 @@
with_dict: "{{ magnum_services }}"
notify:
- Restart {{ item.key }} container

- name: Check if management cluster kubeconfig is provided
stat:
path: "{{ node_custom_config }}/magnum/kubeconfig"
register: kubeconfig
delegate_to: localhost
run_once: true
- name: Optionally configure magnum for cluster-api driver
set_fact:
magnum_cluster_api_driver_enabled: true
when: kubeconfig.stat.exists

- name: Copying over kubeconfig for management cluster
vars:
service: "{{ magnum_services['magnum-conductor'] }}"
copy:
src: "{{ node_custom_config }}/magnum/kubeconfig"
dest: "{{ node_config_directory }}/magnum-conductor/kubeconfig"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
- magnum_cluster_api_driver_enabled is defined
notify:
- Restart magnum-conductor container

- name: Copying over existing policy file
template:
Expand Down

0 comments on commit 9b7fb2b

Please sign in to comment.