diff --git a/cloud-init/tasks/main.yml b/cloud-init/tasks/main.yml index 58a143ea..0a687113 100644 --- a/cloud-init/tasks/main.yml +++ b/cloud-init/tasks/main.yml @@ -7,9 +7,14 @@ tags: [ 'ovirt_cloud_init_net', 'ovirt' ] - block: - - name: Remove the cloud-init package + - name: Remove the cloud-init package ond Debian based systems apt: pkg=cloud-init state=absent + when: ansible_distribution_file_variety == 'Debian' + + - name: Remove the cloud-init package on CentOS + yum: pkg=cloud-init state=absent + when: ansible_distribution_file_variety == 'RedHat' when: cloud_init_remove_pkg tags: [ 'ovirt_cloud_init', 'ovirt' ] - \ No newline at end of file +