1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

easier way to disable cloud-init

This commit is contained in:
Jerry Vonau 2018-12-13 07:34:29 -06:00
parent 14dd29eba4
commit 967102bc4f

View file

@ -6,15 +6,19 @@
# Think 50-cloud-init.yaml is created on the fly by cloud-init on every boot
# need to double check the timestamps of the file on a rebooted machine
# disable cloud-init if that holds true
- name: Disable and mask cloud-init
systemd:
name: "{{ item }}"
enabled: no
masked: yes
state: stopped
with_items:
- cloud-init-local
- cloud-init
#- name: Disable and mask cloud-init
# systemd:
# name: "{{ item }}"
# enabled: no
# masked: yes
# state: stopped
# with_items:
# - cloud-init-local
# - cloud-init
# when: "{{ netplan }}" == "50-cloud-init.yaml"
- name: Disable cloud-init
shell: touch /etc/cloud/cloud-init.disabled
when: "{{ netplan }}" == "50-cloud-init.yaml"
- name: Remove stock netplan template