|
1 |
| -Role Name |
| 1 | +Ansible Role: Install Python on Ubuntu machines that do not have Python pre-installed |
2 | 2 | =========
|
| 3 | +[![Build Status][travis-badge]][travis-link] |
3 | 4 |
|
4 |
| -A brief description of the role goes here. |
| 5 | +An ansible role that gets Ansible to work on bare Ubuntu machines that do not have Python pre-installed. It checks if python is installed, if not, it installs it via the [raw](https://docs.ansible.com/ansible/latest/modules/raw_module.html) module. |
5 | 6 |
|
6 | 7 | Requirements
|
7 | 8 | ------------
|
8 | 9 |
|
9 |
| -Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. |
| 10 | +None. |
| 11 | + |
| 12 | + |
| 13 | +Installation |
| 14 | +------------ |
| 15 | +`ansible-galaxy install jasonheecs.ubuntu-python-raw` |
| 16 | + |
10 | 17 |
|
11 | 18 | Role Variables
|
12 | 19 | --------------
|
13 | 20 |
|
14 |
| -A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. |
| 21 | +Available variables are listed below, along with default values (see defaults/main.yml): |
| 22 | + |
| 23 | +```yaml |
| 24 | +python_version: 3 |
| 25 | +``` |
15 | 26 |
|
16 | 27 | Dependencies
|
17 | 28 | ------------
|
18 | 29 |
|
19 |
| -A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. |
| 30 | +None |
| 31 | +
|
20 | 32 |
|
21 | 33 | Example Playbook
|
22 | 34 | ----------------
|
23 | 35 |
|
24 |
| -Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: |
| 36 | +```yaml |
| 37 | +- name: Setup |
| 38 | + hosts: all |
| 39 | + become: yes |
| 40 | + gather_facts: false # You must disable the gather of facts for this role to work as intended |
| 41 | + roles: |
| 42 | + - { role: ansible-ubuntu-python-raw } |
| 43 | +``` |
| 44 | +
|
| 45 | +
|
| 46 | +Tests |
| 47 | +--------------- |
| 48 | +Testing is done via [Test Kitchen](https://github.com/test-kitchen/test-kitchen), [Kitchen Ansible](https://github.com/neillturner/kitchen-ansible) and [Kitchen Docker](https://github.com/test-kitchen/kitchen-docker) |
25 | 49 |
|
26 |
| - - hosts: servers |
27 |
| - roles: |
28 |
| - - { role: username.rolename, x: 42 } |
| 50 | +To run the tests, make sure [Ruby](https://www.ruby-lang.org/en/documentation/installation/) and [Docker](https://docs.docker.com/installation/#installation) are installed and run the following: |
| 51 | +
|
| 52 | +``` |
| 53 | +gem install bundler && bundle exec kitchen test |
| 54 | +``` |
| 55 | + |
| 56 | +Refer to the [travis.yml](.travis.yml) file and [Travis build logs][travis-link] for details on the test build process and expected outputs. |
| 57 | + |
| 58 | + |
| 59 | +Supported Platforms |
| 60 | +------- |
| 61 | +This ansible role has been tested against the following platforms: |
| 62 | +- Ubuntu 18.04 |
| 63 | +- Ubuntu 16.04 |
| 64 | +- Ubuntu 14.04 |
29 | 65 |
|
30 | 66 | License
|
31 | 67 | -------
|
32 | 68 |
|
33 |
| -BSD |
| 69 | +MIT |
| 70 | + |
34 | 71 |
|
35 | 72 | Author Information
|
36 | 73 | ------------------
|
37 | 74 |
|
38 |
| -An optional section for the role authors to include contact information, or a website (HTML is not allowed). |
| 75 | +[Jason Hee](https://jasonhee.com) |
| 76 | + |
| 77 | +[travis-badge]: https://travis-ci.com/jasonheecs/ansible-ubuntu-python-raw.svg?branch=master |
| 78 | +[travis-link]: https://travis-ci.com/jasonheecs/ansible-ubuntu-python-raw |
0 commit comments