jasonheecs.ubuntu-python-raw
Ansible Role: Install Python on Ubuntu Machines Without Built-in Python
This Ansible role helps install Python on basic Ubuntu machines that do not have Python already installed. It checks if Python is present; if not, it installs it using the raw module.
Requirements
None.
Installation
To install this role, run:
ansible-galaxy install jasonheecs.ubuntu-python-raw
Role Variables
You can customize the following variable (see defaults/main.yml):
python_version: 3
Dependencies
None
Example Playbook
Here’s how you can use this role in a playbook:
- name: Setup
hosts: all
become: yes
gather_facts: false # Disable fact gathering for this role to work properly
roles:
- { role: jasonheecs.ubuntu-python-raw }
Tests
Testing is done using Test Kitchen, Kitchen Ansible, and Kitchen Docker.
To run the tests, ensure Ruby and Docker are installed, and then execute:
gem install bundler && bundle exec kitchen test
For more details on the test process and expected outcomes, refer to the travis.yml file and Travis build logs.
Supported Platforms
This Ansible role has been tested on the following versions of Ubuntu:
- Ubuntu 18.04
- Ubuntu 16.04
- Ubuntu 14.04
License
MIT