Skip to content

Commit

Permalink
fix: added support for Ubuntu 16.04 to fix issue #5
Browse files Browse the repository at this point in the history
ft: added Ubuntu 16.04 to pipeline test in develop branch
  • Loading branch information
christiangda committed Jun 24, 2021
1 parent 7f72f61 commit 68c729a
Show file tree
Hide file tree
Showing 10 changed files with 89 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/develop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
matrix:
python: [2.7, 3.9]
ansible: ["~=2.9", "~=3.4", "~=4.1"]
scenario: ["centos-8", "ubuntu-21.04"]
scenario: ["centos-8", "ubuntu-21.04", "ubuntu-16.04"]

steps:
- name: Check out the codebase.
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# VERSION

## 1.0.2

* added support for Ubuntu 16.04 to fix issue #5
* added Ubuntu 16.04 to pipeline test in develop branch

## 1.0.1

* fixed issue #2
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ This role work on RedHat, CentOS, Debian and Ubuntu distributions
* 7
* 8
* Ubuntu
* 16.*
* 18.*
* 20.*
* 21.*
Expand Down
1 change: 1 addition & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ galaxy_info:
- bullseye
- name: Ubuntu
version:
- xenial
- bionic
- focal
- hirsute
Expand Down
16 changes: 16 additions & 0 deletions molecule/ubuntu-16.04/INSTALL.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
*******
Docker driver installation guide
*******

Requirements
============

* General molecule dependencies (see https://molecule.readthedocs.io/en/latest/installation.html)
* Docker Engine
* docker-py
* docker

Install
=======

$ sudo pip install docker-py
25 changes: 25 additions & 0 deletions molecule/ubuntu-16.04/converge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
- name: Converge
hosts: all

pre_tasks:
- name: Update apt cache.
apt: update_cache=true cache_valid_time=600
when: ansible_os_family == 'Debian'
changed_when: false

tasks:
- name: "Include christiangda.epel_repo"
include_role:
name: christiangda.epel_repo

roles:
- role: christiangda.epel_repo
when: >
ansible_os_family == 'RedHat' and (
ansible_distribution == 'CentOS' or
ansible_distribution == 'RedHat' or
ansible_distribution == 'Amazon'
)
changed_when: false
- role: christiangda.awscli
20 changes: 20 additions & 0 deletions molecule/ubuntu-16.04/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
dependency:
name: galaxy

driver:
name: docker

provisioner:
name: ansible
# log: true

verifier:
name: ansible

scenario:
name: ubuntu-16.04

platforms:
- name: ubuntu-16.04
image: ubuntu:16.04
2 changes: 2 additions & 0 deletions molecule/ubuntu-16.04/requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
- src: christiangda.epel_repo
14 changes: 14 additions & 0 deletions molecule/ubuntu-16.04/tests/test_default.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import os

import testinfra.utils.ansible_runner

testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')


def test_hosts_file(host):
f = host.file('/etc/hosts')

assert f.exists
assert f.user == 'root'
assert f.group == 'root'
4 changes: 4 additions & 0 deletions vars/ubuntu-16.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
cli_dependencies_packages:
- python3-setuptools
- python3-pip

0 comments on commit 68c729a

Please sign in to comment.