Skip to content

Commit

Permalink
Merge pull request #46 from christiangda/feat-improvements
Browse files Browse the repository at this point in the history
feat: support for new OS
  • Loading branch information
christiangda committed Oct 12, 2022
2 parents 0051b7b + 538d68a commit 263b198
Show file tree
Hide file tree
Showing 43 changed files with 335 additions and 155 deletions.
1 change: 1 addition & 0 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ ignore: |
.travis.yml
.ansible-lint
.yamllint
.github
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ This role work on RedHat, CentOS, Amazon Linux, Debian and Ubuntu distributions
* stream8
* Rocky Linux
* 8
* 9
* Amazon Linux
* 2
* Ubuntu
Expand All @@ -52,6 +53,7 @@ This role work on RedHat, CentOS, Amazon Linux, Debian and Ubuntu distributions
* 18.*
* 20.*
* 21.*
* 22.*
* Debian
* Stretch (9)
* buster (10)
Expand Down
1 change: 1 addition & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ galaxy_info:
- bionic
- focal
- impish
- jammy

galaxy_tags:
- aws
Expand Down
6 changes: 3 additions & 3 deletions molecule/centos-7/INSTALL.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
*******
Docker driver installation guide
podman driver installation guide
*******

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

* Docker Engine
* podman Engine

Install
=======
Expand All @@ -19,4 +19,4 @@ widely recommended `'--user' flag`_ when invoking ``pip``.

.. code-block:: bash
$ python3 -m pip install 'molecule[docker]'
$ python3 -m pip install 'molecule[podman]'
2 changes: 1 addition & 1 deletion molecule/centos-7/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dependency:
name: galaxy

driver:
name: docker
name: podman

provisioner:
name: ansible
Expand Down
14 changes: 0 additions & 14 deletions molecule/centos-7/tests/test_default.py

This file was deleted.

6 changes: 3 additions & 3 deletions molecule/centos-8/INSTALL.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
*******
Docker driver installation guide
podman driver installation guide
*******

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

* Docker Engine
* podman Engine

Install
=======
Expand All @@ -19,4 +19,4 @@ widely recommended `'--user' flag`_ when invoking ``pip``.

.. code-block:: bash
$ python3 -m pip install 'molecule[docker]'
$ python3 -m pip install 'molecule[podman]'
2 changes: 1 addition & 1 deletion molecule/centos-8/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dependency:
name: galaxy

driver:
name: docker
name: podman

provisioner:
name: ansible
Expand Down
14 changes: 0 additions & 14 deletions molecule/centos-8/tests/test_default.py

This file was deleted.

6 changes: 3 additions & 3 deletions molecule/default/INSTALL.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
*******
Docker driver installation guide
podman driver installation guide
*******

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

* Docker Engine
* podman Engine

Install
=======
Expand All @@ -19,4 +19,4 @@ widely recommended `'--user' flag`_ when invoking ``pip``.

.. code-block:: bash
$ python3 -m pip install 'molecule[docker]'
$ python3 -m pip install 'molecule[podman]'
2 changes: 1 addition & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dependency:
name: galaxy

driver:
name: docker
name: podman

provisioner:
name: ansible
Expand Down
14 changes: 0 additions & 14 deletions molecule/default/tests/test_default.py

This file was deleted.

6 changes: 3 additions & 3 deletions molecule/docker/INSTALL.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
*******
Docker driver installation guide
podman driver installation guide
*******

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

* Docker Engine
* podman Engine

Install
=======
Expand All @@ -19,4 +19,4 @@ widely recommended `'--user' flag`_ when invoking ``pip``.

.. code-block:: bash
$ python3 -m pip install 'molecule[docker]'
$ python3 -m pip install 'molecule[podman]'
14 changes: 0 additions & 14 deletions molecule/docker/tests/test_default.py

This file was deleted.

10 changes: 10 additions & 0 deletions molecule/docker/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
# This is an example playbook to execute Ansible tests.

- name: Verify
hosts: all
gather_facts: false
tasks:
- name: Example assertion
ansible.builtin.assert:
that: true
4 changes: 2 additions & 2 deletions molecule/podman/INSTALL.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
*******
Docker driver installation guide
podman driver installation guide
*******

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

* Docker Engine
* podman Engine

Install
=======
Expand Down
14 changes: 0 additions & 14 deletions molecule/podman/tests/test_default.py

This file was deleted.

4 changes: 2 additions & 2 deletions molecule/redhat-8/INSTALL.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
*******
Docker driver installation guide
podman driver installation guide
*******

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

* Docker Engine
* podman Engine

Install
=======
Expand Down
13 changes: 0 additions & 13 deletions molecule/redhat-8/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,6 @@
- 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

- name: Install gnupg
apt:
name: gnupg
state: latest
when: ansible_os_family == 'Debian'
changed_when: false

tasks:
- name: "Include christiangda.epel_repo"
include_role:
Expand Down
14 changes: 0 additions & 14 deletions molecule/redhat-8/tests/test_default.py

This file was deleted.

22 changes: 22 additions & 0 deletions molecule/rocky-8/INSTALL.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
*******
podman driver installation guide
*******

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

* podman Engine

Install
=======

Please refer to the `Virtual environment`_ documentation for installation best
practices. If not using a virtual environment, please consider passing the
widely recommended `'--user' flag`_ when invoking ``pip``.

.. _Virtual environment: https://virtualenv.pypa.io/en/latest/
.. _'--user' flag: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site

.. code-block:: bash
$ python3 -m pip install 'molecule[podman]'
37 changes: 37 additions & 0 deletions molecule/rocky-8/converge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
- name: Converge
hosts: all

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

- name: "Include christiangda.awscli_configure"
include_role:
name: christiangda.awscli_configure

roles:
- role: christiangda.epel_repo
when: >
ansible_os_family == 'RedHat' and (
ansible_distribution == 'CentOS' or
ansible_distribution == 'RedHat' or
ansible_distribution == 'Amazon'
)
- role: christiangda.awscli_configure
vars:
awscliconf_path: "/root"
awscliconf_files:
credentials:
- AmazonCloudWatchAgent:
aws_access_key_id: "AKIAIOSFODNN7EXAMPLE"
aws_secret_access_key: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
config:
- profile AmazonCloudWatchAgent:
region: eu-west-1
- role: christiangda.amazon_cloudwatch_agent
vars:
cwa_agent_mode: "onPremise"
cwa_profile: "AmazonCloudWatchAgent"
cwa_aws_region: "eu-west-1"
26 changes: 26 additions & 0 deletions molecule/rocky-8/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
dependency:
name: galaxy

driver:
name: podman

provisioner:
name: ansible
# log: true

verifier:
name: ansible

scenario:
name: rocky-8

platforms:
- name: rocky-8
image: rockylinux:8
pre_build_image: true

# lint: |
# set -e
# yamllint .
# ansible-lint .
3 changes: 3 additions & 0 deletions molecule/rocky-8/requirements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
- src: christiangda.epel_repo
- src: christiangda.awscli_configure
10 changes: 10 additions & 0 deletions molecule/rocky-8/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
# This is an example playbook to execute Ansible tests.

- name: Verify
hosts: all
gather_facts: false
tasks:
- name: Example assertion
ansible.builtin.assert:
that: true

0 comments on commit 263b198

Please sign in to comment.