diff --git a/ansible/playbooks/bootstrap-cloud.yml b/ansible/playbooks/bootstrap-cloud.yml index d2968a5..6e90005 100644 --- a/ansible/playbooks/bootstrap-cloud.yml +++ b/ansible/playbooks/bootstrap-cloud.yml @@ -23,6 +23,9 @@ import_tasks: tasks/common_vars.yml tasks: + - name: configure clouds.yml + import_tasks: tasks/configure_openstacksdk.yml + - name: setup flavors openstack.cloud.compute_flavor: cloud: linuxadminbooks diff --git a/ansible/playbooks/tasks/configure_openstacksdk.yml b/ansible/playbooks/tasks/configure_openstacksdk.yml new file mode 100644 index 0000000..359b2ad --- /dev/null +++ b/ansible/playbooks/tasks/configure_openstacksdk.yml @@ -0,0 +1,6 @@ +--- +- name: Upload clouds.py + ansible.builtin.copy: + src: "../scripts/clouds.py" + dest: /root/clouds.py + mode: '0750' diff --git a/ansible/scripts/clouds.py b/ansible/scripts/clouds.py index c29576a..7e02aea 100644 --- a/ansible/scripts/clouds.py +++ b/ansible/scripts/clouds.py @@ -21,4 +21,4 @@ clouds = { } -print(yaml.dumps(clouds)) +print(yaml.safe_dump(clouds))