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 # 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 # need to double check the timestamps of the file on a rebooted machine
# disable cloud-init if that holds true # disable cloud-init if that holds true
- name: Disable and mask cloud-init #- name: Disable and mask cloud-init
systemd: # systemd:
name: "{{ item }}" # name: "{{ item }}"
enabled: no # enabled: no
masked: yes # masked: yes
state: stopped # state: stopped
with_items: # with_items:
- cloud-init-local # - cloud-init-local
- cloud-init # - 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" when: "{{ netplan }}" == "50-cloud-init.yaml"
- name: Remove stock netplan template - name: Remove stock netplan template