diff --git a/cloud-init/defaults/main.yml b/cloud-init/defaults/main.yml new file mode 100644 index 00000000..ba9c0624 --- /dev/null +++ b/cloud-init/defaults/main.yml @@ -0,0 +1,3 @@ +--- +cloud_init_disable_netconfig: False +cloud_init_remove_pkg: True diff --git a/cloud-init/files/99-disable-network-config.cfg b/cloud-init/files/99-disable-network-config.cfg new file mode 100644 index 00000000..f144451d --- /dev/null +++ b/cloud-init/files/99-disable-network-config.cfg @@ -0,0 +1 @@ +network: {config: disabled} diff --git a/cloud-init/tasks/main.yml b/cloud-init/tasks/main.yml new file mode 100644 index 00000000..58a143ea --- /dev/null +++ b/cloud-init/tasks/main.yml @@ -0,0 +1,15 @@ +--- +- block: + - name: cloud-init should not mess with the network settings + copy: src=99-disable-network-config.cfg dest=/etc/cloud/cloud.cfg.d/99-disable-network-config.cfg owner=root group=root mode=0644 + + when: cloud_init_disable_netconfig + tags: [ 'ovirt_cloud_init_net', 'ovirt' ] + +- block: + - name: Remove the cloud-init package + apt: pkg=cloud-init state=absent + + when: cloud_init_remove_pkg + tags: [ 'ovirt_cloud_init', 'ovirt' ] + \ No newline at end of file