From 7ff1c55422213f2c8970bb0f67427928516a31d0 Mon Sep 17 00:00:00 2001 From: Larry Smith Jr Date: Mon, 24 Feb 2020 16:48:50 -0500 Subject: [PATCH] Added new Molecule tests, etc. from new structure --- .github/workflows/default.yml | 36 +++++++++++++++ .gitignore | 1 + .gitlab-ci.yml | 28 ++++++++++++ .yamllint | 36 +++++++++++++++ CODE_OF_CONDUCT.md | 76 ++++++++++++++++++++++++++++++++ CONTRIBUTING.md | 9 ++++ CONTRIBUTORS.md | 1 + LICENSE.md | 21 +++++++++ files/.gitkeep | 0 molecule/centos7/INSTALL.rst | 22 +++++++++ molecule/centos7/molecule.yml | 28 ++++++++++++ molecule/centos7/verify.yml | 9 ++++ molecule/centos8/INSTALL.rst | 22 +++++++++ molecule/centos8/molecule.yml | 28 ++++++++++++ molecule/centos8/verify.yml | 9 ++++ molecule/debian10/INSTALL.rst | 22 +++++++++ molecule/debian10/molecule.yml | 28 ++++++++++++ molecule/debian10/verify.yml | 9 ++++ molecule/debian8/INSTALL.rst | 22 +++++++++ molecule/debian8/molecule.yml | 28 ++++++++++++ molecule/debian8/verify.yml | 9 ++++ molecule/debian9/INSTALL.rst | 22 +++++++++ molecule/debian9/molecule.yml | 28 ++++++++++++ molecule/debian9/verify.yml | 9 ++++ molecule/fedora/INSTALL.rst | 22 +++++++++ molecule/fedora/molecule.yml | 28 ++++++++++++ molecule/fedora/verify.yml | 9 ++++ molecule/shared/converge.yml | 7 +++ molecule/shared/verify.yml | 9 ++++ molecule/ubuntu1604/INSTALL.rst | 22 +++++++++ molecule/ubuntu1604/molecule.yml | 28 ++++++++++++ molecule/ubuntu1604/verify.yml | 9 ++++ molecule/ubuntu1804/INSTALL.rst | 22 +++++++++ molecule/ubuntu1804/molecule.yml | 28 ++++++++++++ molecule/ubuntu1804/verify.yml | 9 ++++ requirements-dev.txt | 1 + requirements.txt | 7 +++ requirements.yml | 0 templates/.gitkeep | 0 39 files changed, 704 insertions(+) create mode 100644 .github/workflows/default.yml create mode 100644 .gitignore create mode 100644 .gitlab-ci.yml create mode 100644 .yamllint create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md create mode 100644 CONTRIBUTORS.md create mode 100644 LICENSE.md create mode 100644 files/.gitkeep create mode 100644 molecule/centos7/INSTALL.rst create mode 100644 molecule/centos7/molecule.yml create mode 100644 molecule/centos7/verify.yml create mode 100644 molecule/centos8/INSTALL.rst create mode 100644 molecule/centos8/molecule.yml create mode 100644 molecule/centos8/verify.yml create mode 100644 molecule/debian10/INSTALL.rst create mode 100644 molecule/debian10/molecule.yml create mode 100644 molecule/debian10/verify.yml create mode 100644 molecule/debian8/INSTALL.rst create mode 100644 molecule/debian8/molecule.yml create mode 100644 molecule/debian8/verify.yml create mode 100644 molecule/debian9/INSTALL.rst create mode 100644 molecule/debian9/molecule.yml create mode 100644 molecule/debian9/verify.yml create mode 100644 molecule/fedora/INSTALL.rst create mode 100644 molecule/fedora/molecule.yml create mode 100644 molecule/fedora/verify.yml create mode 100644 molecule/shared/converge.yml create mode 100644 molecule/shared/verify.yml create mode 100644 molecule/ubuntu1604/INSTALL.rst create mode 100644 molecule/ubuntu1604/molecule.yml create mode 100644 molecule/ubuntu1604/verify.yml create mode 100644 molecule/ubuntu1804/INSTALL.rst create mode 100644 molecule/ubuntu1804/molecule.yml create mode 100644 molecule/ubuntu1804/verify.yml create mode 100644 requirements-dev.txt create mode 100644 requirements.txt create mode 100644 requirements.yml create mode 100644 templates/.gitkeep diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml new file mode 100644 index 0000000..7dd03f9 --- /dev/null +++ b/.github/workflows/default.yml @@ -0,0 +1,36 @@ +--- +name: Molecule Test +on: push +jobs: + build: + runs-on: ubuntu-latest + strategy: + max-parallel: 4 + matrix: + python-version: [3.5, 3.6, 3.7] + + steps: + - uses: actions/checkout@v1 + with: + path: ansible-kea-dhcp + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + sudo apt install docker + python -m pip install --upgrade pip + pip3 install -r requirements.txt + ansible --version + molecule --version + - name: Test with molecule + run: | + molecule test --scenario-name centos7 + # molecule test --scenario-name centos8 + # molecule test --scenario-name debian8 + molecule test --scenario-name debian9 + molecule test --scenario-name debian10 + molecule test --scenario-name fedora + molecule test --scenario-name ubuntu1604 + molecule test --scenario-name ubuntu1804 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f7275bb --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +venv/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..05a7d9f --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,28 @@ +--- +image: docker:git + +services: + - docker:dind + +before_script: + - apk update && apk add --no-cache docker + python3-dev py3-pip docker gcc git curl build-base + autoconf automake py3-cryptography linux-headers + musl-dev libffi-dev openssl-dev openssh + - docker info + - python3 --version + - pip3 install -r requirements.txt + - ansible --version + - molecule --version + +molecule: + stage: test + script: + - molecule test --scenario-name centos7 + # - molecule test --scenario-name centos8 + # - molecule test --scenario-name debian8 + - molecule test --scenario-name debian9 + - molecule test --scenario-name debian10 + - molecule test --scenario-name fedora + - molecule test --scenario-name ubuntu1604 + - molecule test --scenario-name ubuntu1804 diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..70d5f7c --- /dev/null +++ b/.yamllint @@ -0,0 +1,36 @@ +--- +# Based on ansible-lint config +extends: default + +ignore: | + venv/ + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + colons: + max-spaces-after: -1 + level: error + commas: + max-spaces-after: -1 + level: error + comments: disable + comments-indentation: disable + document-start: disable + empty-lines: + max: 3 + level: error + hyphens: + level: error + indentation: disable + key-duplicates: enable + line-length: disable + new-line-at-end-of-file: disable + new-lines: + type: unix + trailing-spaces: disable + truthy: disable diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..e0cd687 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,76 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +- The use of sexualized language or imagery and unwelcome sexual attention or + advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or electronic + address, without explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at mrlesmithjr@gmail.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..8ff3010 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,9 @@ +# Contributing to ansible-kea-dhcp + +## Table Of Contents + +[Code of Conduct](#code-of-conduct) + +## Code of Conduct + +This project and everyone participating in it is governed by the [ansible-kea-dhcp Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [mrlesmithjr@gmail.com](mailto:mrlesmithjr@gmail.com). diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md new file mode 100644 index 0000000..14f22ed --- /dev/null +++ b/CONTRIBUTORS.md @@ -0,0 +1 @@ +Larry Smith Jr. - mrlesmithjr@gmail.com diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..c224c95 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Larry Smith Jr. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/files/.gitkeep b/files/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/molecule/centos7/INSTALL.rst b/molecule/centos7/INSTALL.rst new file mode 100644 index 0000000..6a44bde --- /dev/null +++ b/molecule/centos7/INSTALL.rst @@ -0,0 +1,22 @@ +******* +Docker driver installation guide +******* + +Requirements +============ + +* Docker 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 + + $ pip install 'molecule[docker]' diff --git a/molecule/centos7/molecule.yml b/molecule/centos7/molecule.yml new file mode 100644 index 0000000..ea2f842 --- /dev/null +++ b/molecule/centos7/molecule.yml @@ -0,0 +1,28 @@ +--- +dependency: + name: galaxy + enabled: false + options: + role-file: requirements.yml +driver: + name: docker +lint: | + yamllint . + ansible-lint + flake8 +platforms: + - name: centos7 + image: jrei/systemd-centos:7 + privileged: true + command: /usr/sbin/init + tmpfs: + - /run + - /tmp + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup:ro +provisioner: + name: ansible + playbooks: + converge: ../shared/converge.yml +verifier: + name: ansible diff --git a/molecule/centos7/verify.yml b/molecule/centos7/verify.yml new file mode 100644 index 0000000..a82dd6f --- /dev/null +++ b/molecule/centos7/verify.yml @@ -0,0 +1,9 @@ +--- +# This is an example playbook to execute Ansible tests. + +- name: Verify + hosts: all + tasks: + - name: Example assertion + assert: + that: true diff --git a/molecule/centos8/INSTALL.rst b/molecule/centos8/INSTALL.rst new file mode 100644 index 0000000..6a44bde --- /dev/null +++ b/molecule/centos8/INSTALL.rst @@ -0,0 +1,22 @@ +******* +Docker driver installation guide +******* + +Requirements +============ + +* Docker 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 + + $ pip install 'molecule[docker]' diff --git a/molecule/centos8/molecule.yml b/molecule/centos8/molecule.yml new file mode 100644 index 0000000..7f690ad --- /dev/null +++ b/molecule/centos8/molecule.yml @@ -0,0 +1,28 @@ +--- +dependency: + name: galaxy + enabled: false + options: + role-file: requirements.yml +driver: + name: docker +lint: | + yamllint . + ansible-lint + flake8 +platforms: + - name: centos8 + image: jrei/systemd-centos:8 + privileged: true + command: /usr/sbin/init + tmpfs: + - /run + - /tmp + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup:ro +provisioner: + name: ansible + playbooks: + converge: ../shared/converge.yml +verifier: + name: ansible diff --git a/molecule/centos8/verify.yml b/molecule/centos8/verify.yml new file mode 100644 index 0000000..a82dd6f --- /dev/null +++ b/molecule/centos8/verify.yml @@ -0,0 +1,9 @@ +--- +# This is an example playbook to execute Ansible tests. + +- name: Verify + hosts: all + tasks: + - name: Example assertion + assert: + that: true diff --git a/molecule/debian10/INSTALL.rst b/molecule/debian10/INSTALL.rst new file mode 100644 index 0000000..6a44bde --- /dev/null +++ b/molecule/debian10/INSTALL.rst @@ -0,0 +1,22 @@ +******* +Docker driver installation guide +******* + +Requirements +============ + +* Docker 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 + + $ pip install 'molecule[docker]' diff --git a/molecule/debian10/molecule.yml b/molecule/debian10/molecule.yml new file mode 100644 index 0000000..95d3e44 --- /dev/null +++ b/molecule/debian10/molecule.yml @@ -0,0 +1,28 @@ +--- +dependency: + name: galaxy + enabled: false + options: + role-file: requirements.yml +driver: + name: docker +lint: | + yamllint . + ansible-lint + flake8 +platforms: + - name: debian10 + image: jrei/systemd-debian:10 + privileged: true + command: /lib/systemd/systemd + tmpfs: + - /run + - /tmp + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup:ro +provisioner: + name: ansible + playbooks: + converge: ../shared/converge.yml +verifier: + name: ansible diff --git a/molecule/debian10/verify.yml b/molecule/debian10/verify.yml new file mode 100644 index 0000000..a82dd6f --- /dev/null +++ b/molecule/debian10/verify.yml @@ -0,0 +1,9 @@ +--- +# This is an example playbook to execute Ansible tests. + +- name: Verify + hosts: all + tasks: + - name: Example assertion + assert: + that: true diff --git a/molecule/debian8/INSTALL.rst b/molecule/debian8/INSTALL.rst new file mode 100644 index 0000000..6a44bde --- /dev/null +++ b/molecule/debian8/INSTALL.rst @@ -0,0 +1,22 @@ +******* +Docker driver installation guide +******* + +Requirements +============ + +* Docker 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 + + $ pip install 'molecule[docker]' diff --git a/molecule/debian8/molecule.yml b/molecule/debian8/molecule.yml new file mode 100644 index 0000000..33a74e7 --- /dev/null +++ b/molecule/debian8/molecule.yml @@ -0,0 +1,28 @@ +--- +dependency: + name: galaxy + enabled: false + options: + role-file: requirements.yml +driver: + name: docker +lint: | + yamllint . + ansible-lint + flake8 +platforms: + - name: debian8 + image: jrei/systemd-debian:8 + privileged: true + command: /lib/systemd/systemd + tmpfs: + - /run + - /tmp + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup:ro +provisioner: + name: ansible + playbooks: + converge: ../shared/converge.yml +verifier: + name: ansible diff --git a/molecule/debian8/verify.yml b/molecule/debian8/verify.yml new file mode 100644 index 0000000..a82dd6f --- /dev/null +++ b/molecule/debian8/verify.yml @@ -0,0 +1,9 @@ +--- +# This is an example playbook to execute Ansible tests. + +- name: Verify + hosts: all + tasks: + - name: Example assertion + assert: + that: true diff --git a/molecule/debian9/INSTALL.rst b/molecule/debian9/INSTALL.rst new file mode 100644 index 0000000..6a44bde --- /dev/null +++ b/molecule/debian9/INSTALL.rst @@ -0,0 +1,22 @@ +******* +Docker driver installation guide +******* + +Requirements +============ + +* Docker 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 + + $ pip install 'molecule[docker]' diff --git a/molecule/debian9/molecule.yml b/molecule/debian9/molecule.yml new file mode 100644 index 0000000..95a063d --- /dev/null +++ b/molecule/debian9/molecule.yml @@ -0,0 +1,28 @@ +--- +dependency: + name: galaxy + enabled: false + options: + role-file: requirements.yml +driver: + name: docker +lint: | + yamllint . + ansible-lint + flake8 +platforms: + - name: debian9 + image: jrei/systemd-debian:9 + privileged: true + command: /lib/systemd/systemd + tmpfs: + - /run + - /tmp + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup:ro +provisioner: + name: ansible + playbooks: + converge: ../shared/converge.yml +verifier: + name: ansible diff --git a/molecule/debian9/verify.yml b/molecule/debian9/verify.yml new file mode 100644 index 0000000..a82dd6f --- /dev/null +++ b/molecule/debian9/verify.yml @@ -0,0 +1,9 @@ +--- +# This is an example playbook to execute Ansible tests. + +- name: Verify + hosts: all + tasks: + - name: Example assertion + assert: + that: true diff --git a/molecule/fedora/INSTALL.rst b/molecule/fedora/INSTALL.rst new file mode 100644 index 0000000..6a44bde --- /dev/null +++ b/molecule/fedora/INSTALL.rst @@ -0,0 +1,22 @@ +******* +Docker driver installation guide +******* + +Requirements +============ + +* Docker 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 + + $ pip install 'molecule[docker]' diff --git a/molecule/fedora/molecule.yml b/molecule/fedora/molecule.yml new file mode 100644 index 0000000..c0320ef --- /dev/null +++ b/molecule/fedora/molecule.yml @@ -0,0 +1,28 @@ +--- +dependency: + name: galaxy + enabled: false + options: + role-file: requirements.yml +driver: + name: docker +lint: | + yamllint . + ansible-lint + flake8 +platforms: + - name: fedora + image: jrei/systemd-fedora + privileged: true + command: /usr/sbin/init + tmpfs: + - /run + - /tmp + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup:ro +provisioner: + name: ansible + playbooks: + converge: ../shared/converge.yml +verifier: + name: ansible diff --git a/molecule/fedora/verify.yml b/molecule/fedora/verify.yml new file mode 100644 index 0000000..a82dd6f --- /dev/null +++ b/molecule/fedora/verify.yml @@ -0,0 +1,9 @@ +--- +# This is an example playbook to execute Ansible tests. + +- name: Verify + hosts: all + tasks: + - name: Example assertion + assert: + that: true diff --git a/molecule/shared/converge.yml b/molecule/shared/converge.yml new file mode 100644 index 0000000..2c2ec9a --- /dev/null +++ b/molecule/shared/converge.yml @@ -0,0 +1,7 @@ +--- +- name: Converge + hosts: all + tasks: + - name: Include ansible-kea-dhcp + include_role: + name: ansible-kea-dhcp diff --git a/molecule/shared/verify.yml b/molecule/shared/verify.yml new file mode 100644 index 0000000..a82dd6f --- /dev/null +++ b/molecule/shared/verify.yml @@ -0,0 +1,9 @@ +--- +# This is an example playbook to execute Ansible tests. + +- name: Verify + hosts: all + tasks: + - name: Example assertion + assert: + that: true diff --git a/molecule/ubuntu1604/INSTALL.rst b/molecule/ubuntu1604/INSTALL.rst new file mode 100644 index 0000000..6a44bde --- /dev/null +++ b/molecule/ubuntu1604/INSTALL.rst @@ -0,0 +1,22 @@ +******* +Docker driver installation guide +******* + +Requirements +============ + +* Docker 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 + + $ pip install 'molecule[docker]' diff --git a/molecule/ubuntu1604/molecule.yml b/molecule/ubuntu1604/molecule.yml new file mode 100644 index 0000000..88c928a --- /dev/null +++ b/molecule/ubuntu1604/molecule.yml @@ -0,0 +1,28 @@ +--- +dependency: + name: galaxy + enabled: false + options: + role-file: requirements.yml +driver: + name: docker +lint: | + yamllint . + ansible-lint + flake8 +platforms: + - name: ubuntu1604 + image: jrei/systemd-ubuntu:16.04 + privileged: true + command: /lib/systemd/systemd + tmpfs: + - /run + - /tmp + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup:ro +provisioner: + name: ansible + playbooks: + converge: ../shared/converge.yml +verifier: + name: ansible diff --git a/molecule/ubuntu1604/verify.yml b/molecule/ubuntu1604/verify.yml new file mode 100644 index 0000000..a82dd6f --- /dev/null +++ b/molecule/ubuntu1604/verify.yml @@ -0,0 +1,9 @@ +--- +# This is an example playbook to execute Ansible tests. + +- name: Verify + hosts: all + tasks: + - name: Example assertion + assert: + that: true diff --git a/molecule/ubuntu1804/INSTALL.rst b/molecule/ubuntu1804/INSTALL.rst new file mode 100644 index 0000000..6a44bde --- /dev/null +++ b/molecule/ubuntu1804/INSTALL.rst @@ -0,0 +1,22 @@ +******* +Docker driver installation guide +******* + +Requirements +============ + +* Docker 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 + + $ pip install 'molecule[docker]' diff --git a/molecule/ubuntu1804/molecule.yml b/molecule/ubuntu1804/molecule.yml new file mode 100644 index 0000000..13890a5 --- /dev/null +++ b/molecule/ubuntu1804/molecule.yml @@ -0,0 +1,28 @@ +--- +dependency: + name: galaxy + enabled: false + options: + role-file: requirements.yml +driver: + name: docker +lint: | + yamllint . + ansible-lint + flake8 +platforms: + - name: ubuntu1804 + image: jrei/systemd-ubuntu:18.04 + privileged: true + command: /lib/systemd/systemd + tmpfs: + - /run + - /tmp + volumes: + - /sys/fs/cgroup:/sys/fs/cgroup:ro +provisioner: + name: ansible + playbooks: + converge: ../shared/converge.yml +verifier: + name: ansible diff --git a/molecule/ubuntu1804/verify.yml b/molecule/ubuntu1804/verify.yml new file mode 100644 index 0000000..a82dd6f --- /dev/null +++ b/molecule/ubuntu1804/verify.yml @@ -0,0 +1,9 @@ +--- +# This is an example playbook to execute Ansible tests. + +- name: Verify + hosts: all + tasks: + - name: Example assertion + assert: + that: true diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000..fd249cb --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1 @@ +# Python requirements for development \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..79c89f1 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,7 @@ +# Python requirements for executing +ansible +ansible-lint +docker +flake8 +molecule +testinfra \ No newline at end of file diff --git a/requirements.yml b/requirements.yml new file mode 100644 index 0000000..e69de29 diff --git a/templates/.gitkeep b/templates/.gitkeep new file mode 100644 index 0000000..e69de29