You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/roles/cloudinit/tasks/main.yml

28 lines
641 B
YAML

---
- name: Remove cloudinit sudoers file
file:
path: "/etc/sudoers.d/90-cloud-init-users"
state: absent
- name: Remove cloudinit netplan
file:
path: "/etc/netplan/50-cloud-init.yaml"
state: absent
when: ansible_facts["lsb"]["id"] == "Ubuntu"
- name: Remove cloudinit network configuration
file:
path: "/etc/network/interfaces.d/50-cloud-init"
state: absent
when: ansible_facts["lsb"]["id"] == "Debian"
- name: Disable cloudinit
file:
path: "/etc/cloud/cloud-init.disabled"
owner: root
group: root
mode: "0644"
state: touch
modification_time: preserve
access_time: preserve