From e315ebe60775d84791c5dfd3d525efa674a270fe Mon Sep 17 00:00:00 2001 From: Jeremy Frasier Date: Fri, 12 Jan 2024 15:07:24 -0500 Subject: [PATCH] Add a playbook to install prerequisites for fixing a broken Netplan configuration See these issues for more information: - cisagov/skeleton-packer#300 - canonical/cloud-init#4764 --- src/fix-netplan-configuration.yml | 18 ++++++++++++++++++ src/playbook.yml | 3 +++ 2 files changed, 21 insertions(+) create mode 100644 src/fix-netplan-configuration.yml diff --git a/src/fix-netplan-configuration.yml b/src/fix-netplan-configuration.yml new file mode 100644 index 00000000..14613352 --- /dev/null +++ b/src/fix-netplan-configuration.yml @@ -0,0 +1,18 @@ +--- +# Install the prerequisites for the user script that fixes the Netplan +# configuration generated by cloud-init from the instance metadata. +# +# See these issues for more details: +# - cisagov/skeleton-packer#300 +# - canonical/cloud-init#4764 +- hosts: all + name: >- + Install prerequisites for the script that fixes the Netplan + configuration generated by cloud-init from the instance metadata + become: true + become_method: ansible.builtin.sudo + tasks: + - name: Install python3-pyyaml + ansible.builtin.package: + name: + - python3-yaml diff --git a/src/playbook.yml b/src/playbook.yml index b1e5b7cd..5197ff06 100644 --- a/src/playbook.yml +++ b/src/playbook.yml @@ -2,6 +2,9 @@ - name: Import base image playbook ansible.builtin.import_playbook: base.yml +- name: Import playbook to fix Netplan configuration + ansible.builtin.import_playbook: fix-netplan-configuration.yml + - name: Import AWS playbook ansible.builtin.import_playbook: aws.yml