From b4e956593b393884598e7d8b177463e08224c970 Mon Sep 17 00:00:00 2001 From: Matthew Fennell Date: Sun, 10 Aug 2025 21:20:24 +0100 Subject: Disable cloud-init I want ansible to take full control of managing /etc/hosts, hostname etc. I think it is most convenient to disable cloud-init entirely, to prevent contention between ansible and cloud-init. --- playbook.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'playbook.yaml') diff --git a/playbook.yaml b/playbook.yaml index 511b30a..06f75e0 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -51,6 +51,16 @@ group: admin mode: preserve + - name: Ensure cloud-init is disabled + ansible.builtin.copy: + content: "" + dest: /etc/cloud/cloud-init.disabled + force: false + owner: root + group: root + mode: "0644" + become: true + - name: Retrieve DANE hash ansible.builtin.shell: cmd: > -- cgit v1.2.3