Files
kayobe/ansible/roles/dell-switch-bmp/handlers/main.yml
Will Szumski 988a822259 Add podman support
Adds support for Podman as an alternative container engine. This builds
on the support added in kolla-ansible in the 2023.2 cycle.

Change-Id: I2c6befbdda7e684228065103feea7250a0ea3826
2025-01-27 16:42:33 +00:00

32 lines
1.2 KiB
YAML

---
- name: Copy dnsmasq configuration
command: >
{{ container_engine }} exec bifrost_deploy
bash -c 'export OS_CLOUD=bifrost &&
ansible -vvvv target -i /bifrost/playbooks/inventory/target
-m copy
-a "src=/etc/bifrost/dell-switch-bmp.conf dest=/etc/dnsmasq.d/dell-switch-bmp.conf"
-e "ansible_python_interpreter=/var/lib/kolla/venv/bin/python"'
become: "{{ container_engine == 'podman' }}"
- name: Restart bifrost dnsmasq
command: >
{{ container_engine }} exec bifrost_deploy
bash -c 'export OS_CLOUD=bifrost &&
ansible -vvvv target -i /bifrost/playbooks/inventory/target
-m service
-a "name=dnsmasq state=restarted"
-e "ansible_python_interpreter=/var/lib/kolla/venv/bin/python"'
become: "{{ container_engine == 'podman' }}"
- name: Copy Dell switch BMP images
command: >
{{ container_engine }} exec bifrost_deploy
bash -c 'export OS_CLOUD=bifrost &&
ansible -vvvv target -i /bifrost/playbooks/inventory/target
-m copy
-a "src=/etc/bifrost/{{ item.dest }} dest={{ dell_switch_bmp_httpboot_path }}/{{ item.dest }}"
-e "ansible_python_interpreter=/var/lib/kolla/venv/bin/python"'
with_items: "{{ dell_switch_bmp_images }}"
become: "{{ container_engine == 'podman' }}"