From 70e2058f9eaca49788fa02e0fbb4ad5788550824 Mon Sep 17 00:00:00 2001 From: Greg Harvey Date: Wed, 11 Jun 2025 15:46:19 +0200 Subject: [PATCH] Going back to shell script and disabling ipv6. --- roles/aws/aws_ec2_with_eip/tasks/main.yml | 2 +- roles/aws/aws_ec2_with_eip/templates/user-data-debian.sh.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/aws/aws_ec2_with_eip/tasks/main.yml b/roles/aws/aws_ec2_with_eip/tasks/main.yml index 8ea7ff187..37ef61a20 100644 --- a/roles/aws/aws_ec2_with_eip/tasks/main.yml +++ b/roles/aws/aws_ec2_with_eip/tasks/main.yml @@ -113,7 +113,7 @@ instance_type: "{{ aws_ec2_with_eip.instance_type }}" instance_role: "{{ _aws_ec2_with_eip_iam_role_info.iam_roles[0].instance_profiles[0].arn }}" region: "{{ aws_ec2_with_eip.region }}" - user_data: "{{ lookup('ansible.builtin.template', 'cloud-config-debian.j2') }}" + user_data: "{{ lookup('ansible.builtin.template', 'user-data-debian.sh.j2') }}" image_id: "{{ _aws_ec2_with_eip_ami_images.images[-1].image_id }}" # [-1] is the last item, which is alway latest released state: "{{ aws_ec2_with_eip.state }}" wait: true diff --git a/roles/aws/aws_ec2_with_eip/templates/user-data-debian.sh.j2 b/roles/aws/aws_ec2_with_eip/templates/user-data-debian.sh.j2 index 7b62178e4..4b90a41cc 100644 --- a/roles/aws/aws_ec2_with_eip/templates/user-data-debian.sh.j2 +++ b/roles/aws/aws_ec2_with_eip/templates/user-data-debian.sh.j2 @@ -19,7 +19,7 @@ CONTROLLER_PUBKEY="{{ aws_ec2_with_eip.pubkey }}" /usr/bin/echo "$CONTROLLER_PUBKEY" >> /home/"$CONTROLLER_USER"/.ssh/authorized_keys # Install Ansible -/usr/bin/apt-get -y update && /usr/bin/apt-get install -y -o Dpkg::Options::="--force-confnew" python3-venv python3-debian +/usr/bin/apt-get install -y -o Dpkg::Options::="--force-confnew" python3-venv python3-debian /usr/bin/chown -R "$CONTROLLER_USER":"$CONTROLLER_USER" /home/"$CONTROLLER_USER" /usr/bin/su - "$CONTROLLER_USER" -c "/usr/bin/python3 -m venv /home/$CONTROLLER_USER/ce-python" /usr/bin/su - "$CONTROLLER_USER" -c "/home/$CONTROLLER_USER/ce-python/bin/python3 -m pip install --upgrade pip"