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:
parent
14dd29eba4
commit
967102bc4f
1 changed files with 13 additions and 9 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue