Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.

Commit 19c0882

Browse files
authored
Merge pull request #2566 from codeenigma/user_data_ec2-PR-devel-2.x
User data ec2 pr devel 2.x
2 parents 828e01f + ff91477 commit 19c0882

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

roles/aws/aws_ec2_with_eip/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
instance_type: "{{ aws_ec2_with_eip.instance_type }}"
114114
instance_role: "{{ _aws_ec2_with_eip_iam_role_info.iam_roles[0].instance_profiles[0].arn }}"
115115
region: "{{ aws_ec2_with_eip.region }}"
116-
user_data: "{{ lookup('ansible.builtin.template', 'cloud-config-debian.j2') }}"
116+
user_data: "{{ lookup('ansible.builtin.template', 'user-data-debian.sh.j2') }}"
117117
image_id: "{{ _aws_ec2_with_eip_ami_images.images[-1].image_id }}" # [-1] is the last item, which is alway latest released
118118
state: "{{ aws_ec2_with_eip.state }}"
119119
wait: true

roles/aws/aws_ec2_with_eip/templates/user-data-debian.sh.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ CONTROLLER_PUBKEY="{{ aws_ec2_with_eip.pubkey }}"
1919
/usr/bin/echo "$CONTROLLER_PUBKEY" >> /home/"$CONTROLLER_USER"/.ssh/authorized_keys
2020

2121
# Install Ansible
22-
/usr/bin/apt-get -y update && /usr/bin/apt-get install -y -o Dpkg::Options::="--force-confnew" python3-venv python3-debian
22+
/usr/bin/apt-get install -y -o Dpkg::Options::="--force-confnew" python3-venv python3-debian
2323
/usr/bin/chown -R "$CONTROLLER_USER":"$CONTROLLER_USER" /home/"$CONTROLLER_USER"
2424
/usr/bin/su - "$CONTROLLER_USER" -c "/usr/bin/python3 -m venv /home/$CONTROLLER_USER/ce-python"
2525
/usr/bin/su - "$CONTROLLER_USER" -c "/home/$CONTROLLER_USER/ce-python/bin/python3 -m pip install --upgrade pip"

0 commit comments

Comments
 (0)