Skip to content

Commit

Permalink
Merge pull request #985 from mkllnk/python
Browse files Browse the repository at this point in the history
Re-introduce python installation
  • Loading branch information
dacook authored Jan 14, 2025
2 parents e1c5181 + 7706fd6 commit eef03b4
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions playbooks/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,23 @@
# Use: `ansible-playbook playbooks/setup.yml -e "ansible_user=ubuntu" --limit <server_tag>` if
# provisioning an EC2 instance for the first time (this only needs to be run once).

# Ensure python is set up and accessible on the server before starting.
- name: python check
hosts: ofn_servers
gather_facts: no
remote_user: root
tasks:
- name: Install python
become: yes
raw: |
test -e /usr/bin/python || (
apt-get update -qq &&\
apt-get install -q --yes python3 &&\
ln -s /usr/bin/python3 /usr/bin/python
)
register: python_install
changed_when: python_install.stdout == ""

# Add the default user and ssh keys as root
- name: set up default_user
hosts: ofn_servers
Expand Down

0 comments on commit eef03b4

Please sign in to comment.