diff --git a/.github/workflows/molecule-test.yml b/.github/workflows/molecule-test.yml new file mode 100644 index 0000000..adde7b0 --- /dev/null +++ b/.github/workflows/molecule-test.yml @@ -0,0 +1,31 @@ +--- +name: Molecule Test +on: [push] +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + max-parallel: 4 + + env: + ANSIBLE_FORCE_COLOR: true + + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3 + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install ansible molecule docker molecule-docker pytest pytest-testinfra + - name: Show versions + run: | + python --version + docker --version + ansible --version + - name: Test with molecule + run: | + molecule test --all diff --git a/.travis.yml b/.travis.yml deleted file mode 100755 index 1fc7046..0000000 --- a/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -notifications: - email: false - -language: python - -python: 3.6 - -env: - - ANSIBLE_VER="~=2.5.0" MOLECULE_VER="~=2.22.0" - - ANSIBLE_VER="~=2.6.0" MOLECULE_VER="~=2.22.0" - - ANSIBLE_VER="~=2.7.0" MOLECULE_VER="~=2.22.0" - - ANSIBLE_VER="~=2.8.0" MOLECULE_VER="~=2.22.0" - - ANSIBLE_VER="" MOLECULE_VER="" - -sudo: true - -services: - - docker - -install: - - sudo apt-get install -y python-pip libssl-dev - - pip install docker-py ansible${ANSIBLE_VER} molecule${MOLECULE_VER} - -script: - - ansible --version - - molecule --version - - molecule test --all diff --git a/.yamllint b/.yamllint deleted file mode 100644 index 3a2255e..0000000 --- a/.yamllint +++ /dev/null @@ -1,13 +0,0 @@ -extends: default - -rules: - braces: - max-spaces-inside: 1 - level: error - brackets: - max-spaces-inside: 1 - level: error - line-length: disable - # NOTE(retr0h): Templates no longer fail this lint rule. - # Uncomment if running old Molecule templates. - # truthy: disable diff --git a/README.md b/README.md index ae03458..bd0a9a5 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ Ansible User Management Role ==== -[![Build Status](https://travis-ci.com/Rickkwa/ansible-user-management.svg?branch=master)](https://travis-ci.com/Rickkwa/ansible-user-management) [![Ansible Role](https://img.shields.io/ansible/role/d/27347.svg)](https://galaxy.ansible.com/rickkwa/user_management) [![license](https://img.shields.io/github/license/Rickkwa/ansible-user-management.svg)](https://github.com/Rickkwa/ansible-user-management/blob/master/LICENSE.md) diff --git a/meta/main.yml b/meta/main.yml index 4ce6753..7a95726 100755 --- a/meta/main.yml +++ b/meta/main.yml @@ -3,6 +3,8 @@ galaxy_info: author: Ricky Kwan description: "Manages user accounts, groups, and sudoers using a centralized user/group inventory." + role_name: "user_management" + namespace: "rickkwa" license: "MIT" min_ansible_version: 2.5 category: diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 9d72df0..4678c9c 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -35,14 +35,7 @@ platforms: privileged: true driver: name: docker -lint: - name: yamllint provisioner: name: ansible - lint: - name: ansible-lint - log: true verifier: name: testinfra - lint: - name: flake8 diff --git a/molecule/delete-user-group/molecule.yml b/molecule/delete-user-group/molecule.yml index 3142821..85d74a2 100644 --- a/molecule/delete-user-group/molecule.yml +++ b/molecule/delete-user-group/molecule.yml @@ -34,14 +34,7 @@ platforms: privileged: true driver: name: docker -lint: - name: yamllint provisioner: name: ansible - lint: - name: ansible-lint - log: true verifier: name: testinfra - lint: - name: flake8