Skip to content

Commit

Permalink
Remove old python setup
Browse files Browse the repository at this point in the history
This was only executed for Ubuntu older than Ubuntu 20 but all new
servers do have Ubuntu 20. We also don't require old Python anymore.
  • Loading branch information
mkllnk committed Jan 7, 2025
1 parent 08982d7 commit a872e87
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions playbooks/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,6 @@
# 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 (ansible requires python2.7)
- name: python check
hosts: ofn_servers
gather_facts: no
remote_user: root
tasks:
- name: Install python
become: yes
raw: |
test -e /usr/bin/python || (
test $(lsb_release -sr | cut -d . -f1) -lt 20 &&\
(apt-get update -qq && apt-get install -qq python2.7 && ln -s /usr/bin/python2.7 /usr/bin/python) ||\
(apt-get update -qq && apt-get install -qq python3 && ln -s /usr/bin/python3 /usr/bin/python)
)
tags: skip_ansible_lint

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

0 comments on commit a872e87

Please sign in to comment.