Skip to content
This repository was archived by the owner on Oct 7, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions roles/aws/aws_ec2_with_eip/templates/user-data-debian.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,9 @@ CONTROLLER_PUBKEY="{{ aws_ec2_with_eip.pubkey }}"
/usr/bin/echo "$CONTROLLER_USER ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/"$CONTROLLER_USER"
/usr/bin/chmod 0440 /etc/sudoers.d/"$CONTROLLER_USER"
/usr/bin/echo "$CONTROLLER_PUBKEY" >> /home/"$CONTROLLER_USER"/.ssh/authorized_keys

# Install Ansible
/usr/bin/apt-get install -y -o Dpkg::Options::="--force-confnew" python3-venv python3-debian
/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"
/usr/bin/su - "$CONTROLLER_USER" -c "/home/$CONTROLLER_USER/ce-python/bin/pip install ansible netaddr python-debian"
Loading