From e07765f3ce566eb2ae9fa41f4ec47540ca62659d Mon Sep 17 00:00:00 2001 From: Robert de Bock Date: Mon, 28 Sep 2020 11:54:36 +0200 Subject: [PATCH] Update roles, change names. --- Vagrantfile | 2 +- ansible.cfg | 1 + galaxy.yml | 2 +- inventory/vagant.py | 159 +++++++++--- playbook.yml | 40 +-- roles/ansible/.ansible-lint | 5 - .../.github/ISSUE_TEMPLATE/feature_request.md | 17 -- roles/ansible/.travis.yml | 47 ---- roles/ansible/CONTRIBUTING.md | 10 - roles/ansible/meta/.galaxy_install_info | 2 - roles/ansible_lint/.ansible-lint | 5 - .../.github/ISSUE_TEMPLATE/feature_request.md | 17 -- roles/ansible_lint/.travis.yml | 45 ---- roles/ansible_lint/CONTRIBUTING.md | 10 - roles/ansible_lint/defaults/main.yml | 2 - roles/ansible_lint/meta/.galaxy_install_info | 2 - roles/ara/.ansible-lint | 5 - .../.github/ISSUE_TEMPLATE/feature_request.md | 17 -- roles/ara/.travis.yml | 44 ---- roles/ara/CONTRIBUTING.md | 10 - roles/ara/meta/.galaxy_install_info | 2 - roles/ara/molecule/default/prepare.yml | 11 - roles/atom/.ansible-lint | 5 - .../.github/ISSUE_TEMPLATE/feature_request.md | 17 -- roles/atom/.travis.yml | 48 ---- roles/atom/CONTRIBUTING.md | 10 - roles/atom/defaults/main.yml | 2 - roles/atom/meta/.galaxy_install_info | 2 - roles/atom/meta/exception.yml | 4 - roles/atom/vars/main.yml | 26 -- roles/bootstrap/.ansible-lint | 3 - .../.github/ISSUE_TEMPLATE/bug_report.md | 28 -- .../.github/ISSUE_TEMPLATE/feature_request.md | 17 -- roles/bootstrap/.travis.yml | 53 ---- roles/bootstrap/.yamllint | 13 - roles/bootstrap/LICENSE | 202 --------------- roles/bootstrap/meta/.galaxy_install_info | 2 - roles/bootstrap/tox.ini | 22 -- roles/buildtools/.ansible-lint | 5 - .../.github/ISSUE_TEMPLATE/bug_report.md | 28 -- .../.github/ISSUE_TEMPLATE/feature_request.md | 17 -- roles/buildtools/.travis.yml | 51 ---- roles/buildtools/.yamllint | 11 - roles/buildtools/LICENSE | 202 --------------- roles/buildtools/defaults/main.yml | 2 - roles/buildtools/meta/.galaxy_install_info | 2 - roles/buildtools/tox.ini | 22 -- roles/common/.ansible-lint | 5 - .../.github/ISSUE_TEMPLATE/bug_report.md | 28 -- .../.github/ISSUE_TEMPLATE/feature_request.md | 17 -- roles/common/.travis.yml | 53 ---- roles/common/.yamllint | 11 - roles/common/LICENSE | 202 --------------- roles/common/meta/.galaxy_install_info | 2 - roles/common/tasks/main.yml | 65 ----- roles/common/tox.ini | 22 -- roles/docker/.ansible-lint | 5 - .../.github/ISSUE_TEMPLATE/bug_report.md | 28 -- .../.github/ISSUE_TEMPLATE/feature_request.md | 17 -- roles/docker/.travis.yml | 48 ---- roles/docker/.yamllint | 11 - roles/docker/CONTRIBUTING.md | 10 - roles/docker/LICENSE | 202 --------------- roles/docker/defaults/main.yml | 2 - roles/docker/handlers/main.yml | 6 - roles/docker/meta/.galaxy_install_info | 2 - roles/docker/molecule/default/prepare.yml | 12 - roles/docker/tox.ini | 22 -- roles/epel/.ansible-lint | 3 - .../epel/.github/ISSUE_TEMPLATE/bug_report.md | 28 -- .../.github/ISSUE_TEMPLATE/feature_request.md | 17 -- roles/epel/.travis.yml | 41 --- roles/epel/.yamllint | 11 - roles/epel/LICENSE | 202 --------------- roles/epel/defaults/main.yml | 2 - roles/epel/meta/.galaxy_install_info | 2 - roles/epel/molecule/default/playbook.yml | 8 - roles/epel/tasks/main.yml | 11 - roles/epel/tox.ini | 22 -- roles/fail2ban/.ansible-lint | 5 - .../.github/ISSUE_TEMPLATE/bug_report.md | 28 -- .../.github/ISSUE_TEMPLATE/feature_request.md | 17 -- roles/fail2ban/.travis.yml | 48 ---- roles/fail2ban/.yamllint | 11 - roles/fail2ban/CONTRIBUTING.md | 10 - roles/fail2ban/LICENSE | 202 --------------- roles/fail2ban/meta/.galaxy_install_info | 2 - roles/fail2ban/meta/exception.yml | 4 - roles/fail2ban/molecule/default/playbook.yml | 8 - roles/fail2ban/tox.ini | 22 -- roles/git/.ansible-lint | 3 - .../git/.github/ISSUE_TEMPLATE/bug_report.md | 28 -- .../.github/ISSUE_TEMPLATE/feature_request.md | 17 -- roles/git/.travis.yml | 53 ---- roles/git/.yamllint | 11 - roles/git/CONTRIBUTING.md | 74 ------ roles/git/LICENSE | 202 --------------- roles/git/meta/.galaxy_install_info | 2 - roles/git/tox.ini | 22 -- roles/investigate/.ansible-lint | 3 - .../.github/ISSUE_TEMPLATE/bug_report.md | 28 -- .../.github/ISSUE_TEMPLATE/feature_request.md | 17 -- roles/investigate/.travis.yml | 51 ---- roles/investigate/.yamllint | 11 - roles/investigate/CONTRIBUTING.md | 10 - roles/investigate/LICENSE | 202 --------------- roles/investigate/handlers/main.yml | 8 - roles/investigate/meta/.galaxy_install_info | 2 - .../investigate/molecule/default/playbook.yml | 8 - roles/investigate/tox.ini | 22 -- roles/molecule/.ansible-lint | 5 - .../.github/ISSUE_TEMPLATE/bug_report.md | 28 -- .../.github/ISSUE_TEMPLATE/feature_request.md | 17 -- roles/molecule/.travis.yml | 47 ---- roles/molecule/.yamllint | 11 - roles/molecule/CONTRIBUTING.md | 10 - roles/molecule/LICENSE | 202 --------------- roles/molecule/meta/.galaxy_install_info | 2 - roles/molecule/molecule/default/playbook.yml | 8 - roles/molecule/tox.ini | 22 -- roles/postfix/.ansible-lint | 5 - .../.github/ISSUE_TEMPLATE/bug_report.md | 28 -- .../.github/ISSUE_TEMPLATE/feature_request.md | 17 -- roles/postfix/.travis.yml | 50 ---- roles/postfix/.yamllint | 11 - roles/postfix/CONTRIBUTING.md | 74 ------ roles/postfix/LICENSE | 202 --------------- roles/postfix/handlers/main.yml | 9 - roles/postfix/meta/.galaxy_install_info | 2 - roles/postfix/molecule/default/playbook.yml | 13 - roles/postfix/molecule/default/prepare.yml | 9 - roles/postfix/tasks/main.yml | 60 ----- roles/postfix/tox.ini | 22 -- roles/python_pip/.ansible-lint | 5 - .../.github/ISSUE_TEMPLATE/bug_report.md | 28 -- .../.github/ISSUE_TEMPLATE/feature_request.md | 17 -- roles/python_pip/.travis.yml | 49 ---- roles/python_pip/.yamllint | 11 - roles/python_pip/CONTRIBUTING.md | 74 ------ roles/python_pip/LICENSE | 202 --------------- roles/python_pip/meta/.galaxy_install_info | 2 - .../python_pip/molecule/default/playbook.yml | 8 - roles/python_pip/molecule/default/prepare.yml | 10 - roles/python_pip/molecule/default/verify.yml | 11 - roles/python_pip/tox.ini | 22 -- roles/python_pip/vars/main.yml | 27 -- roles/reboot/.ansible-lint | 5 - .../.github/ISSUE_TEMPLATE/bug_report.md | 28 -- .../.github/ISSUE_TEMPLATE/feature_request.md | 17 -- roles/reboot/.travis.yml | 50 ---- roles/reboot/.yamllint | 11 - roles/reboot/CONTRIBUTING.md | 74 ------ roles/reboot/LICENSE | 202 --------------- roles/reboot/handlers/main.yml | 12 - roles/reboot/meta/.galaxy_install_info | 2 - roles/reboot/meta/exception.yml | 4 - roles/reboot/molecule/default/playbook.yml | 8 - roles/reboot/tasks/main.yml | 51 ---- roles/reboot/tox.ini | 22 -- roles/requirements.yml | 22 -- roles/robertdebock.ansible/.ansible-lint | 8 + .../robertdebock.ansible/.github/FUNDING.yml | 2 + .../.github/ISSUE_TEMPLATE/bug_report.md | 17 +- .../.github/ISSUE_TEMPLATE/feature_request.md | 19 ++ .../.github/pull_request_template.md} | 0 .../.github/settings.yml | 0 .../.github/workflows/galaxy.yml | 22 ++ .../.github/workflows/molecule.yml | 76 ++++++ .../.gitignore | 0 roles/robertdebock.ansible/.travis.yml | 49 ++++ roles/robertdebock.ansible/.yamllint | 15 ++ .../CODE_OF_CONDUCT.md | 0 roles/robertdebock.ansible/CONTRIBUTING.md | 76 ++++++ .../{ansible => robertdebock.ansible}/LICENSE | 2 +- .../README.md | 94 +++---- .../SECURITY.md | 8 +- .../defaults/main.yml | 2 +- .../meta/.galaxy_install_info | 2 + .../meta/exception.yml | 0 .../meta/main.yml | 20 +- .../robertdebock.ansible/meta/preferences.yml | 2 + .../molecule/default/converge.yml | 8 + .../molecule/default/molecule.yml | 14 +- .../molecule/default/prepare.yml | 0 .../molecule/default/verify.yml | 0 .../requirements.yml | 0 roles/robertdebock.ansible/tasks/assert.yml | 23 ++ .../tasks/main.yml | 17 +- .../{ansible => robertdebock.ansible}/tox.ini | 14 +- .../vars/main.yml | 1 + roles/robertdebock.ansible_lint/.ansible-lint | 8 + .../.github/FUNDING.yml | 2 + .../.github/ISSUE_TEMPLATE/bug_report.md | 17 +- .../.github/ISSUE_TEMPLATE/feature_request.md | 19 ++ .../.github/pull_request_template.md} | 0 .../.github/settings.yml | 0 .../.github/workflows/galaxy.yml | 22 ++ .../.github/workflows/molecule.yml | 68 +++++ .../.gitignore | 0 roles/robertdebock.ansible_lint/.travis.yml | 45 ++++ roles/robertdebock.ansible_lint/.yamllint | 15 ++ .../CODE_OF_CONDUCT.md | 0 .../robertdebock.ansible_lint/CONTRIBUTING.md | 76 ++++++ .../LICENSE | 2 +- .../README.md | 99 +++---- .../SECURITY.md | 8 +- .../meta/.galaxy_install_info | 2 + .../meta/exception.yml | 0 .../meta/main.yml | 21 +- .../meta/preferences.yml | 2 + .../molecule/default/converge.yml | 8 + .../molecule/default/molecule.yml | 13 +- .../molecule/default/prepare.yml | 0 .../molecule/default/verify.yml | 9 + .../requirements.yml | 0 .../tasks/main.yml | 3 - .../tox.ini | 14 +- .../vars/main.yml | 1 + roles/robertdebock.ara/.ansible-lint | 8 + roles/robertdebock.ara/.github/FUNDING.yml | 2 + .../.github/ISSUE_TEMPLATE/bug_report.md | 17 +- .../.github/ISSUE_TEMPLATE/feature_request.md | 19 ++ .../.github/pull_request_template.md} | 0 .../.github/settings.yml | 0 .../.github/workflows/galaxy.yml | 22 ++ .../.github/workflows/molecule.yml | 64 +++++ roles/{ara => robertdebock.ara}/.gitignore | 0 roles/robertdebock.ara/.travis.yml | 43 ++++ roles/robertdebock.ara/.yamllint | 15 ++ .../CODE_OF_CONDUCT.md | 0 .../CONTRIBUTING.md | 28 +- roles/{ara => robertdebock.ara}/LICENSE | 2 +- roles/{ara => robertdebock.ara}/README.md | 109 ++++---- roles/{ara => robertdebock.ara}/SECURITY.md | 8 +- .../defaults/main.yml | 2 - .../handlers/main.yml | 0 .../meta/.galaxy_install_info | 2 + .../meta/exception.yml | 0 roles/{ara => robertdebock.ara}/meta/main.yml | 15 +- roles/robertdebock.ara/meta/preferences.yml | 2 + .../molecule/default/converge.yml} | 2 +- .../molecule/default/molecule.yml | 13 +- .../molecule/default/prepare.yml | 11 + .../molecule/default/verify.yml | 9 + .../requirements.yml | 2 +- roles/robertdebock.ara/tasks/assert.yml | 37 +++ .../{ara => robertdebock.ara}/tasks/main.yml | 12 +- roles/{atom => robertdebock.ara}/tox.ini | 14 +- roles/{ara => robertdebock.ara}/vars/main.yml | 1 + roles/robertdebock.atom/.ansible-lint | 8 + roles/robertdebock.atom/.github/FUNDING.yml | 2 + .../.github/ISSUE_TEMPLATE/bug_report.md | 17 +- .../.github/ISSUE_TEMPLATE/feature_request.md | 19 ++ .../.github/pull_request_template.md} | 0 .../.github/settings.yml | 0 .../.github/workflows/galaxy.yml | 22 ++ .../.github/workflows/molecule.yml | 70 +++++ roles/{atom => robertdebock.atom}/.gitignore | 0 roles/robertdebock.atom/.travis.yml | 46 ++++ roles/robertdebock.atom/.yamllint | 15 ++ .../CODE_OF_CONDUCT.md | 0 .../CONTRIBUTING.md | 28 +- roles/{atom => robertdebock.atom}/LICENSE | 2 +- roles/{atom => robertdebock.atom}/README.md | 109 ++++---- roles/{atom => robertdebock.atom}/SECURITY.md | 8 +- roles/robertdebock.atom/defaults/main.yml | 8 + .../meta/.galaxy_install_info | 2 + roles/robertdebock.atom/meta/exception.yml | 6 + .../{atom => robertdebock.atom}/meta/main.yml | 21 +- roles/robertdebock.atom/meta/preferences.yml | 2 + .../molecule/default/converge.yml} | 2 +- .../molecule/default/molecule.yml | 13 +- .../molecule/default/prepare.yml | 0 .../molecule/default/verify.yml | 9 + .../requirements.yml | 0 roles/robertdebock.atom/tasks/assert.yml | 9 + .../tasks/main.yml | 18 +- .../tox.ini | 14 +- roles/robertdebock.atom/vars/main.yml | 32 +++ roles/robertdebock.bootstrap/.ansible-lint | 7 + .../.github/FUNDING.yml | 2 + .../.github/ISSUE_TEMPLATE/bug_report.md | 31 +++ .../.github/ISSUE_TEMPLATE/feature_request.md | 19 ++ .../.github/pull_request_template.md} | 0 .../.github/settings.yml | 0 .../.github/workflows/galaxy.yml | 22 ++ .../.github/workflows/molecule.yml | 78 ++++++ .../.gitignore | 0 roles/robertdebock.bootstrap/.travis.yml | 50 ++++ roles/robertdebock.bootstrap/.yamllint | 15 ++ .../CODE_OF_CONDUCT.md | 0 roles/robertdebock.bootstrap/CONTRIBUTING.md | 76 ++++++ roles/robertdebock.bootstrap/LICENSE | 202 +++++++++++++++ .../README.md | 71 ++--- .../SECURITY.md | 8 +- .../defaults/main.yml | 0 .../meta/.galaxy_install_info | 2 + .../meta/main.yml | 23 +- .../meta/preferences.yml | 2 + .../molecule/default/converge.yml} | 2 +- .../molecule/default/molecule.yml | 14 +- .../molecule/default/verify.yml | 2 +- roles/robertdebock.bootstrap/tasks/assert.yml | 28 ++ .../tasks/gather_facts.yml | 7 +- .../tasks/main.yml | 27 +- roles/robertdebock.bootstrap/tox.ini | 26 ++ .../vars/main.yml | 1 + roles/robertdebock.buildtools/.ansible-lint | 8 + .../.github/FUNDING.yml | 2 + .../.github/ISSUE_TEMPLATE/bug_report.md | 31 +++ .../.github/ISSUE_TEMPLATE/feature_request.md | 19 ++ .../.github/pull_request_template.md} | 0 .../.github/settings.yml | 0 .../.github/workflows/galaxy.yml | 22 ++ .../.github/workflows/molecule.yml | 78 ++++++ .../.gitignore | 0 roles/robertdebock.buildtools/.travis.yml | 50 ++++ roles/robertdebock.buildtools/.yamllint | 15 ++ .../CODE_OF_CONDUCT.md | 0 roles/robertdebock.buildtools/CONTRIBUTING.md | 76 ++++++ roles/robertdebock.buildtools/LICENSE | 202 +++++++++++++++ .../README.md | 69 ++--- .../SECURITY.md | 8 +- .../meta/.galaxy_install_info | 2 + .../meta/exception.yml | 0 .../meta/main.yml | 20 +- .../meta/preferences.yml | 2 + .../molecule/default/converge.yml | 8 + .../molecule/default/molecule.yml | 14 +- .../molecule/default/prepare.yml | 2 +- .../molecule/default/verify.yml | 0 .../requirements.yml | 0 .../tasks/main.yml | 3 - roles/robertdebock.buildtools/tox.ini | 26 ++ .../vars/main.yml | 18 +- roles/robertdebock.common/.ansible-lint | 8 + roles/robertdebock.common/.github/FUNDING.yml | 2 + .../.github/ISSUE_TEMPLATE/bug_report.md | 31 +++ .../.github/ISSUE_TEMPLATE/feature_request.md | 19 ++ .../.github/pull_request_template.md} | 0 .../.github/settings.yml | 0 .../.github/workflows/galaxy.yml | 22 ++ .../.github/workflows/molecule.yml | 78 ++++++ .../.gitignore | 0 roles/robertdebock.common/.travis.yml | 50 ++++ roles/robertdebock.common/.yamllint | 15 ++ .../CODE_OF_CONDUCT.md | 0 roles/robertdebock.common/CONTRIBUTING.md | 76 ++++++ .../INSTALL.md | 0 roles/robertdebock.common/LICENSE | 202 +++++++++++++++ .../{common => robertdebock.common}/README.md | 129 ++++------ .../SECURITY.md | 8 +- .../defaults/main.yml | 6 +- .../handlers/main.yml | 5 + .../meta/.galaxy_install_info | 2 + roles/robertdebock.common/meta/exception.yml | 4 + .../meta/main.yml | 23 +- .../robertdebock.common/meta/preferences.yml | 2 + .../molecule/default/converge.yml} | 2 +- .../molecule/default/molecule.yml | 13 +- .../molecule/default/prepare.yml | 2 +- .../molecule/default/verify.yml | 9 + .../requirements.yml | 0 roles/robertdebock.common/tasks/assert.yml | 31 +++ roles/robertdebock.common/tasks/main.yml | 76 ++++++ .../templates/.gitkeep | 0 .../templates/hosts.j2 | 2 + roles/robertdebock.common/tox.ini | 26 ++ .../vars/main.yml | 3 +- roles/robertdebock.docker/.ansible-lint | 8 + roles/robertdebock.docker/.github/FUNDING.yml | 2 + .../.github/ISSUE_TEMPLATE/bug_report.md | 31 +++ .../.github/ISSUE_TEMPLATE/feature_request.md | 19 ++ .../.github/pull_request_template.md} | 0 .../.github/settings.yml | 0 .../.github/workflows/galaxy.yml | 22 ++ .../.github/workflows/molecule.yml | 76 ++++++ .../.gitignore | 0 roles/robertdebock.docker/.travis.yml | 49 ++++ roles/robertdebock.docker/.yamllint | 15 ++ .../CODE_OF_CONDUCT.md | 0 roles/robertdebock.docker/CONTRIBUTING.md | 76 ++++++ roles/robertdebock.docker/LICENSE | 202 +++++++++++++++ .../{docker => robertdebock.docker}/README.md | 137 +++++----- .../SECURITY.md | 8 +- roles/robertdebock.docker/handlers/main.yml | 7 + .../meta/.galaxy_install_info | 2 + .../meta/exception.yml | 0 .../meta/main.yml | 19 +- .../robertdebock.docker/meta/preferences.yml | 2 + .../molecule/default/converge.yml} | 2 +- .../molecule/default/molecule.yml | 13 +- .../molecule/default/prepare.yml | 0 .../molecule/default/verify.yml} | 9 +- .../requirements.yml | 0 .../tasks/main.yml | 10 +- roles/robertdebock.docker/tox.ini | 26 ++ .../vars/main.yml | 7 + roles/robertdebock.epel/.ansible-lint | 7 + roles/robertdebock.epel/.github/FUNDING.yml | 2 + .../.github/ISSUE_TEMPLATE/bug_report.md | 31 +++ .../.github/ISSUE_TEMPLATE/feature_request.md | 19 ++ .../.github/pull_request_template.md} | 0 .../.github/settings.yml | 0 .../.github/workflows/galaxy.yml | 22 ++ .../.github/workflows/molecule.yml | 60 +++++ roles/{epel => robertdebock.epel}/.gitignore | 0 roles/robertdebock.epel/.travis.yml | 41 +++ roles/robertdebock.epel/.yamllint | 15 ++ .../CODE_OF_CONDUCT.md | 0 .../CONTRIBUTING.md | 28 +- roles/robertdebock.epel/LICENSE | 202 +++++++++++++++ roles/{epel => robertdebock.epel}/README.md | 90 +++---- roles/{epel => robertdebock.epel}/SECURITY.md | 8 +- roles/robertdebock.epel/handlers/main.yml | 5 + .../meta/.galaxy_install_info | 2 + .../{epel => robertdebock.epel}/meta/main.yml | 0 roles/robertdebock.epel/meta/preferences.yml | 2 + .../molecule/default/converge.yml} | 2 +- .../molecule/default/molecule.yml | 14 +- .../molecule/default/prepare.yml | 2 +- .../molecule/default/verify.yml | 4 +- .../requirements.yml | 0 roles/robertdebock.epel/tasks/main.yml | 17 ++ roles/robertdebock.epel/tox.ini | 26 ++ .../{epel => robertdebock.epel}/vars/main.yml | 3 + roles/robertdebock.fail2ban/.ansible-lint | 8 + .../robertdebock.fail2ban/.github/FUNDING.yml | 2 + .../.github/ISSUE_TEMPLATE/bug_report.md | 31 +++ .../.github/ISSUE_TEMPLATE/feature_request.md | 19 ++ .../.github/pull_request_template.md} | 0 .../.github/settings.yml | 0 .../.github/workflows/galaxy.yml | 22 ++ .../.github/workflows/molecule.yml | 74 ++++++ .../.gitignore | 0 roles/robertdebock.fail2ban/.travis.yml | 48 ++++ roles/robertdebock.fail2ban/.yamllint | 15 ++ .../CODE_OF_CONDUCT.md | 0 roles/robertdebock.fail2ban/CONTRIBUTING.md | 76 ++++++ roles/robertdebock.fail2ban/LICENSE | 202 +++++++++++++++ .../README.md | 121 +++++---- .../SECURITY.md | 8 +- .../defaults/main.yml | 7 +- .../handlers/main.yml | 0 .../meta/.galaxy_install_info | 2 + .../robertdebock.fail2ban/meta/exception.yml | 6 + .../meta/main.yml | 19 +- .../meta/preferences.yml | 2 + .../molecule/default/converge.yml | 8 + .../molecule/default/molecule.yml | 13 +- .../molecule/default/prepare.yml | 0 .../molecule/default/verify.yml | 9 + .../requirements.yml | 0 roles/robertdebock.fail2ban/tasks/assert.yml | 112 ++++++++ .../tasks/main.yml | 29 ++- roles/robertdebock.fail2ban/tox.ini | 26 ++ .../vars/main.yml | 1 + roles/robertdebock.git/.ansible-lint | 7 + roles/robertdebock.git/.github/FUNDING.yml | 2 + .../.github/ISSUE_TEMPLATE/bug_report.md | 31 +++ .../.github/ISSUE_TEMPLATE/feature_request.md | 19 ++ .../.github/pull_request_template.md} | 0 .../.github/settings.yml | 0 .../.github/workflows/galaxy.yml | 22 ++ .../.github/workflows/molecule.yml | 78 ++++++ roles/{git => robertdebock.git}/.gitignore | 0 roles/robertdebock.git/.travis.yml | 50 ++++ roles/robertdebock.git/.yamllint | 15 ++ .../CODE_OF_CONDUCT.md | 0 .../CONTRIBUTING.md | 28 +- roles/robertdebock.git/LICENSE | 202 +++++++++++++++ roles/{git => robertdebock.git}/README.md | 113 ++++---- roles/{git => robertdebock.git}/SECURITY.md | 8 +- .../defaults/main.yml | 3 +- .../meta/.galaxy_install_info | 2 + roles/{git => robertdebock.git}/meta/main.yml | 21 +- roles/robertdebock.git/meta/preferences.yml | 2 + .../molecule/default/converge.yml} | 2 +- .../molecule/default/molecule.yml | 13 +- .../molecule/default/prepare.yml | 0 .../molecule/default/verify.yml | 9 + .../requirements.yml | 0 roles/robertdebock.git/tasks/assert.yml | 87 +++++++ .../{git => robertdebock.git}/tasks/main.yml | 11 +- .../templates/gitconfig.j2 | 0 roles/robertdebock.git/tox.ini | 26 ++ roles/{git => robertdebock.git}/vars/main.yml | 1 + roles/robertdebock.investigate/.ansible-lint | 7 + .../.github/FUNDING.yml | 2 + .../.github/ISSUE_TEMPLATE/bug_report.md | 31 +++ .../.github/ISSUE_TEMPLATE/feature_request.md | 19 ++ .../.github/pull_request_template.md} | 0 .../.github/settings.yml | 0 .../.github/workflows/galaxy.yml | 22 ++ .../.github/workflows/molecule.yml | 78 ++++++ .../.gitignore | 0 roles/robertdebock.investigate/.travis.yml | 50 ++++ roles/robertdebock.investigate/.yamllint | 15 ++ .../CODE_OF_CONDUCT.md | 0 .../robertdebock.investigate/CONTRIBUTING.md | 76 ++++++ roles/robertdebock.investigate/LICENSE | 202 +++++++++++++++ .../README.md | 97 ++++--- .../SECURITY.md | 8 +- .../meta/.galaxy_install_info | 2 + .../meta/main.yml | 22 +- .../meta/preferences.yml | 2 + .../molecule/default/converge.yml | 8 + .../molecule/default/molecule.yml | 13 +- .../molecule/default/prepare.yml | 4 +- .../molecule/default/verify.yml | 9 + .../requirements.yml | 0 .../tasks/main.yml | 3 - roles/robertdebock.investigate/tox.ini | 26 ++ .../vars/main.yml | 8 +- roles/robertdebock.molecule/.ansible-lint | 8 + .../robertdebock.molecule/.github/FUNDING.yml | 2 + .../.github/ISSUE_TEMPLATE/bug_report.md | 31 +++ .../.github/ISSUE_TEMPLATE/feature_request.md | 19 ++ .../.github/pull_request_template.md} | 0 .../.github/settings.yml | 0 .../.github/workflows/galaxy.yml | 22 ++ .../.github/workflows/molecule.yml | 68 +++++ .../.gitignore | 0 roles/robertdebock.molecule/.travis.yml | 45 ++++ roles/robertdebock.molecule/.yamllint | 15 ++ .../CODE_OF_CONDUCT.md | 0 roles/robertdebock.molecule/CONTRIBUTING.md | 76 ++++++ roles/robertdebock.molecule/LICENSE | 202 +++++++++++++++ .../README.md | 100 ++++---- .../SECURITY.md | 8 +- .../defaults/main.yml | 1 + .../meta/.galaxy_install_info | 2 + .../meta/exception.yml | 4 +- .../meta/main.yml | 19 +- .../meta/preferences.yml | 2 + .../molecule/default/converge.yml | 8 + .../molecule/default/molecule.yml | 13 +- .../molecule/default/prepare.yml | 0 .../molecule/default/verify.yml | 9 + .../requirements.yml | 2 +- roles/robertdebock.molecule/tasks/assert.yml | 8 + .../tasks/main.yml | 11 +- roles/robertdebock.molecule/tox.ini | 26 ++ .../vars/main.yml | 3 +- roles/robertdebock.postfix/.ansible-lint | 8 + .../robertdebock.postfix/.github/FUNDING.yml | 2 + .../.github/ISSUE_TEMPLATE/bug_report.md | 31 +++ .../.github/ISSUE_TEMPLATE/feature_request.md | 19 ++ .../.github/pull_request_template.md} | 0 .../.github/settings.yml | 0 .../.github/workflows/galaxy.yml | 22 ++ .../.github/workflows/molecule.yml | 72 ++++++ .../.gitignore | 0 roles/robertdebock.postfix/.travis.yml | 47 ++++ roles/robertdebock.postfix/.yamllint | 15 ++ .../CODE_OF_CONDUCT.md | 0 roles/robertdebock.postfix/CONTRIBUTING.md | 76 ++++++ roles/robertdebock.postfix/LICENSE | 202 +++++++++++++++ .../README.md | 155 ++++++----- .../SECURITY.md | 8 +- .../defaults/main.yml | 26 +- .../robertdebock.postfix/files/my-postfix.te | 10 + roles/robertdebock.postfix/handlers/main.yml | 24 ++ .../meta/.galaxy_install_info | 2 + .../meta/exception.yml | 2 + .../meta/main.yml | 20 +- .../robertdebock.postfix/meta/preferences.yml | 2 + .../molecule/default/converge.yml | 14 + .../molecule/default/molecule.yml | 13 +- .../molecule/default/prepare.yml | 9 + .../molecule/default/verify.yml | 17 ++ .../requirements.yml | 0 roles/robertdebock.postfix/tasks/assert.yml | 58 +++++ roles/robertdebock.postfix/tasks/main.yml | 115 +++++++++ .../templates/main.cf.j2 | 25 +- .../templates/master.cf.j2 | 0 roles/robertdebock.postfix/tox.ini | 26 ++ .../vars/main.yml | 6 +- roles/robertdebock.python_pip/.ansible-lint | 8 + .../.github/FUNDING.yml | 2 + .../.github/ISSUE_TEMPLATE/bug_report.md | 31 +++ .../.github/ISSUE_TEMPLATE/feature_request.md | 19 ++ .../.github/pull_request_template.md} | 0 .../.github/settings.yml | 0 .../.github/workflows/galaxy.yml | 22 ++ .../.github/workflows/molecule.yml | 76 ++++++ .../.gitignore | 0 roles/robertdebock.python_pip/.travis.yml | 49 ++++ roles/robertdebock.python_pip/.yamllint | 15 ++ .../CODE_OF_CONDUCT.md | 0 roles/robertdebock.python_pip/CONTRIBUTING.md | 76 ++++++ roles/robertdebock.python_pip/LICENSE | 202 +++++++++++++++ .../README.md | 95 ++++--- .../SECURITY.md | 8 +- .../defaults/main.yml | 4 + .../meta/.galaxy_install_info | 2 + .../meta/exception.yml | 0 .../meta/main.yml | 16 +- .../meta/preferences.yml | 2 + .../molecule/default/converge.yml | 8 + .../molecule/default/molecule.yml | 14 +- .../molecule/default/prepare.yml | 10 + .../molecule/default/verify.yml | 27 ++ .../requirements.yml | 0 .../robertdebock.python_pip/tasks/assert.yml | 23 ++ .../tasks/main.yml | 23 +- roles/robertdebock.python_pip/tox.ini | 26 ++ roles/robertdebock.python_pip/vars/main.yml | 22 ++ roles/robertdebock.reboot/.ansible-lint | 6 + roles/robertdebock.reboot/.github/FUNDING.yml | 2 + .../.github/ISSUE_TEMPLATE/bug_report.md | 31 +++ .../.github/ISSUE_TEMPLATE/feature_request.md | 19 ++ .../.github/pull_request_template.md} | 0 .../.github/settings.yml | 0 .../.github/workflows/galaxy.yml | 22 ++ .../.github/workflows/molecule.yml | 78 ++++++ .../.gitignore | 0 roles/robertdebock.reboot/.travis.yml | 44 ++++ .../.yamllint | 1 + .../CODE_OF_CONDUCT.md | 0 roles/robertdebock.reboot/CONTRIBUTING.md | 76 ++++++ roles/robertdebock.reboot/LICENSE | 202 +++++++++++++++ .../{reboot => robertdebock.reboot}/README.md | 124 ++++----- .../SECURITY.md | 8 +- .../defaults/main.yml | 0 .../meta/.galaxy_install_info | 2 + .../meta/main.yml | 15 +- .../robertdebock.reboot/meta/preferences.yml | 2 + .../molecule/default/converge.yml | 8 + .../molecule/default/molecule.yml | 14 +- .../molecule/default/prepare.yml | 2 +- .../molecule/default/verify.yml | 9 + .../requirements.yml | 0 roles/robertdebock.reboot/tasks/assert.yml | 30 +++ roles/robertdebock.reboot/tasks/main.yml | 49 ++++ roles/robertdebock.reboot/tasks/reboot.yml | 20 ++ roles/robertdebock.reboot/tox.ini | 26 ++ .../vars/main.yml | 9 +- roles/robertdebock.ruby/.ansible-lint | 6 + roles/robertdebock.ruby/.github/FUNDING.yml | 2 + .../.github/ISSUE_TEMPLATE/bug_report.md | 31 +++ .../.github/ISSUE_TEMPLATE/feature_request.md | 19 ++ .../.github/pull_request_template.md} | 0 .../.github/settings.yml | 0 .../.github/workflows/galaxy.yml | 22 ++ .../.github/workflows/molecule.yml | 78 ++++++ roles/{ruby => robertdebock.ruby}/.gitignore | 0 roles/robertdebock.ruby/.travis.yml | 44 ++++ roles/{ara => robertdebock.ruby}/.yamllint | 1 + .../CODE_OF_CONDUCT.md | 0 roles/robertdebock.ruby/CONTRIBUTING.md | 76 ++++++ roles/robertdebock.ruby/LICENSE | 202 +++++++++++++++ roles/{ruby => robertdebock.ruby}/README.md | 108 ++++---- roles/{ruby => robertdebock.ruby}/SECURITY.md | 8 +- .../meta/.galaxy_install_info | 2 + .../{ruby => robertdebock.ruby}/meta/main.yml | 20 +- roles/robertdebock.ruby/meta/preferences.yml | 2 + .../molecule/default/converge.yml} | 2 +- .../molecule/default/molecule.yml | 14 +- .../molecule/default/prepare.yml | 8 + .../molecule/default/verify.yml | 9 + .../requirements.yml | 0 .../tasks/main.yml | 3 - roles/robertdebock.ruby/tox.ini | 26 ++ .../{ruby => robertdebock.ruby}/vars/main.yml | 1 + roles/robertdebock.service/.ansible-lint | 7 + .../robertdebock.service/.github/FUNDING.yml | 2 + .../.github/ISSUE_TEMPLATE/bug_report.md | 31 +++ .../.github/ISSUE_TEMPLATE/feature_request.md | 19 ++ .../.github/pull_request_template.md} | 0 .../.github/settings.yml | 0 .../.github/workflows/galaxy.yml | 22 ++ .../.github/workflows/molecule.yml | 78 ++++++ .../.gitignore | 0 roles/robertdebock.service/.travis.yml | 50 ++++ roles/robertdebock.service/.yamllint | 15 ++ .../CODE_OF_CONDUCT.md | 0 roles/robertdebock.service/CONTRIBUTING.md | 76 ++++++ roles/robertdebock.service/LICENSE | 202 +++++++++++++++ .../README.md | 115 ++++----- .../SECURITY.md | 8 +- .../defaults/main.yml | 9 +- .../handlers/main.yml | 3 + .../meta/.galaxy_install_info | 2 + .../meta/main.yml | 21 +- .../robertdebock.service/meta/preferences.yml | 2 + .../molecule/default/converge.yml} | 7 +- .../molecule/default/molecule.yml | 15 +- .../molecule/default/prepare.yml | 0 .../molecule/default/verify.yml | 2 +- .../requirements.yml | 1 - roles/robertdebock.service/tasks/assert.yml | 114 +++++++++ .../tasks/main.yml | 18 +- .../templates/.gitkeep | 0 .../templates/systemd.j2 | 14 + .../templates/sysvinit.j2 | 14 +- roles/robertdebock.service/tox.ini | 26 ++ .../vars/main.yml | 3 +- .../.ansible-lint | 5 +- roles/robertdebock.travis/.github/FUNDING.yml | 2 + .../.github/ISSUE_TEMPLATE/bug_report.md | 31 +++ .../.github/ISSUE_TEMPLATE/feature_request.md | 19 ++ .../.github/pull_request_template.md} | 0 .../.github/settings.yml | 3 + .../.github/workflows/galaxy.yml | 22 ++ .../.github/workflows/molecule.yml | 70 +++++ .../.gitignore | 0 roles/robertdebock.travis/.travis.yml | 40 +++ roles/{atom => robertdebock.travis}/.yamllint | 1 + .../CODE_OF_CONDUCT.md | 0 roles/robertdebock.travis/CONTRIBUTING.md | 76 ++++++ roles/robertdebock.travis/LICENSE | 202 +++++++++++++++ .../{travis => robertdebock.travis}/README.md | 103 ++++---- .../SECURITY.md | 8 +- .../meta/.galaxy_install_info | 2 + .../meta/exception.yml | 0 .../meta/main.yml | 18 +- .../robertdebock.travis/meta/preferences.yml | 2 + .../molecule/default/converge.yml | 8 + .../molecule/default}/molecule.yml | 17 +- .../molecule/default/prepare.yml | 0 .../molecule/default/verify.yml | 9 + .../requirements.yml | 0 .../tasks/main.yml | 6 - roles/robertdebock.travis/tox.ini | 26 ++ .../vars/main.yml | 3 +- .../.ansible-lint | 5 +- roles/robertdebock.update/.github/FUNDING.yml | 2 + .../.github/ISSUE_TEMPLATE/bug_report.md | 31 +++ .../.github/ISSUE_TEMPLATE/feature_request.md | 19 ++ .../.github/pull_request_template.md} | 0 .../.github/settings.yml | 0 .../.github/workflows/galaxy.yml | 22 ++ .../.github/workflows/molecule.yml | 78 ++++++ .../.gitignore | 0 roles/robertdebock.update/.travis.yml | 44 ++++ .../.yamllint | 1 + .../CODE_OF_CONDUCT.md | 0 roles/robertdebock.update/CONTRIBUTING.md | 76 ++++++ roles/robertdebock.update/LICENSE | 202 +++++++++++++++ .../{update => robertdebock.update}/README.md | 121 ++++----- .../SECURITY.md | 8 +- .../defaults/main.yml | 2 +- roles/robertdebock.update/handlers/main.yml | 7 + .../meta/.galaxy_install_info | 2 + .../meta/exception.yml | 0 .../meta/main.yml | 23 +- .../robertdebock.update/meta/preferences.yml | 2 + .../molecule/default/converge.yml | 8 + .../molecule/default/molecule.yml | 14 +- .../molecule/default/prepare.yml | 8 + .../molecule/default/verify.yml | 9 + .../requirements.yml | 1 - roles/robertdebock.update/tasks/assert.yml | 30 +++ .../tasks/main.yml | 51 ++-- roles/robertdebock.update/tox.ini | 26 ++ roles/robertdebock.users/.ansible-lint | 7 + roles/robertdebock.users/.github/FUNDING.yml | 2 + .../.github/ISSUE_TEMPLATE/bug_report.md | 31 +++ .../.github/ISSUE_TEMPLATE/feature_request.md | 19 ++ .../.github/pull_request_template.md} | 0 .../.github/settings.yml | 0 .../.github/workflows/galaxy.yml | 22 ++ .../.github/workflows/molecule.yml | 78 ++++++ .../{users => robertdebock.users}/.gitignore | 0 roles/robertdebock.users/.travis.yml | 50 ++++ roles/robertdebock.users/.yamllint | 15 ++ .../CODE_OF_CONDUCT.md | 0 roles/robertdebock.users/CONTRIBUTING.md | 76 ++++++ roles/robertdebock.users/LICENSE | 202 +++++++++++++++ roles/robertdebock.users/README.md | 205 +++++++++++++++ .../{users => robertdebock.users}/SECURITY.md | 8 +- roles/robertdebock.users/defaults/main.yml | 11 + .../meta/.galaxy_install_info | 2 + .../meta/main.yml | 20 +- roles/robertdebock.users/meta/preferences.yml | 2 + .../molecule/default/converge.yml | 46 ++++ .../molecule/default/molecule.yml | 13 +- .../molecule/default/prepare.yml | 9 + .../molecule/default/ssh_keys/keyuser | 0 .../molecule/default/ssh_keys/keyuser.ppk | 0 .../molecule/default/ssh_keys/keyuser.pub | 0 .../molecule/default/ssh_keys/privkeyuser | 0 .../molecule/default/ssh_keys/privkeyuser.ppk | 0 .../molecule/default/ssh_keys/privkeyuser.pub | 0 .../molecule/default/verify.yml | 15 ++ .../requirements.yml | 0 roles/robertdebock.users/tasks/assert.yml | 242 ++++++++++++++++++ .../tasks/group.yml | 0 .../tasks/main.yml | 22 +- .../tasks/user.yml | 91 +++---- .../tasks/user_authorized_key.yml | 3 +- .../templates/.gitkeep | 0 .../templates/cron.allow.j2 | 0 .../templates/sudo.j2 | 0 roles/robertdebock.users/tox.ini | 26 ++ .../vars/main.yml | 10 + roles/robertdebock.vagrant/.ansible-lint | 8 + .../robertdebock.vagrant/.github/FUNDING.yml | 2 + .../.github/ISSUE_TEMPLATE/bug_report.md | 31 +++ .../.github/ISSUE_TEMPLATE/feature_request.md | 19 ++ .../.github/pull_request_template.md} | 0 .../.github/settings.yml | 3 + .../.github/workflows/galaxy.yml | 22 ++ .../.github/workflows/molecule.yml | 72 ++++++ .../.gitignore | 0 roles/robertdebock.vagrant/.travis.yml | 47 ++++ roles/robertdebock.vagrant/.yamllint | 15 ++ .../CODE_OF_CONDUCT.md | 0 roles/robertdebock.vagrant/CONTRIBUTING.md | 76 ++++++ roles/robertdebock.vagrant/LICENSE | 202 +++++++++++++++ .../README.md | 108 ++++---- .../SECURITY.md | 8 +- .../defaults/main.yml | 2 +- .../meta/.galaxy_install_info | 2 + .../meta/exception.yml | 0 .../meta/main.yml | 21 +- .../robertdebock.vagrant/meta/preferences.yml | 2 + .../molecule/default/converge.yml | 8 + .../molecule/default}/molecule.yml | 16 +- .../molecule/default/prepare.yml | 12 + .../molecule/default/verify.yml | 9 + .../requirements.yml | 2 +- roles/robertdebock.vagrant/tasks/assert.yml | 14 + .../tasks/main.yml | 20 +- roles/robertdebock.vagrant/tox.ini | 26 ++ .../vars/main.yml | 1 + roles/ruby/.ansible-lint | 3 - .../ruby/.github/ISSUE_TEMPLATE/bug_report.md | 28 -- .../.github/ISSUE_TEMPLATE/feature_request.md | 17 -- roles/ruby/.travis.yml | 53 ---- roles/ruby/.yamllint | 11 - roles/ruby/CONTRIBUTING.md | 74 ------ roles/ruby/LICENSE | 202 --------------- roles/ruby/defaults/main.yml | 2 - roles/ruby/meta/.galaxy_install_info | 2 - roles/ruby/molecule/default/playbook.yml | 8 - roles/ruby/molecule/default/prepare.yml | 8 - roles/ruby/tox.ini | 22 -- roles/service/.ansible-lint | 3 - .../.github/ISSUE_TEMPLATE/bug_report.md | 28 -- .../.github/ISSUE_TEMPLATE/feature_request.md | 17 -- roles/service/.travis.yml | 53 ---- roles/service/.yamllint | 11 - roles/service/CONTRIBUTING.md | 74 ------ roles/service/LICENSE | 202 --------------- roles/service/meta/.galaxy_install_info | 2 - roles/service/tox.ini | 22 -- .../.github/ISSUE_TEMPLATE/bug_report.md | 28 -- .../.github/ISSUE_TEMPLATE/feature_request.md | 17 -- roles/travis/.travis.yml | 44 ---- roles/travis/.yamllint | 11 - roles/travis/CONTRIBUTING.md | 10 - roles/travis/LICENSE | 202 --------------- roles/travis/defaults/main.yml | 2 - roles/travis/meta/.galaxy_install_info | 2 - roles/travis/molecule/default/molecule.yml | 21 -- roles/travis/molecule/default/playbook.yml | 8 - roles/travis/tox.ini | 19 -- roles/update/.ansible-lint | 5 - .../.github/ISSUE_TEMPLATE/bug_report.md | 28 -- .../.github/ISSUE_TEMPLATE/feature_request.md | 17 -- roles/update/.travis.yml | 53 ---- roles/update/.yamllint | 11 - roles/update/CONTRIBUTING.md | 74 ------ roles/update/LICENSE | 202 --------------- roles/update/meta/.galaxy_install_info | 2 - roles/update/meta/exception.yml | 4 - roles/update/molecule/default/playbook.yml | 8 - roles/update/molecule/default/prepare.yml | 8 - roles/update/tox.ini | 22 -- roles/users/.ansible-lint | 3 - .../.github/ISSUE_TEMPLATE/bug_report.md | 28 -- .../.github/ISSUE_TEMPLATE/feature_request.md | 17 -- roles/users/.travis.yml | 53 ---- roles/users/.yamllint | 11 - roles/users/CONTRIBUTING.md | 74 ------ roles/users/LICENSE | 202 --------------- roles/users/README.md | 235 ----------------- roles/users/defaults/main.yml | 40 --- roles/users/meta/.galaxy_install_info | 2 - roles/users/molecule/default/playbook.yml | 47 ---- roles/users/molecule/default/prepare.yml | 9 - roles/users/templates/.gitkeep | 0 roles/users/tox.ini | 22 -- .../.github/ISSUE_TEMPLATE/bug_report.md | 28 -- .../.github/ISSUE_TEMPLATE/feature_request.md | 17 -- roles/vagrant/.travis.yml | 46 ---- roles/vagrant/.yamllint | 11 - roles/vagrant/CONTRIBUTING.md | 10 - roles/vagrant/LICENSE | 202 --------------- roles/vagrant/handlers/main.yml | 8 - roles/vagrant/meta/.galaxy_install_info | 2 - roles/vagrant/molecule/default/molecule.yml | 21 -- roles/vagrant/molecule/default/playbook.yml | 8 - roles/vagrant/tox.ini | 19 -- 896 files changed, 14178 insertions(+), 9993 deletions(-) delete mode 100644 roles/ansible/.ansible-lint delete mode 100644 roles/ansible/.github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 roles/ansible/.travis.yml delete mode 100644 roles/ansible/CONTRIBUTING.md delete mode 100644 roles/ansible/meta/.galaxy_install_info delete mode 100644 roles/ansible_lint/.ansible-lint delete mode 100644 roles/ansible_lint/.github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 roles/ansible_lint/.travis.yml delete mode 100644 roles/ansible_lint/CONTRIBUTING.md delete mode 100644 roles/ansible_lint/defaults/main.yml delete mode 100644 roles/ansible_lint/meta/.galaxy_install_info delete mode 100644 roles/ara/.ansible-lint delete mode 100644 roles/ara/.github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 roles/ara/.travis.yml delete mode 100644 roles/ara/CONTRIBUTING.md delete mode 100644 roles/ara/meta/.galaxy_install_info delete mode 100644 roles/ara/molecule/default/prepare.yml delete mode 100644 roles/atom/.ansible-lint delete mode 100644 roles/atom/.github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 roles/atom/.travis.yml delete mode 100644 roles/atom/CONTRIBUTING.md delete mode 100644 roles/atom/defaults/main.yml delete mode 100644 roles/atom/meta/.galaxy_install_info delete mode 100644 roles/atom/meta/exception.yml delete mode 100644 roles/atom/vars/main.yml delete mode 100644 roles/bootstrap/.ansible-lint delete mode 100644 roles/bootstrap/.github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 roles/bootstrap/.github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 roles/bootstrap/.travis.yml delete mode 100644 roles/bootstrap/.yamllint delete mode 100644 roles/bootstrap/LICENSE delete mode 100644 roles/bootstrap/meta/.galaxy_install_info delete mode 100644 roles/bootstrap/tox.ini delete mode 100644 roles/buildtools/.ansible-lint delete mode 100644 roles/buildtools/.github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 roles/buildtools/.github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 roles/buildtools/.travis.yml delete mode 100644 roles/buildtools/.yamllint delete mode 100644 roles/buildtools/LICENSE delete mode 100644 roles/buildtools/defaults/main.yml delete mode 100644 roles/buildtools/meta/.galaxy_install_info delete mode 100644 roles/buildtools/tox.ini delete mode 100644 roles/common/.ansible-lint delete mode 100644 roles/common/.github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 roles/common/.github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 roles/common/.travis.yml delete mode 100644 roles/common/.yamllint delete mode 100644 roles/common/LICENSE delete mode 100644 roles/common/meta/.galaxy_install_info delete mode 100644 roles/common/tasks/main.yml delete mode 100644 roles/common/tox.ini delete mode 100644 roles/docker/.ansible-lint delete mode 100644 roles/docker/.github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 roles/docker/.github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 roles/docker/.travis.yml delete mode 100644 roles/docker/.yamllint delete mode 100644 roles/docker/CONTRIBUTING.md delete mode 100644 roles/docker/LICENSE delete mode 100644 roles/docker/defaults/main.yml delete mode 100644 roles/docker/handlers/main.yml delete mode 100644 roles/docker/meta/.galaxy_install_info delete mode 100644 roles/docker/molecule/default/prepare.yml delete mode 100644 roles/docker/tox.ini delete mode 100644 roles/epel/.ansible-lint delete mode 100644 roles/epel/.github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 roles/epel/.github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 roles/epel/.travis.yml delete mode 100644 roles/epel/.yamllint delete mode 100644 roles/epel/LICENSE delete mode 100644 roles/epel/defaults/main.yml delete mode 100644 roles/epel/meta/.galaxy_install_info delete mode 100644 roles/epel/molecule/default/playbook.yml delete mode 100644 roles/epel/tasks/main.yml delete mode 100644 roles/epel/tox.ini delete mode 100644 roles/fail2ban/.ansible-lint delete mode 100644 roles/fail2ban/.github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 roles/fail2ban/.github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 roles/fail2ban/.travis.yml delete mode 100644 roles/fail2ban/.yamllint delete mode 100644 roles/fail2ban/CONTRIBUTING.md delete mode 100644 roles/fail2ban/LICENSE delete mode 100644 roles/fail2ban/meta/.galaxy_install_info delete mode 100644 roles/fail2ban/meta/exception.yml delete mode 100644 roles/fail2ban/molecule/default/playbook.yml delete mode 100644 roles/fail2ban/tox.ini delete mode 100644 roles/git/.ansible-lint delete mode 100644 roles/git/.github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 roles/git/.github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 roles/git/.travis.yml delete mode 100644 roles/git/.yamllint delete mode 100644 roles/git/CONTRIBUTING.md delete mode 100644 roles/git/LICENSE delete mode 100644 roles/git/meta/.galaxy_install_info delete mode 100644 roles/git/tox.ini delete mode 100644 roles/investigate/.ansible-lint delete mode 100644 roles/investigate/.github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 roles/investigate/.github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 roles/investigate/.travis.yml delete mode 100644 roles/investigate/.yamllint delete mode 100644 roles/investigate/CONTRIBUTING.md delete mode 100644 roles/investigate/LICENSE delete mode 100644 roles/investigate/handlers/main.yml delete mode 100644 roles/investigate/meta/.galaxy_install_info delete mode 100644 roles/investigate/molecule/default/playbook.yml delete mode 100644 roles/investigate/tox.ini delete mode 100644 roles/molecule/.ansible-lint delete mode 100644 roles/molecule/.github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 roles/molecule/.github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 roles/molecule/.travis.yml delete mode 100644 roles/molecule/.yamllint delete mode 100644 roles/molecule/CONTRIBUTING.md delete mode 100644 roles/molecule/LICENSE delete mode 100644 roles/molecule/meta/.galaxy_install_info delete mode 100644 roles/molecule/molecule/default/playbook.yml delete mode 100644 roles/molecule/tox.ini delete mode 100644 roles/postfix/.ansible-lint delete mode 100644 roles/postfix/.github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 roles/postfix/.github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 roles/postfix/.travis.yml delete mode 100644 roles/postfix/.yamllint delete mode 100644 roles/postfix/CONTRIBUTING.md delete mode 100644 roles/postfix/LICENSE delete mode 100644 roles/postfix/handlers/main.yml delete mode 100644 roles/postfix/meta/.galaxy_install_info delete mode 100644 roles/postfix/molecule/default/playbook.yml delete mode 100644 roles/postfix/molecule/default/prepare.yml delete mode 100644 roles/postfix/tasks/main.yml delete mode 100644 roles/postfix/tox.ini delete mode 100644 roles/python_pip/.ansible-lint delete mode 100644 roles/python_pip/.github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 roles/python_pip/.github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 roles/python_pip/.travis.yml delete mode 100644 roles/python_pip/.yamllint delete mode 100644 roles/python_pip/CONTRIBUTING.md delete mode 100644 roles/python_pip/LICENSE delete mode 100644 roles/python_pip/meta/.galaxy_install_info delete mode 100644 roles/python_pip/molecule/default/playbook.yml delete mode 100644 roles/python_pip/molecule/default/prepare.yml delete mode 100644 roles/python_pip/molecule/default/verify.yml delete mode 100644 roles/python_pip/tox.ini delete mode 100644 roles/python_pip/vars/main.yml delete mode 100644 roles/reboot/.ansible-lint delete mode 100644 roles/reboot/.github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 roles/reboot/.github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 roles/reboot/.travis.yml delete mode 100644 roles/reboot/.yamllint delete mode 100644 roles/reboot/CONTRIBUTING.md delete mode 100644 roles/reboot/LICENSE delete mode 100644 roles/reboot/handlers/main.yml delete mode 100644 roles/reboot/meta/.galaxy_install_info delete mode 100644 roles/reboot/meta/exception.yml delete mode 100644 roles/reboot/molecule/default/playbook.yml delete mode 100644 roles/reboot/tasks/main.yml delete mode 100644 roles/reboot/tox.ini create mode 100644 roles/robertdebock.ansible/.ansible-lint create mode 100644 roles/robertdebock.ansible/.github/FUNDING.yml rename roles/{ara => robertdebock.ansible}/.github/ISSUE_TEMPLATE/bug_report.md (72%) create mode 100644 roles/robertdebock.ansible/.github/ISSUE_TEMPLATE/feature_request.md rename roles/{ansible/PULL_REQUEST_TEMPLATE.md => robertdebock.ansible/.github/pull_request_template.md} (100%) rename roles/{ansible => robertdebock.ansible}/.github/settings.yml (100%) create mode 100644 roles/robertdebock.ansible/.github/workflows/galaxy.yml create mode 100644 roles/robertdebock.ansible/.github/workflows/molecule.yml rename roles/{ansible => robertdebock.ansible}/.gitignore (100%) create mode 100644 roles/robertdebock.ansible/.travis.yml create mode 100644 roles/robertdebock.ansible/.yamllint rename roles/{ansible => robertdebock.ansible}/CODE_OF_CONDUCT.md (100%) create mode 100644 roles/robertdebock.ansible/CONTRIBUTING.md rename roles/{ansible => robertdebock.ansible}/LICENSE (99%) rename roles/{ansible => robertdebock.ansible}/README.md (64%) rename roles/{ansible => robertdebock.ansible}/SECURITY.md (76%) rename roles/{ansible => robertdebock.ansible}/defaults/main.yml (94%) create mode 100644 roles/robertdebock.ansible/meta/.galaxy_install_info rename roles/{ansible => robertdebock.ansible}/meta/exception.yml (100%) rename roles/{ansible => robertdebock.ansible}/meta/main.yml (80%) create mode 100644 roles/robertdebock.ansible/meta/preferences.yml create mode 100644 roles/robertdebock.ansible/molecule/default/converge.yml rename roles/{ansible => robertdebock.ansible}/molecule/default/molecule.yml (78%) rename roles/{ansible => robertdebock.ansible}/molecule/default/prepare.yml (100%) rename roles/{ansible => robertdebock.ansible}/molecule/default/verify.yml (100%) rename roles/{ansible_lint => robertdebock.ansible}/requirements.yml (100%) create mode 100644 roles/robertdebock.ansible/tasks/assert.yml rename roles/{ansible => robertdebock.ansible}/tasks/main.yml (74%) rename roles/{ansible => robertdebock.ansible}/tox.ini (54%) rename roles/{ansible => robertdebock.ansible}/vars/main.yml (99%) create mode 100644 roles/robertdebock.ansible_lint/.ansible-lint create mode 100644 roles/robertdebock.ansible_lint/.github/FUNDING.yml rename roles/{ansible => robertdebock.ansible_lint}/.github/ISSUE_TEMPLATE/bug_report.md (72%) create mode 100644 roles/robertdebock.ansible_lint/.github/ISSUE_TEMPLATE/feature_request.md rename roles/{ansible_lint/PULL_REQUEST_TEMPLATE.md => robertdebock.ansible_lint/.github/pull_request_template.md} (100%) rename roles/{ansible_lint => robertdebock.ansible_lint}/.github/settings.yml (100%) create mode 100644 roles/robertdebock.ansible_lint/.github/workflows/galaxy.yml create mode 100644 roles/robertdebock.ansible_lint/.github/workflows/molecule.yml rename roles/{ansible_lint => robertdebock.ansible_lint}/.gitignore (100%) create mode 100644 roles/robertdebock.ansible_lint/.travis.yml create mode 100644 roles/robertdebock.ansible_lint/.yamllint rename roles/{ansible_lint => robertdebock.ansible_lint}/CODE_OF_CONDUCT.md (100%) create mode 100644 roles/robertdebock.ansible_lint/CONTRIBUTING.md rename roles/{ansible_lint => robertdebock.ansible_lint}/LICENSE (99%) rename roles/{ansible_lint => robertdebock.ansible_lint}/README.md (59%) rename roles/{ansible_lint => robertdebock.ansible_lint}/SECURITY.md (76%) create mode 100644 roles/robertdebock.ansible_lint/meta/.galaxy_install_info rename roles/{ansible_lint => robertdebock.ansible_lint}/meta/exception.yml (100%) rename roles/{ansible_lint => robertdebock.ansible_lint}/meta/main.yml (71%) create mode 100644 roles/robertdebock.ansible_lint/meta/preferences.yml create mode 100644 roles/robertdebock.ansible_lint/molecule/default/converge.yml rename roles/{ansible_lint => robertdebock.ansible_lint}/molecule/default/molecule.yml (74%) rename roles/{ansible_lint => robertdebock.ansible_lint}/molecule/default/prepare.yml (100%) create mode 100644 roles/robertdebock.ansible_lint/molecule/default/verify.yml rename roles/{molecule => robertdebock.ansible_lint}/requirements.yml (100%) rename roles/{ansible_lint => robertdebock.ansible_lint}/tasks/main.yml (52%) rename roles/{ara => robertdebock.ansible_lint}/tox.ini (54%) rename roles/{ansible_lint => robertdebock.ansible_lint}/vars/main.yml (98%) create mode 100644 roles/robertdebock.ara/.ansible-lint create mode 100644 roles/robertdebock.ara/.github/FUNDING.yml rename roles/{atom => robertdebock.ara}/.github/ISSUE_TEMPLATE/bug_report.md (72%) create mode 100644 roles/robertdebock.ara/.github/ISSUE_TEMPLATE/feature_request.md rename roles/{ara/PULL_REQUEST_TEMPLATE.md => robertdebock.ara/.github/pull_request_template.md} (100%) rename roles/{ara => robertdebock.ara}/.github/settings.yml (100%) create mode 100644 roles/robertdebock.ara/.github/workflows/galaxy.yml create mode 100644 roles/robertdebock.ara/.github/workflows/molecule.yml rename roles/{ara => robertdebock.ara}/.gitignore (100%) create mode 100644 roles/robertdebock.ara/.travis.yml create mode 100644 roles/robertdebock.ara/.yamllint rename roles/{ara => robertdebock.ara}/CODE_OF_CONDUCT.md (100%) rename roles/{buildtools => robertdebock.ara}/CONTRIBUTING.md (72%) rename roles/{ara => robertdebock.ara}/LICENSE (99%) rename roles/{ara => robertdebock.ara}/README.md (63%) rename roles/{ara => robertdebock.ara}/SECURITY.md (76%) rename roles/{ara => robertdebock.ara}/defaults/main.yml (80%) rename roles/{ara => robertdebock.ara}/handlers/main.yml (100%) create mode 100644 roles/robertdebock.ara/meta/.galaxy_install_info rename roles/{ara => robertdebock.ara}/meta/exception.yml (100%) rename roles/{ara => robertdebock.ara}/meta/main.yml (83%) create mode 100644 roles/robertdebock.ara/meta/preferences.yml rename roles/{common/molecule/default/playbook.yml => robertdebock.ara/molecule/default/converge.yml} (72%) rename roles/{ara => robertdebock.ara}/molecule/default/molecule.yml (73%) create mode 100644 roles/robertdebock.ara/molecule/default/prepare.yml create mode 100644 roles/robertdebock.ara/molecule/default/verify.yml rename roles/{ara => robertdebock.ara}/requirements.yml (100%) create mode 100644 roles/robertdebock.ara/tasks/assert.yml rename roles/{ara => robertdebock.ara}/tasks/main.yml (88%) rename roles/{atom => robertdebock.ara}/tox.ini (54%) rename roles/{ara => robertdebock.ara}/vars/main.yml (99%) create mode 100644 roles/robertdebock.atom/.ansible-lint create mode 100644 roles/robertdebock.atom/.github/FUNDING.yml rename roles/{ansible_lint => robertdebock.atom}/.github/ISSUE_TEMPLATE/bug_report.md (72%) create mode 100644 roles/robertdebock.atom/.github/ISSUE_TEMPLATE/feature_request.md rename roles/{atom/PULL_REQUEST_TEMPLATE.md => robertdebock.atom/.github/pull_request_template.md} (100%) rename roles/{atom => robertdebock.atom}/.github/settings.yml (100%) create mode 100644 roles/robertdebock.atom/.github/workflows/galaxy.yml create mode 100644 roles/robertdebock.atom/.github/workflows/molecule.yml rename roles/{atom => robertdebock.atom}/.gitignore (100%) create mode 100644 roles/robertdebock.atom/.travis.yml create mode 100644 roles/robertdebock.atom/.yamllint rename roles/{atom => robertdebock.atom}/CODE_OF_CONDUCT.md (100%) rename roles/{bootstrap => robertdebock.atom}/CONTRIBUTING.md (72%) rename roles/{atom => robertdebock.atom}/LICENSE (99%) rename roles/{atom => robertdebock.atom}/README.md (55%) rename roles/{atom => robertdebock.atom}/SECURITY.md (76%) create mode 100644 roles/robertdebock.atom/defaults/main.yml create mode 100644 roles/robertdebock.atom/meta/.galaxy_install_info create mode 100644 roles/robertdebock.atom/meta/exception.yml rename roles/{atom => robertdebock.atom}/meta/main.yml (66%) create mode 100644 roles/robertdebock.atom/meta/preferences.yml rename roles/{buildtools/molecule/default/playbook.yml => robertdebock.atom/molecule/default/converge.yml} (72%) rename roles/{atom => robertdebock.atom}/molecule/default/molecule.yml (73%) rename roles/{atom => robertdebock.atom}/molecule/default/prepare.yml (100%) create mode 100644 roles/robertdebock.atom/molecule/default/verify.yml rename roles/{atom => robertdebock.atom}/requirements.yml (100%) create mode 100644 roles/robertdebock.atom/tasks/assert.yml rename roles/{atom => robertdebock.atom}/tasks/main.yml (77%) rename roles/{ansible_lint => robertdebock.atom}/tox.ini (54%) create mode 100644 roles/robertdebock.atom/vars/main.yml create mode 100644 roles/robertdebock.bootstrap/.ansible-lint create mode 100644 roles/robertdebock.bootstrap/.github/FUNDING.yml create mode 100644 roles/robertdebock.bootstrap/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 roles/robertdebock.bootstrap/.github/ISSUE_TEMPLATE/feature_request.md rename roles/{bootstrap/PULL_REQUEST_TEMPLATE.md => robertdebock.bootstrap/.github/pull_request_template.md} (100%) rename roles/{bootstrap => robertdebock.bootstrap}/.github/settings.yml (100%) create mode 100644 roles/robertdebock.bootstrap/.github/workflows/galaxy.yml create mode 100644 roles/robertdebock.bootstrap/.github/workflows/molecule.yml rename roles/{bootstrap => robertdebock.bootstrap}/.gitignore (100%) create mode 100644 roles/robertdebock.bootstrap/.travis.yml create mode 100644 roles/robertdebock.bootstrap/.yamllint rename roles/{bootstrap => robertdebock.bootstrap}/CODE_OF_CONDUCT.md (100%) create mode 100644 roles/robertdebock.bootstrap/CONTRIBUTING.md create mode 100644 roles/robertdebock.bootstrap/LICENSE rename roles/{bootstrap => robertdebock.bootstrap}/README.md (58%) rename roles/{bootstrap => robertdebock.bootstrap}/SECURITY.md (76%) rename roles/{bootstrap => robertdebock.bootstrap}/defaults/main.yml (100%) create mode 100644 roles/robertdebock.bootstrap/meta/.galaxy_install_info rename roles/{bootstrap => robertdebock.bootstrap}/meta/main.yml (80%) create mode 100644 roles/robertdebock.bootstrap/meta/preferences.yml rename roles/{bootstrap/molecule/default/playbook.yml => robertdebock.bootstrap/molecule/default/converge.yml} (68%) rename roles/{bootstrap => robertdebock.bootstrap}/molecule/default/molecule.yml (78%) rename roles/{bootstrap => robertdebock.bootstrap}/molecule/default/verify.yml (82%) create mode 100644 roles/robertdebock.bootstrap/tasks/assert.yml rename roles/{bootstrap => robertdebock.bootstrap}/tasks/gather_facts.yml (88%) rename roles/{bootstrap => robertdebock.bootstrap}/tasks/main.yml (72%) create mode 100644 roles/robertdebock.bootstrap/tox.ini rename roles/{bootstrap => robertdebock.bootstrap}/vars/main.yml (99%) create mode 100644 roles/robertdebock.buildtools/.ansible-lint create mode 100644 roles/robertdebock.buildtools/.github/FUNDING.yml create mode 100644 roles/robertdebock.buildtools/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 roles/robertdebock.buildtools/.github/ISSUE_TEMPLATE/feature_request.md rename roles/{buildtools/PULL_REQUEST_TEMPLATE.md => robertdebock.buildtools/.github/pull_request_template.md} (100%) rename roles/{buildtools => robertdebock.buildtools}/.github/settings.yml (100%) create mode 100644 roles/robertdebock.buildtools/.github/workflows/galaxy.yml create mode 100644 roles/robertdebock.buildtools/.github/workflows/molecule.yml rename roles/{buildtools => robertdebock.buildtools}/.gitignore (100%) create mode 100644 roles/robertdebock.buildtools/.travis.yml create mode 100644 roles/robertdebock.buildtools/.yamllint rename roles/{buildtools => robertdebock.buildtools}/CODE_OF_CONDUCT.md (100%) create mode 100644 roles/robertdebock.buildtools/CONTRIBUTING.md create mode 100644 roles/robertdebock.buildtools/LICENSE rename roles/{buildtools => robertdebock.buildtools}/README.md (67%) rename roles/{buildtools => robertdebock.buildtools}/SECURITY.md (76%) create mode 100644 roles/robertdebock.buildtools/meta/.galaxy_install_info rename roles/{buildtools => robertdebock.buildtools}/meta/exception.yml (100%) rename roles/{buildtools => robertdebock.buildtools}/meta/main.yml (84%) create mode 100644 roles/robertdebock.buildtools/meta/preferences.yml create mode 100644 roles/robertdebock.buildtools/molecule/default/converge.yml rename roles/{buildtools => robertdebock.buildtools}/molecule/default/molecule.yml (78%) rename roles/{reboot => robertdebock.buildtools}/molecule/default/prepare.yml (68%) rename roles/{buildtools => robertdebock.buildtools}/molecule/default/verify.yml (100%) rename roles/{buildtools => robertdebock.buildtools}/requirements.yml (100%) rename roles/{buildtools => robertdebock.buildtools}/tasks/main.yml (54%) create mode 100644 roles/robertdebock.buildtools/tox.ini rename roles/{buildtools => robertdebock.buildtools}/vars/main.yml (78%) create mode 100644 roles/robertdebock.common/.ansible-lint create mode 100644 roles/robertdebock.common/.github/FUNDING.yml create mode 100644 roles/robertdebock.common/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 roles/robertdebock.common/.github/ISSUE_TEMPLATE/feature_request.md rename roles/{common/PULL_REQUEST_TEMPLATE.md => robertdebock.common/.github/pull_request_template.md} (100%) rename roles/{common => robertdebock.common}/.github/settings.yml (100%) create mode 100644 roles/robertdebock.common/.github/workflows/galaxy.yml create mode 100644 roles/robertdebock.common/.github/workflows/molecule.yml rename roles/{common => robertdebock.common}/.gitignore (100%) create mode 100644 roles/robertdebock.common/.travis.yml create mode 100644 roles/robertdebock.common/.yamllint rename roles/{common => robertdebock.common}/CODE_OF_CONDUCT.md (100%) create mode 100644 roles/robertdebock.common/CONTRIBUTING.md rename roles/{common => robertdebock.common}/INSTALL.md (100%) create mode 100644 roles/robertdebock.common/LICENSE rename roles/{common => robertdebock.common}/README.md (55%) rename roles/{common => robertdebock.common}/SECURITY.md (76%) rename roles/{common => robertdebock.common}/defaults/main.yml (85%) rename roles/{common => robertdebock.common}/handlers/main.yml (72%) create mode 100644 roles/robertdebock.common/meta/.galaxy_install_info create mode 100644 roles/robertdebock.common/meta/exception.yml rename roles/{common => robertdebock.common}/meta/main.yml (80%) create mode 100644 roles/robertdebock.common/meta/preferences.yml rename roles/{ansible_lint/molecule/default/playbook.yml => robertdebock.common/molecule/default/converge.yml} (70%) rename roles/{common => robertdebock.common}/molecule/default/molecule.yml (73%) rename roles/{buildtools => robertdebock.common}/molecule/default/prepare.yml (68%) create mode 100644 roles/robertdebock.common/molecule/default/verify.yml rename roles/{epel => robertdebock.common}/requirements.yml (100%) create mode 100644 roles/robertdebock.common/tasks/assert.yml create mode 100644 roles/robertdebock.common/tasks/main.yml rename roles/{common => robertdebock.common}/templates/.gitkeep (100%) rename roles/{common => robertdebock.common}/templates/hosts.j2 (85%) create mode 100644 roles/robertdebock.common/tox.ini rename roles/{common => robertdebock.common}/vars/main.yml (92%) create mode 100644 roles/robertdebock.docker/.ansible-lint create mode 100644 roles/robertdebock.docker/.github/FUNDING.yml create mode 100644 roles/robertdebock.docker/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 roles/robertdebock.docker/.github/ISSUE_TEMPLATE/feature_request.md rename roles/{docker/PULL_REQUEST_TEMPLATE.md => robertdebock.docker/.github/pull_request_template.md} (100%) rename roles/{docker => robertdebock.docker}/.github/settings.yml (100%) create mode 100644 roles/robertdebock.docker/.github/workflows/galaxy.yml create mode 100644 roles/robertdebock.docker/.github/workflows/molecule.yml rename roles/{docker => robertdebock.docker}/.gitignore (100%) create mode 100644 roles/robertdebock.docker/.travis.yml create mode 100644 roles/robertdebock.docker/.yamllint rename roles/{docker => robertdebock.docker}/CODE_OF_CONDUCT.md (100%) create mode 100644 roles/robertdebock.docker/CONTRIBUTING.md create mode 100644 roles/robertdebock.docker/LICENSE rename roles/{docker => robertdebock.docker}/README.md (58%) rename roles/{docker => robertdebock.docker}/SECURITY.md (76%) create mode 100644 roles/robertdebock.docker/handlers/main.yml create mode 100644 roles/robertdebock.docker/meta/.galaxy_install_info rename roles/{docker => robertdebock.docker}/meta/exception.yml (100%) rename roles/{docker => robertdebock.docker}/meta/main.yml (79%) create mode 100644 roles/robertdebock.docker/meta/preferences.yml rename roles/{atom/molecule/default/playbook.yml => robertdebock.docker/molecule/default/converge.yml} (70%) rename roles/{docker => robertdebock.docker}/molecule/default/molecule.yml (73%) rename roles/{vagrant => robertdebock.docker}/molecule/default/prepare.yml (100%) rename roles/{docker/molecule/default/playbook.yml => robertdebock.docker/molecule/default/verify.yml} (63%) rename roles/{docker => robertdebock.docker}/requirements.yml (100%) rename roles/{docker => robertdebock.docker}/tasks/main.yml (58%) create mode 100644 roles/robertdebock.docker/tox.ini rename roles/{docker => robertdebock.docker}/vars/main.yml (75%) create mode 100644 roles/robertdebock.epel/.ansible-lint create mode 100644 roles/robertdebock.epel/.github/FUNDING.yml create mode 100644 roles/robertdebock.epel/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 roles/robertdebock.epel/.github/ISSUE_TEMPLATE/feature_request.md rename roles/{epel/PULL_REQUEST_TEMPLATE.md => robertdebock.epel/.github/pull_request_template.md} (100%) rename roles/{epel => robertdebock.epel}/.github/settings.yml (100%) create mode 100644 roles/robertdebock.epel/.github/workflows/galaxy.yml create mode 100644 roles/robertdebock.epel/.github/workflows/molecule.yml rename roles/{epel => robertdebock.epel}/.gitignore (100%) create mode 100644 roles/robertdebock.epel/.travis.yml create mode 100644 roles/robertdebock.epel/.yamllint rename roles/{epel => robertdebock.epel}/CODE_OF_CONDUCT.md (100%) rename roles/{epel => robertdebock.epel}/CONTRIBUTING.md (72%) create mode 100644 roles/robertdebock.epel/LICENSE rename roles/{epel => robertdebock.epel}/README.md (58%) rename roles/{epel => robertdebock.epel}/SECURITY.md (76%) create mode 100644 roles/robertdebock.epel/handlers/main.yml create mode 100644 roles/robertdebock.epel/meta/.galaxy_install_info rename roles/{epel => robertdebock.epel}/meta/main.yml (100%) create mode 100644 roles/robertdebock.epel/meta/preferences.yml rename roles/{ansible/molecule/default/playbook.yml => robertdebock.epel/molecule/default/converge.yml} (72%) rename roles/{epel => robertdebock.epel}/molecule/default/molecule.yml (78%) rename roles/{common => robertdebock.epel}/molecule/default/prepare.yml (68%) rename roles/{epel => robertdebock.epel}/molecule/default/verify.yml (77%) rename roles/{git => robertdebock.epel}/requirements.yml (100%) create mode 100644 roles/robertdebock.epel/tasks/main.yml create mode 100644 roles/robertdebock.epel/tox.ini rename roles/{epel => robertdebock.epel}/vars/main.yml (79%) create mode 100644 roles/robertdebock.fail2ban/.ansible-lint create mode 100644 roles/robertdebock.fail2ban/.github/FUNDING.yml create mode 100644 roles/robertdebock.fail2ban/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 roles/robertdebock.fail2ban/.github/ISSUE_TEMPLATE/feature_request.md rename roles/{fail2ban/PULL_REQUEST_TEMPLATE.md => robertdebock.fail2ban/.github/pull_request_template.md} (100%) rename roles/{fail2ban => robertdebock.fail2ban}/.github/settings.yml (100%) create mode 100644 roles/robertdebock.fail2ban/.github/workflows/galaxy.yml create mode 100644 roles/robertdebock.fail2ban/.github/workflows/molecule.yml rename roles/{fail2ban => robertdebock.fail2ban}/.gitignore (100%) create mode 100644 roles/robertdebock.fail2ban/.travis.yml create mode 100644 roles/robertdebock.fail2ban/.yamllint rename roles/{fail2ban => robertdebock.fail2ban}/CODE_OF_CONDUCT.md (100%) create mode 100644 roles/robertdebock.fail2ban/CONTRIBUTING.md create mode 100644 roles/robertdebock.fail2ban/LICENSE rename roles/{fail2ban => robertdebock.fail2ban}/README.md (55%) rename roles/{fail2ban => robertdebock.fail2ban}/SECURITY.md (76%) rename roles/{fail2ban => robertdebock.fail2ban}/defaults/main.yml (88%) rename roles/{fail2ban => robertdebock.fail2ban}/handlers/main.yml (100%) create mode 100644 roles/robertdebock.fail2ban/meta/.galaxy_install_info create mode 100644 roles/robertdebock.fail2ban/meta/exception.yml rename roles/{fail2ban => robertdebock.fail2ban}/meta/main.yml (82%) create mode 100644 roles/robertdebock.fail2ban/meta/preferences.yml create mode 100644 roles/robertdebock.fail2ban/molecule/default/converge.yml rename roles/{fail2ban => robertdebock.fail2ban}/molecule/default/molecule.yml (73%) rename roles/{investigate => robertdebock.fail2ban}/molecule/default/prepare.yml (100%) create mode 100644 roles/robertdebock.fail2ban/molecule/default/verify.yml rename roles/{fail2ban => robertdebock.fail2ban}/requirements.yml (100%) create mode 100644 roles/robertdebock.fail2ban/tasks/assert.yml rename roles/{fail2ban => robertdebock.fail2ban}/tasks/main.yml (62%) create mode 100644 roles/robertdebock.fail2ban/tox.ini rename roles/{fail2ban => robertdebock.fail2ban}/vars/main.yml (99%) create mode 100644 roles/robertdebock.git/.ansible-lint create mode 100644 roles/robertdebock.git/.github/FUNDING.yml create mode 100644 roles/robertdebock.git/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 roles/robertdebock.git/.github/ISSUE_TEMPLATE/feature_request.md rename roles/{git/PULL_REQUEST_TEMPLATE.md => robertdebock.git/.github/pull_request_template.md} (100%) rename roles/{git => robertdebock.git}/.github/settings.yml (100%) create mode 100644 roles/robertdebock.git/.github/workflows/galaxy.yml create mode 100644 roles/robertdebock.git/.github/workflows/molecule.yml rename roles/{git => robertdebock.git}/.gitignore (100%) create mode 100644 roles/robertdebock.git/.travis.yml create mode 100644 roles/robertdebock.git/.yamllint rename roles/{git => robertdebock.git}/CODE_OF_CONDUCT.md (100%) rename roles/{common => robertdebock.git}/CONTRIBUTING.md (72%) create mode 100644 roles/robertdebock.git/LICENSE rename roles/{git => robertdebock.git}/README.md (62%) rename roles/{git => robertdebock.git}/SECURITY.md (76%) rename roles/{git => robertdebock.git}/defaults/main.yml (87%) create mode 100644 roles/robertdebock.git/meta/.galaxy_install_info rename roles/{git => robertdebock.git}/meta/main.yml (81%) create mode 100644 roles/robertdebock.git/meta/preferences.yml rename roles/{git/molecule/default/playbook.yml => robertdebock.git/molecule/default/converge.yml} (94%) rename roles/{git => robertdebock.git}/molecule/default/molecule.yml (73%) rename roles/{git => robertdebock.git}/molecule/default/prepare.yml (100%) create mode 100644 roles/robertdebock.git/molecule/default/verify.yml rename roles/{reboot => robertdebock.git}/requirements.yml (100%) create mode 100644 roles/robertdebock.git/tasks/assert.yml rename roles/{git => robertdebock.git}/tasks/main.yml (92%) rename roles/{git => robertdebock.git}/templates/gitconfig.j2 (100%) create mode 100644 roles/robertdebock.git/tox.ini rename roles/{git => robertdebock.git}/vars/main.yml (97%) create mode 100644 roles/robertdebock.investigate/.ansible-lint create mode 100644 roles/robertdebock.investigate/.github/FUNDING.yml create mode 100644 roles/robertdebock.investigate/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 roles/robertdebock.investigate/.github/ISSUE_TEMPLATE/feature_request.md rename roles/{investigate/PULL_REQUEST_TEMPLATE.md => robertdebock.investigate/.github/pull_request_template.md} (100%) rename roles/{investigate => robertdebock.investigate}/.github/settings.yml (100%) create mode 100644 roles/robertdebock.investigate/.github/workflows/galaxy.yml create mode 100644 roles/robertdebock.investigate/.github/workflows/molecule.yml rename roles/{investigate => robertdebock.investigate}/.gitignore (100%) create mode 100644 roles/robertdebock.investigate/.travis.yml create mode 100644 roles/robertdebock.investigate/.yamllint rename roles/{investigate => robertdebock.investigate}/CODE_OF_CONDUCT.md (100%) create mode 100644 roles/robertdebock.investigate/CONTRIBUTING.md create mode 100644 roles/robertdebock.investigate/LICENSE rename roles/{investigate => robertdebock.investigate}/README.md (55%) rename roles/{investigate => robertdebock.investigate}/SECURITY.md (76%) create mode 100644 roles/robertdebock.investigate/meta/.galaxy_install_info rename roles/{investigate => robertdebock.investigate}/meta/main.yml (81%) create mode 100644 roles/robertdebock.investigate/meta/preferences.yml create mode 100644 roles/robertdebock.investigate/molecule/default/converge.yml rename roles/{investigate => robertdebock.investigate}/molecule/default/molecule.yml (73%) rename roles/{fail2ban => robertdebock.investigate}/molecule/default/prepare.yml (53%) create mode 100644 roles/robertdebock.investigate/molecule/default/verify.yml rename roles/{investigate => robertdebock.investigate}/requirements.yml (100%) rename roles/{investigate => robertdebock.investigate}/tasks/main.yml (55%) create mode 100644 roles/robertdebock.investigate/tox.ini rename roles/{investigate => robertdebock.investigate}/vars/main.yml (85%) create mode 100644 roles/robertdebock.molecule/.ansible-lint create mode 100644 roles/robertdebock.molecule/.github/FUNDING.yml create mode 100644 roles/robertdebock.molecule/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 roles/robertdebock.molecule/.github/ISSUE_TEMPLATE/feature_request.md rename roles/{molecule/PULL_REQUEST_TEMPLATE.md => robertdebock.molecule/.github/pull_request_template.md} (100%) rename roles/{molecule => robertdebock.molecule}/.github/settings.yml (100%) create mode 100644 roles/robertdebock.molecule/.github/workflows/galaxy.yml create mode 100644 roles/robertdebock.molecule/.github/workflows/molecule.yml rename roles/{molecule => robertdebock.molecule}/.gitignore (100%) create mode 100644 roles/robertdebock.molecule/.travis.yml create mode 100644 roles/robertdebock.molecule/.yamllint rename roles/{molecule => robertdebock.molecule}/CODE_OF_CONDUCT.md (100%) create mode 100644 roles/robertdebock.molecule/CONTRIBUTING.md create mode 100644 roles/robertdebock.molecule/LICENSE rename roles/{molecule => robertdebock.molecule}/README.md (60%) rename roles/{molecule => robertdebock.molecule}/SECURITY.md (76%) rename roles/{molecule => robertdebock.molecule}/defaults/main.yml (99%) create mode 100644 roles/robertdebock.molecule/meta/.galaxy_install_info rename roles/{molecule => robertdebock.molecule}/meta/exception.yml (67%) rename roles/{molecule => robertdebock.molecule}/meta/main.yml (75%) create mode 100644 roles/robertdebock.molecule/meta/preferences.yml create mode 100644 roles/robertdebock.molecule/molecule/default/converge.yml rename roles/{molecule => robertdebock.molecule}/molecule/default/molecule.yml (73%) rename roles/{molecule => robertdebock.molecule}/molecule/default/prepare.yml (100%) create mode 100644 roles/robertdebock.molecule/molecule/default/verify.yml rename roles/{ansible => robertdebock.molecule}/requirements.yml (100%) create mode 100644 roles/robertdebock.molecule/tasks/assert.yml rename roles/{molecule => robertdebock.molecule}/tasks/main.yml (54%) create mode 100644 roles/robertdebock.molecule/tox.ini rename roles/{molecule => robertdebock.molecule}/vars/main.yml (95%) create mode 100644 roles/robertdebock.postfix/.ansible-lint create mode 100644 roles/robertdebock.postfix/.github/FUNDING.yml create mode 100644 roles/robertdebock.postfix/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 roles/robertdebock.postfix/.github/ISSUE_TEMPLATE/feature_request.md rename roles/{postfix/PULL_REQUEST_TEMPLATE.md => robertdebock.postfix/.github/pull_request_template.md} (100%) rename roles/{postfix => robertdebock.postfix}/.github/settings.yml (100%) create mode 100644 roles/robertdebock.postfix/.github/workflows/galaxy.yml create mode 100644 roles/robertdebock.postfix/.github/workflows/molecule.yml rename roles/{postfix => robertdebock.postfix}/.gitignore (100%) create mode 100644 roles/robertdebock.postfix/.travis.yml create mode 100644 roles/robertdebock.postfix/.yamllint rename roles/{postfix => robertdebock.postfix}/CODE_OF_CONDUCT.md (100%) create mode 100644 roles/robertdebock.postfix/CONTRIBUTING.md create mode 100644 roles/robertdebock.postfix/LICENSE rename roles/{postfix => robertdebock.postfix}/README.md (57%) rename roles/{postfix => robertdebock.postfix}/SECURITY.md (76%) rename roles/{postfix => robertdebock.postfix}/defaults/main.yml (71%) create mode 100644 roles/robertdebock.postfix/files/my-postfix.te create mode 100644 roles/robertdebock.postfix/handlers/main.yml create mode 100644 roles/robertdebock.postfix/meta/.galaxy_install_info rename roles/{postfix => robertdebock.postfix}/meta/exception.yml (57%) rename roles/{postfix => robertdebock.postfix}/meta/main.yml (80%) create mode 100644 roles/robertdebock.postfix/meta/preferences.yml create mode 100644 roles/robertdebock.postfix/molecule/default/converge.yml rename roles/{postfix => robertdebock.postfix}/molecule/default/molecule.yml (73%) create mode 100644 roles/robertdebock.postfix/molecule/default/prepare.yml create mode 100644 roles/robertdebock.postfix/molecule/default/verify.yml rename roles/{postfix => robertdebock.postfix}/requirements.yml (100%) create mode 100644 roles/robertdebock.postfix/tasks/assert.yml create mode 100644 roles/robertdebock.postfix/tasks/main.yml rename roles/{postfix => robertdebock.postfix}/templates/main.cf.j2 (95%) rename roles/{postfix => robertdebock.postfix}/templates/master.cf.j2 (100%) create mode 100644 roles/robertdebock.postfix/tox.ini rename roles/{postfix => robertdebock.postfix}/vars/main.yml (82%) create mode 100644 roles/robertdebock.python_pip/.ansible-lint create mode 100644 roles/robertdebock.python_pip/.github/FUNDING.yml create mode 100644 roles/robertdebock.python_pip/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 roles/robertdebock.python_pip/.github/ISSUE_TEMPLATE/feature_request.md rename roles/{python_pip/PULL_REQUEST_TEMPLATE.md => robertdebock.python_pip/.github/pull_request_template.md} (100%) rename roles/{python_pip => robertdebock.python_pip}/.github/settings.yml (100%) create mode 100644 roles/robertdebock.python_pip/.github/workflows/galaxy.yml create mode 100644 roles/robertdebock.python_pip/.github/workflows/molecule.yml rename roles/{python_pip => robertdebock.python_pip}/.gitignore (100%) create mode 100644 roles/robertdebock.python_pip/.travis.yml create mode 100644 roles/robertdebock.python_pip/.yamllint rename roles/{python_pip => robertdebock.python_pip}/CODE_OF_CONDUCT.md (100%) create mode 100644 roles/robertdebock.python_pip/CONTRIBUTING.md create mode 100644 roles/robertdebock.python_pip/LICENSE rename roles/{python_pip => robertdebock.python_pip}/README.md (57%) rename roles/{python_pip => robertdebock.python_pip}/SECURITY.md (76%) rename roles/{python_pip => robertdebock.python_pip}/defaults/main.yml (66%) create mode 100644 roles/robertdebock.python_pip/meta/.galaxy_install_info rename roles/{python_pip => robertdebock.python_pip}/meta/exception.yml (100%) rename roles/{python_pip => robertdebock.python_pip}/meta/main.yml (85%) create mode 100644 roles/robertdebock.python_pip/meta/preferences.yml create mode 100644 roles/robertdebock.python_pip/molecule/default/converge.yml rename roles/{python_pip => robertdebock.python_pip}/molecule/default/molecule.yml (78%) create mode 100644 roles/robertdebock.python_pip/molecule/default/prepare.yml create mode 100644 roles/robertdebock.python_pip/molecule/default/verify.yml rename roles/{python_pip => robertdebock.python_pip}/requirements.yml (100%) create mode 100644 roles/robertdebock.python_pip/tasks/assert.yml rename roles/{python_pip => robertdebock.python_pip}/tasks/main.yml (60%) create mode 100644 roles/robertdebock.python_pip/tox.ini create mode 100644 roles/robertdebock.python_pip/vars/main.yml create mode 100644 roles/robertdebock.reboot/.ansible-lint create mode 100644 roles/robertdebock.reboot/.github/FUNDING.yml create mode 100644 roles/robertdebock.reboot/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 roles/robertdebock.reboot/.github/ISSUE_TEMPLATE/feature_request.md rename roles/{reboot/PULL_REQUEST_TEMPLATE.md => robertdebock.reboot/.github/pull_request_template.md} (100%) rename roles/{reboot => robertdebock.reboot}/.github/settings.yml (100%) create mode 100644 roles/robertdebock.reboot/.github/workflows/galaxy.yml create mode 100644 roles/robertdebock.reboot/.github/workflows/molecule.yml rename roles/{reboot => robertdebock.reboot}/.gitignore (100%) create mode 100644 roles/robertdebock.reboot/.travis.yml rename roles/{ansible => robertdebock.reboot}/.yamllint (97%) rename roles/{reboot => robertdebock.reboot}/CODE_OF_CONDUCT.md (100%) create mode 100644 roles/robertdebock.reboot/CONTRIBUTING.md create mode 100644 roles/robertdebock.reboot/LICENSE rename roles/{reboot => robertdebock.reboot}/README.md (55%) rename roles/{reboot => robertdebock.reboot}/SECURITY.md (76%) rename roles/{reboot => robertdebock.reboot}/defaults/main.yml (100%) create mode 100644 roles/robertdebock.reboot/meta/.galaxy_install_info rename roles/{reboot => robertdebock.reboot}/meta/main.yml (79%) create mode 100644 roles/robertdebock.reboot/meta/preferences.yml create mode 100644 roles/robertdebock.reboot/molecule/default/converge.yml rename roles/{reboot => robertdebock.reboot}/molecule/default/molecule.yml (64%) rename roles/{epel => robertdebock.reboot}/molecule/default/prepare.yml (68%) create mode 100644 roles/robertdebock.reboot/molecule/default/verify.yml rename roles/{ruby => robertdebock.reboot}/requirements.yml (100%) create mode 100644 roles/robertdebock.reboot/tasks/assert.yml create mode 100644 roles/robertdebock.reboot/tasks/main.yml create mode 100644 roles/robertdebock.reboot/tasks/reboot.yml create mode 100644 roles/robertdebock.reboot/tox.ini rename roles/{reboot => robertdebock.reboot}/vars/main.yml (57%) create mode 100644 roles/robertdebock.ruby/.ansible-lint create mode 100644 roles/robertdebock.ruby/.github/FUNDING.yml create mode 100644 roles/robertdebock.ruby/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 roles/robertdebock.ruby/.github/ISSUE_TEMPLATE/feature_request.md rename roles/{ruby/PULL_REQUEST_TEMPLATE.md => robertdebock.ruby/.github/pull_request_template.md} (100%) rename roles/{ruby => robertdebock.ruby}/.github/settings.yml (100%) create mode 100644 roles/robertdebock.ruby/.github/workflows/galaxy.yml create mode 100644 roles/robertdebock.ruby/.github/workflows/molecule.yml rename roles/{ruby => robertdebock.ruby}/.gitignore (100%) create mode 100644 roles/robertdebock.ruby/.travis.yml rename roles/{ara => robertdebock.ruby}/.yamllint (97%) rename roles/{ruby => robertdebock.ruby}/CODE_OF_CONDUCT.md (100%) create mode 100644 roles/robertdebock.ruby/CONTRIBUTING.md create mode 100644 roles/robertdebock.ruby/LICENSE rename roles/{ruby => robertdebock.ruby}/README.md (54%) rename roles/{ruby => robertdebock.ruby}/SECURITY.md (76%) create mode 100644 roles/robertdebock.ruby/meta/.galaxy_install_info rename roles/{ruby => robertdebock.ruby}/meta/main.yml (84%) create mode 100644 roles/robertdebock.ruby/meta/preferences.yml rename roles/{ara/molecule/default/playbook.yml => robertdebock.ruby/molecule/default/converge.yml} (72%) rename roles/{ruby => robertdebock.ruby}/molecule/default/molecule.yml (64%) create mode 100644 roles/robertdebock.ruby/molecule/default/prepare.yml create mode 100644 roles/robertdebock.ruby/molecule/default/verify.yml rename roles/{service => robertdebock.ruby}/requirements.yml (100%) rename roles/{ruby => robertdebock.ruby}/tasks/main.yml (52%) create mode 100644 roles/robertdebock.ruby/tox.ini rename roles/{ruby => robertdebock.ruby}/vars/main.yml (98%) create mode 100644 roles/robertdebock.service/.ansible-lint create mode 100644 roles/robertdebock.service/.github/FUNDING.yml create mode 100644 roles/robertdebock.service/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 roles/robertdebock.service/.github/ISSUE_TEMPLATE/feature_request.md rename roles/{service/PULL_REQUEST_TEMPLATE.md => robertdebock.service/.github/pull_request_template.md} (100%) rename roles/{service => robertdebock.service}/.github/settings.yml (100%) create mode 100644 roles/robertdebock.service/.github/workflows/galaxy.yml create mode 100644 roles/robertdebock.service/.github/workflows/molecule.yml rename roles/{service => robertdebock.service}/.gitignore (100%) create mode 100644 roles/robertdebock.service/.travis.yml create mode 100644 roles/robertdebock.service/.yamllint rename roles/{service => robertdebock.service}/CODE_OF_CONDUCT.md (100%) create mode 100644 roles/robertdebock.service/CONTRIBUTING.md create mode 100644 roles/robertdebock.service/LICENSE rename roles/{service => robertdebock.service}/README.md (65%) rename roles/{service => robertdebock.service}/SECURITY.md (76%) rename roles/{service => robertdebock.service}/defaults/main.yml (71%) rename roles/{service => robertdebock.service}/handlers/main.yml (75%) create mode 100644 roles/robertdebock.service/meta/.galaxy_install_info rename roles/{service => robertdebock.service}/meta/main.yml (82%) create mode 100644 roles/robertdebock.service/meta/preferences.yml rename roles/{service/molecule/default/playbook.yml => robertdebock.service/molecule/default/converge.yml} (85%) rename roles/{service => robertdebock.service}/molecule/default/molecule.yml (74%) rename roles/{service => robertdebock.service}/molecule/default/prepare.yml (100%) rename roles/{service => robertdebock.service}/molecule/default/verify.yml (95%) rename roles/{update => robertdebock.service}/requirements.yml (56%) create mode 100644 roles/robertdebock.service/tasks/assert.yml rename roles/{service => robertdebock.service}/tasks/main.yml (76%) rename roles/{investigate => robertdebock.service}/templates/.gitkeep (100%) rename roles/{service => robertdebock.service}/templates/systemd.j2 (58%) rename roles/{service => robertdebock.service}/templates/sysvinit.j2 (77%) create mode 100644 roles/robertdebock.service/tox.ini rename roles/{service => robertdebock.service}/vars/main.yml (91%) rename roles/{travis => robertdebock.travis}/.ansible-lint (54%) create mode 100644 roles/robertdebock.travis/.github/FUNDING.yml create mode 100644 roles/robertdebock.travis/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 roles/robertdebock.travis/.github/ISSUE_TEMPLATE/feature_request.md rename roles/{travis/PULL_REQUEST_TEMPLATE.md => robertdebock.travis/.github/pull_request_template.md} (100%) rename roles/{travis => robertdebock.travis}/.github/settings.yml (81%) create mode 100644 roles/robertdebock.travis/.github/workflows/galaxy.yml create mode 100644 roles/robertdebock.travis/.github/workflows/molecule.yml rename roles/{travis => robertdebock.travis}/.gitignore (100%) create mode 100644 roles/robertdebock.travis/.travis.yml rename roles/{atom => robertdebock.travis}/.yamllint (97%) rename roles/{travis => robertdebock.travis}/CODE_OF_CONDUCT.md (100%) create mode 100644 roles/robertdebock.travis/CONTRIBUTING.md create mode 100644 roles/robertdebock.travis/LICENSE rename roles/{travis => robertdebock.travis}/README.md (59%) rename roles/{travis => robertdebock.travis}/SECURITY.md (76%) create mode 100644 roles/robertdebock.travis/meta/.galaxy_install_info rename roles/{travis => robertdebock.travis}/meta/exception.yml (100%) rename roles/{travis => robertdebock.travis}/meta/main.yml (75%) create mode 100644 roles/robertdebock.travis/meta/preferences.yml create mode 100644 roles/robertdebock.travis/molecule/default/converge.yml rename roles/{travis => robertdebock.travis/molecule/default}/molecule.yml (61%) rename roles/{travis => robertdebock.travis}/molecule/default/prepare.yml (100%) create mode 100644 roles/robertdebock.travis/molecule/default/verify.yml rename roles/{travis => robertdebock.travis}/requirements.yml (100%) rename roles/{travis => robertdebock.travis}/tasks/main.yml (54%) create mode 100644 roles/robertdebock.travis/tox.ini rename roles/{travis => robertdebock.travis}/vars/main.yml (92%) rename roles/{vagrant => robertdebock.update}/.ansible-lint (54%) create mode 100644 roles/robertdebock.update/.github/FUNDING.yml create mode 100644 roles/robertdebock.update/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 roles/robertdebock.update/.github/ISSUE_TEMPLATE/feature_request.md rename roles/{update/PULL_REQUEST_TEMPLATE.md => robertdebock.update/.github/pull_request_template.md} (100%) rename roles/{update => robertdebock.update}/.github/settings.yml (100%) create mode 100644 roles/robertdebock.update/.github/workflows/galaxy.yml create mode 100644 roles/robertdebock.update/.github/workflows/molecule.yml rename roles/{update => robertdebock.update}/.gitignore (100%) create mode 100644 roles/robertdebock.update/.travis.yml rename roles/{ansible_lint => robertdebock.update}/.yamllint (97%) rename roles/{update => robertdebock.update}/CODE_OF_CONDUCT.md (100%) create mode 100644 roles/robertdebock.update/CONTRIBUTING.md create mode 100644 roles/robertdebock.update/LICENSE rename roles/{update => robertdebock.update}/README.md (58%) rename roles/{update => robertdebock.update}/SECURITY.md (76%) rename roles/{update => robertdebock.update}/defaults/main.yml (92%) create mode 100644 roles/robertdebock.update/handlers/main.yml create mode 100644 roles/robertdebock.update/meta/.galaxy_install_info rename roles/{common => robertdebock.update}/meta/exception.yml (100%) rename roles/{update => robertdebock.update}/meta/main.yml (78%) create mode 100644 roles/robertdebock.update/meta/preferences.yml create mode 100644 roles/robertdebock.update/molecule/default/converge.yml rename roles/{update => robertdebock.update}/molecule/default/molecule.yml (64%) create mode 100644 roles/robertdebock.update/molecule/default/prepare.yml create mode 100644 roles/robertdebock.update/molecule/default/verify.yml rename roles/{common => robertdebock.update}/requirements.yml (56%) create mode 100644 roles/robertdebock.update/tasks/assert.yml rename roles/{update => robertdebock.update}/tasks/main.yml (60%) create mode 100644 roles/robertdebock.update/tox.ini create mode 100644 roles/robertdebock.users/.ansible-lint create mode 100644 roles/robertdebock.users/.github/FUNDING.yml create mode 100644 roles/robertdebock.users/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 roles/robertdebock.users/.github/ISSUE_TEMPLATE/feature_request.md rename roles/{users/PULL_REQUEST_TEMPLATE.md => robertdebock.users/.github/pull_request_template.md} (100%) rename roles/{users => robertdebock.users}/.github/settings.yml (100%) create mode 100644 roles/robertdebock.users/.github/workflows/galaxy.yml create mode 100644 roles/robertdebock.users/.github/workflows/molecule.yml rename roles/{users => robertdebock.users}/.gitignore (100%) create mode 100644 roles/robertdebock.users/.travis.yml create mode 100644 roles/robertdebock.users/.yamllint rename roles/{users => robertdebock.users}/CODE_OF_CONDUCT.md (100%) create mode 100644 roles/robertdebock.users/CONTRIBUTING.md create mode 100644 roles/robertdebock.users/LICENSE create mode 100644 roles/robertdebock.users/README.md rename roles/{users => robertdebock.users}/SECURITY.md (76%) create mode 100644 roles/robertdebock.users/defaults/main.yml create mode 100644 roles/robertdebock.users/meta/.galaxy_install_info rename roles/{users => robertdebock.users}/meta/main.yml (85%) create mode 100644 roles/robertdebock.users/meta/preferences.yml create mode 100644 roles/robertdebock.users/molecule/default/converge.yml rename roles/{users => robertdebock.users}/molecule/default/molecule.yml (73%) create mode 100644 roles/robertdebock.users/molecule/default/prepare.yml rename roles/{users => robertdebock.users}/molecule/default/ssh_keys/keyuser (100%) rename roles/{users => robertdebock.users}/molecule/default/ssh_keys/keyuser.ppk (100%) rename roles/{users => robertdebock.users}/molecule/default/ssh_keys/keyuser.pub (100%) rename roles/{users => robertdebock.users}/molecule/default/ssh_keys/privkeyuser (100%) rename roles/{users => robertdebock.users}/molecule/default/ssh_keys/privkeyuser.ppk (100%) rename roles/{users => robertdebock.users}/molecule/default/ssh_keys/privkeyuser.pub (100%) create mode 100644 roles/robertdebock.users/molecule/default/verify.yml rename roles/{users => robertdebock.users}/requirements.yml (100%) create mode 100644 roles/robertdebock.users/tasks/assert.yml rename roles/{users => robertdebock.users}/tasks/group.yml (100%) rename roles/{users => robertdebock.users}/tasks/main.yml (67%) rename roles/{users => robertdebock.users}/tasks/user.yml (70%) rename roles/{users => robertdebock.users}/tasks/user_authorized_key.yml (66%) rename roles/{service => robertdebock.users}/templates/.gitkeep (100%) rename roles/{users => robertdebock.users}/templates/cron.allow.j2 (100%) rename roles/{users => robertdebock.users}/templates/sudo.j2 (100%) create mode 100644 roles/robertdebock.users/tox.ini rename roles/{users => robertdebock.users}/vars/main.yml (58%) create mode 100644 roles/robertdebock.vagrant/.ansible-lint create mode 100644 roles/robertdebock.vagrant/.github/FUNDING.yml create mode 100644 roles/robertdebock.vagrant/.github/ISSUE_TEMPLATE/bug_report.md create mode 100644 roles/robertdebock.vagrant/.github/ISSUE_TEMPLATE/feature_request.md rename roles/{vagrant/PULL_REQUEST_TEMPLATE.md => robertdebock.vagrant/.github/pull_request_template.md} (100%) rename roles/{vagrant => robertdebock.vagrant}/.github/settings.yml (81%) create mode 100644 roles/robertdebock.vagrant/.github/workflows/galaxy.yml create mode 100644 roles/robertdebock.vagrant/.github/workflows/molecule.yml rename roles/{vagrant => robertdebock.vagrant}/.gitignore (100%) create mode 100644 roles/robertdebock.vagrant/.travis.yml create mode 100644 roles/robertdebock.vagrant/.yamllint rename roles/{vagrant => robertdebock.vagrant}/CODE_OF_CONDUCT.md (100%) create mode 100644 roles/robertdebock.vagrant/CONTRIBUTING.md create mode 100644 roles/robertdebock.vagrant/LICENSE rename roles/{vagrant => robertdebock.vagrant}/README.md (61%) rename roles/{vagrant => robertdebock.vagrant}/SECURITY.md (76%) rename roles/{vagrant => robertdebock.vagrant}/defaults/main.yml (90%) create mode 100644 roles/robertdebock.vagrant/meta/.galaxy_install_info rename roles/{vagrant => robertdebock.vagrant}/meta/exception.yml (100%) rename roles/{vagrant => robertdebock.vagrant}/meta/main.yml (73%) create mode 100644 roles/robertdebock.vagrant/meta/preferences.yml create mode 100644 roles/robertdebock.vagrant/molecule/default/converge.yml rename roles/{vagrant => robertdebock.vagrant/molecule/default}/molecule.yml (69%) create mode 100644 roles/robertdebock.vagrant/molecule/default/prepare.yml create mode 100644 roles/robertdebock.vagrant/molecule/default/verify.yml rename roles/{vagrant => robertdebock.vagrant}/requirements.yml (100%) create mode 100644 roles/robertdebock.vagrant/tasks/assert.yml rename roles/{vagrant => robertdebock.vagrant}/tasks/main.yml (65%) create mode 100644 roles/robertdebock.vagrant/tox.ini rename roles/{vagrant => robertdebock.vagrant}/vars/main.yml (99%) delete mode 100644 roles/ruby/.ansible-lint delete mode 100644 roles/ruby/.github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 roles/ruby/.github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 roles/ruby/.travis.yml delete mode 100644 roles/ruby/.yamllint delete mode 100644 roles/ruby/CONTRIBUTING.md delete mode 100644 roles/ruby/LICENSE delete mode 100644 roles/ruby/defaults/main.yml delete mode 100644 roles/ruby/meta/.galaxy_install_info delete mode 100644 roles/ruby/molecule/default/playbook.yml delete mode 100644 roles/ruby/molecule/default/prepare.yml delete mode 100644 roles/ruby/tox.ini delete mode 100644 roles/service/.ansible-lint delete mode 100644 roles/service/.github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 roles/service/.github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 roles/service/.travis.yml delete mode 100644 roles/service/.yamllint delete mode 100644 roles/service/CONTRIBUTING.md delete mode 100644 roles/service/LICENSE delete mode 100644 roles/service/meta/.galaxy_install_info delete mode 100644 roles/service/tox.ini delete mode 100644 roles/travis/.github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 roles/travis/.github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 roles/travis/.travis.yml delete mode 100644 roles/travis/.yamllint delete mode 100644 roles/travis/CONTRIBUTING.md delete mode 100644 roles/travis/LICENSE delete mode 100644 roles/travis/defaults/main.yml delete mode 100644 roles/travis/meta/.galaxy_install_info delete mode 100644 roles/travis/molecule/default/molecule.yml delete mode 100644 roles/travis/molecule/default/playbook.yml delete mode 100644 roles/travis/tox.ini delete mode 100644 roles/update/.ansible-lint delete mode 100644 roles/update/.github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 roles/update/.github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 roles/update/.travis.yml delete mode 100644 roles/update/.yamllint delete mode 100644 roles/update/CONTRIBUTING.md delete mode 100644 roles/update/LICENSE delete mode 100644 roles/update/meta/.galaxy_install_info delete mode 100644 roles/update/meta/exception.yml delete mode 100644 roles/update/molecule/default/playbook.yml delete mode 100644 roles/update/molecule/default/prepare.yml delete mode 100644 roles/update/tox.ini delete mode 100644 roles/users/.ansible-lint delete mode 100644 roles/users/.github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 roles/users/.github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 roles/users/.travis.yml delete mode 100644 roles/users/.yamllint delete mode 100644 roles/users/CONTRIBUTING.md delete mode 100644 roles/users/LICENSE delete mode 100644 roles/users/README.md delete mode 100644 roles/users/defaults/main.yml delete mode 100644 roles/users/meta/.galaxy_install_info delete mode 100644 roles/users/molecule/default/playbook.yml delete mode 100644 roles/users/molecule/default/prepare.yml delete mode 100644 roles/users/templates/.gitkeep delete mode 100644 roles/users/tox.ini delete mode 100644 roles/vagrant/.github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 roles/vagrant/.github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 roles/vagrant/.travis.yml delete mode 100644 roles/vagrant/.yamllint delete mode 100644 roles/vagrant/CONTRIBUTING.md delete mode 100644 roles/vagrant/LICENSE delete mode 100644 roles/vagrant/handlers/main.yml delete mode 100644 roles/vagrant/meta/.galaxy_install_info delete mode 100644 roles/vagrant/molecule/default/molecule.yml delete mode 100644 roles/vagrant/molecule/default/playbook.yml delete mode 100644 roles/vagrant/tox.ini diff --git a/Vagrantfile b/Vagrantfile index 3f83971..0333340 120000 --- a/Vagrantfile +++ b/Vagrantfile @@ -1 +1 @@ -Vagrantfile.virtualbox \ No newline at end of file +Vagrantfile.libvirt \ No newline at end of file diff --git a/ansible.cfg b/ansible.cfg index fbead0f..b2f1f16 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -3,3 +3,4 @@ retry_files_enabled=no inventory=inventory stdout_callback=yaml host_key_checking=no +roles_path=roles diff --git a/galaxy.yml b/galaxy.yml index 2906084..70c2356 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,7 +1,7 @@ namespace: "robertdebock" name: "development_environment" description: Install everything you need to develop Ansible roles. -version: "1.4.21" +version: "2.0.0" readme: "README.md" authors: - "Robert de Bock" diff --git a/inventory/vagant.py b/inventory/vagant.py index 2b444a7..80aed6b 100755 --- a/inventory/vagant.py +++ b/inventory/vagant.py @@ -1,52 +1,129 @@ #!/usr/bin/env python -# Adapted from Mark Mandel's implementation -# https://github.com/ansible/ansible/blob/devel/plugins/inventory/vagrant.py -import argparse -import json -import paramiko -import subprocess +""" +Vagrant external inventory script. Automatically finds the IP of the booted vagrant vm(s), and +returns it under the host group 'vagrant' +Example Vagrant configuration using this script: + config.vm.provision :ansible do |ansible| + ansible.playbook = "./provision/your_playbook.yml" + ansible.inventory_path = "./provision/inventory/vagrant.py" + ansible.verbose = true + end +""" + +# Copyright (C) 2013 Mark Mandel +# 2015 Igor Khomyakov +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# +# Thanks to the spacewalk.py inventory script for giving me the basic structure +# of this. +# + import sys +import os.path +import subprocess +import re +from paramiko import SSHConfig +from optparse import OptionParser +from collections import defaultdict +import json + +from ansible.module_utils._text import to_text +from ansible.module_utils.six.moves import StringIO -def parse_args(): - parser = argparse.ArgumentParser(description="Vagrant inventory script") - group = parser.add_mutually_exclusive_group(required=True) - group.add_argument('--list', action='store_true') - group.add_argument('--host') - return parser.parse_args() +_group = 'vagrant' # a default group +_ssh_to_ansible = [('user', 'ansible_user'), + ('hostname', 'ansible_host'), + ('identityfile', 'ansible_ssh_private_key_file'), + ('port', 'ansible_port')] + +# Options +# ------------------------------ + +parser = OptionParser(usage="%prog [options] --list | --host ") +parser.add_option('--list', default=False, dest="list", action="store_true", + help="Produce a JSON consumable grouping of Vagrant servers for Ansible") +parser.add_option('--host', default=None, dest="host", + help="Generate additional host specific details for given host for Ansible") +(options, args) = parser.parse_args() + +# +# helper functions +# -def list_running_hosts(): - cmd = "vagrant status --machine-readable" - status = subprocess.check_output(cmd.split()).rstrip() - hosts = [] - for line in status.split('\n'): - (_, host, key, value) = line.split(',',3) - if key == 'state' and value == 'running': - hosts.append(host) - return hosts +# get all the ssh configs for all boxes in an array of dictionaries. +def get_ssh_config(): + return dict((k, get_a_ssh_config(k)) for k in list_running_boxes()) -def get_host_details(host): - cmd = "vagrant ssh-config {}".format(host) - p = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE) - config = paramiko.SSHConfig() - config.parse(p.stdout) - c = config.lookup(host) - return {'ansible_ssh_host': c['hostname'], - 'ansible_ssh_port': c['port'], - 'ansible_ssh_user': c['user'], - 'ansible_ssh_private_key_file': c['identityfile'][0]} +# list all the running boxes +def list_running_boxes(): + + output = to_text(subprocess.check_output(["vagrant", "status"]), errors='surrogate_or_strict').split('\n') + + boxes = [] + + for line in output: + matcher = re.search(r"([^\s]+)[\s]+running \(.+", line) + if matcher: + boxes.append(matcher.group(1)) + + return boxes -def main(): - args = parse_args() - if args.list: - hosts = list_running_hosts() - json.dump({'vagrant': hosts}, sys.stdout) - else: - details = get_host_details(args.host) - json.dump(details, sys.stdout) +# get the ssh config for a single box +def get_a_ssh_config(box_name): + """Gives back a map of all the machine's ssh configurations""" -if __name__ == '__main__': - main() + output = to_text(subprocess.check_output(["vagrant", "ssh-config", box_name]), errors='surrogate_or_strict') + config = SSHConfig() + config.parse(StringIO(output)) + host_config = config.lookup(box_name) + + # man 5 ssh_config: + # > It is possible to have multiple identity files ... + # > all these identities will be tried in sequence. + for id in host_config['identityfile']: + if os.path.isfile(id): + host_config['identityfile'] = id + + return dict((v, host_config[k]) for k, v in _ssh_to_ansible) + + +# List out servers that vagrant has running +# ------------------------------ +if options.list: + ssh_config = get_ssh_config() + meta = defaultdict(dict) + + for host in ssh_config: + meta['hostvars'][host] = ssh_config[host] + + print(json.dumps({_group: list(ssh_config.keys()), '_meta': meta})) + sys.exit(0) + +# Get out the host details +# ------------------------------ +elif options.host: + print(json.dumps(get_a_ssh_config(options.host))) + sys.exit(0) + +# Print out help +# ------------------------------ +else: + parser.print_help() + sys.exit(0) diff --git a/playbook.yml b/playbook.yml index f32e840..636889f 100755 --- a/playbook.yml +++ b/playbook.yml @@ -6,23 +6,23 @@ gather_facts: no roles: - - robertdebock.development_environment.bootstrap - - robertdebock.development_environment.update - - robertdebock.development_environment.fail2ban - - robertdebock.development_environment.common - - robertdebock.development_environment.buildtools - - robertdebock.development_environment.epel - - robertdebock.development_environment.python_pip - - robertdebock.development_environment.docker - - robertdebock.development_environment.users - - robertdebock.development_environment.postfix - - robertdebock.development_environment.vagrant - - robertdebock.development_environment.investigate - - robertdebock.development_environment.ansible - - robertdebock.development_environment.ansible_lint - - robertdebock.development_environment.molecule - - robertdebock.development_environment.ara - - robertdebock.development_environment.ruby - - robertdebock.development_environment.travis - - robertdebock.development_environment.git - - robertdebock.development_environment.atom + - robertdebock.bootstrap + - robertdebock.update + - robertdebock.fail2ban + - robertdebock.common + - robertdebock.buildtools + - robertdebock.epel + - robertdebock.python_pip + - robertdebock.docker + - robertdebock.users + - robertdebock.postfix + - robertdebock.vagrant + - robertdebock.investigate + - robertdebock.ansible + - robertdebock.ansible_lint + - robertdebock.molecule + - robertdebock.ara + - robertdebock.ruby + - robertdebock.travis + - robertdebock.git + - robertdebock.atom diff --git a/roles/ansible/.ansible-lint b/roles/ansible/.ansible-lint deleted file mode 100644 index 5f770c6..0000000 --- a/roles/ansible/.ansible-lint +++ /dev/null @@ -1,5 +0,0 @@ -# -# Ansible managed -# -exclude_paths: - - ./meta/exception.yml diff --git a/roles/ansible/.github/ISSUE_TEMPLATE/feature_request.md b/roles/ansible/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 066b2d9..0000000 --- a/roles/ansible/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/roles/ansible/.travis.yml b/roles/ansible/.travis.yml deleted file mode 100644 index 1ddc43a..0000000 --- a/roles/ansible/.travis.yml +++ /dev/null @@ -1,47 +0,0 @@ ---- -# -# Ansible managed -# -language: python - -python: - - "3.7" - -services: - - docker - -env: - global: - namespace="robertdebock" - matrix: - - image="amazonlinux" - - image="alpine" - - image="alpine" tag="edge" - # - namespace="archlinux" image="base" - - image="debian" tag="unstable" - - image="debian" - - image="fedora" - - image="fedora" tag="rawhide" - - image="ubuntu" - -matrix: - allow_failures: - - env: image="alpine" tag="edge" - - env: image="debian" tag="unstable" - - env: image="fedora" tag="rawhide" - -cache: - - pip - -install: - - pip install --upgrade pip - - pip install tox - -script: - - tox --parallel all - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ - slack: - secure: "DIjA6Mnh2fpuFs+CYMtn1DX0o1DWqiz5Jz4v39fjeF+CJsG0vMFpmHunRwqftVnGUpsJKrjH9zxZXL5EkAtMif4ROC885h+uc0YgWoNl1cnlZUfljD3+34+EjutW6W/wcijxqy7v0LqracBScDSErUzBnZO6fBUFdf/6KIsyWxOrKTEH4cjt5SocEDUYUy3CQZDIU4pXdfoliWPnb0MDjiRN2NV4paB5R2CQ0NawlUV8gwrA5hKOUGD6ca0LNOF/tnkOcF8qJKox4AyYMXvAJdieFO/aWQG5tZg2y5+yDXqQPyjuTTX7XiqNUpdyeP0mwR27eAO/R7LBiRMqiYPFkT2ttSN4ufKWToGX51lAZXZWmKfy8lKcFxszVwthJj4PQvjLcY/xbk9Ze1o+yz/1H4eBdmXEVD+H9SX3j2wToerbhktHcv+Uf62xrug8UglxQsSJFHRWaSkiC6ZWw5Awce+9LxHi8VK9ubnFKD7wK5iY+Gved4A7HvwSUQJQfCeNnyvmsLwacnr1DGTUzm0/LkbtkAQMh4h5ouDN5b1vwalcADHFZmmqtDeocZQL6m8E42Fvkpkllfo0tJV67aN3Of6fq/e/I5Ac+dOqJ0MQkclnGG4+HvSa12MAoTKhrgFIBkpJI/083i6eoRsmIT2gtHwGzclVNKJmRERcrVLLa1s=" - email: false diff --git a/roles/ansible/CONTRIBUTING.md b/roles/ansible/CONTRIBUTING.md deleted file mode 100644 index 3209430..0000000 --- a/roles/ansible/CONTRIBUTING.md +++ /dev/null @@ -1,10 +0,0 @@ -# Please contribute - -You can really make a difference by: - -- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) -- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. - -I'll try to help and take every contribution seriously. - -It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. diff --git a/roles/ansible/meta/.galaxy_install_info b/roles/ansible/meta/.galaxy_install_info deleted file mode 100644 index 97ea144..0000000 --- a/roles/ansible/meta/.galaxy_install_info +++ /dev/null @@ -1,2 +0,0 @@ -install_date: Mon Dec 16 06:44:21 2019 -version: 2.1.1 diff --git a/roles/ansible_lint/.ansible-lint b/roles/ansible_lint/.ansible-lint deleted file mode 100644 index 5f770c6..0000000 --- a/roles/ansible_lint/.ansible-lint +++ /dev/null @@ -1,5 +0,0 @@ -# -# Ansible managed -# -exclude_paths: - - ./meta/exception.yml diff --git a/roles/ansible_lint/.github/ISSUE_TEMPLATE/feature_request.md b/roles/ansible_lint/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 066b2d9..0000000 --- a/roles/ansible_lint/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/roles/ansible_lint/.travis.yml b/roles/ansible_lint/.travis.yml deleted file mode 100644 index 8e2040d..0000000 --- a/roles/ansible_lint/.travis.yml +++ /dev/null @@ -1,45 +0,0 @@ ---- -# -# Ansible managed -# -language: python - -python: - - "3.7" - -services: - - docker - -env: - global: - namespace="robertdebock" - matrix: - # - namespace="archlinux" image="base" - - image="debian" tag="unstable" - - image="debian" - - image="centos" - - image="fedora" - - image="fedora" tag="rawhide" - - image="opensuse" - - image="ubuntu" - -matrix: - allow_failures: - - env: image="debian" tag="unstable" - - env: image="fedora" tag="rawhide" - -cache: - - pip - -install: - - pip install --upgrade pip - - pip install tox - -script: - - tox --parallel all - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ - slack: - secure: "XWAAQ/YpN5s6xZknnRZKnkcUy5GkbI6nxGjZYOH+ZmYUEg+EnWzliwYmZ4zOzOtmQUTx7X6UMHfxb4Z7uyPA0z/mjVnIRCoqv6QAmbTHJBztzjyJy3HpDvX7IYO6Lrr+T0RHQ5uGarpXsUxCrCD+fKf1WfyVy/XJ8Uw1gPY7fEpjB+xRtxwYukRmZFxjcUnbBwguVSveoUBhyn6vr+cW4rovtB5s443H5UXQeprSY0Pu28G77rnc2opk1CLP0P/gwetPjnFaZRwYY0L0VNER877sloZ8IcY47ThdBNVpkkMbpJgkSQW7brSIjefP1S9kx00b6XqwV/8zh/DSi2j8mq8CU2g2qLm8M5F/ik1d/sc23wxCnj+GWeBoAlPcpgCYM8nYp8oS09H32TQFG7iENu3nG+9YsoNKdUSPQvfqYkXtO7Sbtvjgiv0rhhZJLsvqnrh2Dq/6Y2K1jmDcZuQfFDgdCTW85zLDle78zFyiIjLc41QX4Rqo9ELJNR5KQ60pQIoIb/JxRvEERvzOBJl+atAa4CvI+UdU/xUFEokWXLwGi+Ze+cu7Qfskg6ISCzGAZ/D1aJ0R8wHjwY/BdiM0oSadlGl13yU1jVSWoHwpnmpBZIuGnPrCGPf3VLzRGPdkAej+RCdt4DKCNUb8BZ67f4nP3gwAEBYbOle58O4tA2c=" - email: false diff --git a/roles/ansible_lint/CONTRIBUTING.md b/roles/ansible_lint/CONTRIBUTING.md deleted file mode 100644 index 3209430..0000000 --- a/roles/ansible_lint/CONTRIBUTING.md +++ /dev/null @@ -1,10 +0,0 @@ -# Please contribute - -You can really make a difference by: - -- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) -- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. - -I'll try to help and take every contribution seriously. - -It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. diff --git a/roles/ansible_lint/defaults/main.yml b/roles/ansible_lint/defaults/main.yml deleted file mode 100644 index 89b85d8..0000000 --- a/roles/ansible_lint/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# defaults file for ansible_lint diff --git a/roles/ansible_lint/meta/.galaxy_install_info b/roles/ansible_lint/meta/.galaxy_install_info deleted file mode 100644 index 3ac83e0..0000000 --- a/roles/ansible_lint/meta/.galaxy_install_info +++ /dev/null @@ -1,2 +0,0 @@ -install_date: Mon Dec 16 06:44:26 2019 -version: 2.2.2 diff --git a/roles/ara/.ansible-lint b/roles/ara/.ansible-lint deleted file mode 100644 index 5f770c6..0000000 --- a/roles/ara/.ansible-lint +++ /dev/null @@ -1,5 +0,0 @@ -# -# Ansible managed -# -exclude_paths: - - ./meta/exception.yml diff --git a/roles/ara/.github/ISSUE_TEMPLATE/feature_request.md b/roles/ara/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 066b2d9..0000000 --- a/roles/ara/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/roles/ara/.travis.yml b/roles/ara/.travis.yml deleted file mode 100644 index dcd5894..0000000 --- a/roles/ara/.travis.yml +++ /dev/null @@ -1,44 +0,0 @@ ---- -# -# Ansible managed -# -language: python - -python: - - "3.7" - -services: - - docker - -env: - global: - namespace="robertdebock" - matrix: - # - namespace="archlinux" image="base" - - image="debian" tag="unstable" - - image="debian" - - image="centos" - - image="fedora" - - image="fedora" tag="rawhide" - - image="ubuntu" - -matrix: - allow_failures: - - env: image="debian" tag="unstable" - - env: image="fedora" tag="rawhide" - -cache: - - pip - -install: - - pip install --upgrade pip - - pip install tox - -script: - - tox --parallel all - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ - slack: - secure: "KNGb6nUiIFk86AMSfRdnFFWcKh4whVEcvS3ycBdhEBhbG4/4d8TBNFILjLpvTrr5d2Vmhj4JM2dRTwfkEj+ChC9cCknSVwkwZqbOx+H1NmiYgTWHn8Ar89NOh/GnaV3aU1AcK36L+7M9pcoTaLtl0BRWwrR4BUCIUFqgOf7vEtKWew+b1zmaGG3hygrGYFMKFJa4GfsGiSYnkn8TFG2muacgzlActQzML1xHrE/kR4hWK7dMZCLdPDgzXyRDwMZwkQQxPwKe0rCLYY7izzRoFchziyyvtwCrZ2F5sN4HsNploCwBRPCw3o6ZdhybPlmEls/PE+UhshV7NZb8t5/oX2bTHnHABEyRs6dLJotxgYCkkU4brlq2btWiYVP5FdCHYF/PraQbb5yNl+fKGSPimGj++B3MgIGLaq0ZskO3RC+RiqNnO5V6/SLjr4zk4JqPtPl7CEX3o77VcxQQEm91Xk7++yNCng8ShAK2IrBWxezQc4ZwyyvntNYi+ODqJaJDMCE+RQAaw1iBvGgaAX2P798LPJRew9D64xByC7FUKTe9TSOoYG635/iKWVDLneLd3CdvaKwkBSx2A/6eO6HGjSqi7PHhY1Y3Jru+oTVB3NNopHHLNNo2Qv1us76meP6LoxaoCvkt7/YmFkCYxvkCWey5q6vq0Kd0IhC3uGYFSkA=" - email: false diff --git a/roles/ara/CONTRIBUTING.md b/roles/ara/CONTRIBUTING.md deleted file mode 100644 index 3209430..0000000 --- a/roles/ara/CONTRIBUTING.md +++ /dev/null @@ -1,10 +0,0 @@ -# Please contribute - -You can really make a difference by: - -- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) -- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. - -I'll try to help and take every contribution seriously. - -It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. diff --git a/roles/ara/meta/.galaxy_install_info b/roles/ara/meta/.galaxy_install_info deleted file mode 100644 index 4d0e4a0..0000000 --- a/roles/ara/meta/.galaxy_install_info +++ /dev/null @@ -1,2 +0,0 @@ -install_date: Mon Dec 16 06:44:30 2019 -version: 2.3.2 diff --git a/roles/ara/molecule/default/prepare.yml b/roles/ara/molecule/default/prepare.yml deleted file mode 100644 index cc31f6d..0000000 --- a/roles/ara/molecule/default/prepare.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -- name: Prepare - hosts: all - become: yes - gather_facts: no - - roles: - - robertdebock.bootstrap - - robertdebock.buildtools - - robertdebock.epel - - robertdebock.python_pip diff --git a/roles/atom/.ansible-lint b/roles/atom/.ansible-lint deleted file mode 100644 index 5f770c6..0000000 --- a/roles/atom/.ansible-lint +++ /dev/null @@ -1,5 +0,0 @@ -# -# Ansible managed -# -exclude_paths: - - ./meta/exception.yml diff --git a/roles/atom/.github/ISSUE_TEMPLATE/feature_request.md b/roles/atom/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 066b2d9..0000000 --- a/roles/atom/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/roles/atom/.travis.yml b/roles/atom/.travis.yml deleted file mode 100644 index 4c4ff64..0000000 --- a/roles/atom/.travis.yml +++ /dev/null @@ -1,48 +0,0 @@ ---- -# -# Ansible managed -# -language: python - -python: - - "3.7" - -services: - - docker - -env: - global: - namespace="robertdebock" - matrix: - - image="amazonlinux" - - image="alpine" - - image="alpine" tag="edge" - # - namespace="archlinux" image="base" - - image="debian" tag="unstable" - - image="debian" - - image="fedora" - - image="fedora" tag="rawhide" - - image="opensuse" - - image="ubuntu" - -matrix: - allow_failures: - - env: image="alpine" tag="edge" - - env: image="debian" tag="unstable" - - env: image="fedora" tag="rawhide" - -cache: - - pip - -install: - - pip install --upgrade pip - - pip install tox - -script: - - tox --parallel all - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ - slack: - secure: "m6jjS1/GZUUlovX2COeIGwVpS4iDfqAfX40onVjhCebOe5lMd259HTGk96QXPnh31VaonIfRfCgOjomcVKVBxZ1ELDKE/arwaflL6qc0zWHHH3cNzJjbTbouuSNGMrXA6y6Xlx6hBFb88PkpbiU07yO905RR2e5Jb8xse+zfzgFw451rfWLvbPXdskmC7YKzJ2T5heSG+eJE9EMOt4ZVj7wjWolNyGnW+QJetdZJTdokFRxgxSxPq8A0cLUBmC7nHEigycPimcDArikAU5wARs27Irp0bDjG+lDxcWj/0PEuDJjnpEc8j4pgSuMgLtmKMp+J75oC4FMcoOcYKL2FbDcY9fAbrfA/rK7kQq47QdtUjo6oP9BulP1Kl7/CRKXcM33QV5r5Yv80kDx+aOHVgf2ZqoKmtQovcS34VR94e8WwwRJloP0rz+8zoXci7tKOMeea5uvKws0zMRwjTlfRHrtOWT6yU0gL8o9dYLyyA1HhaV3kApuiBMH2FioMUteYzKCVWW3YO3PJO4CCJrltHaMPpRTCGY5bDn7Py3qqO41WTWJ6mzbZjLxNhHh/0R6xaV4BQH6qjkMH6WyS7ctaRBtGdkLW9nNmEJx2MLz3IYCAlY5Cs0BS1eKVoq6FVl0qwbhl24kiUekVTYSA6qti/VfoOyGKGGAqCBEyq/aKfSo=" - email: false diff --git a/roles/atom/CONTRIBUTING.md b/roles/atom/CONTRIBUTING.md deleted file mode 100644 index 3209430..0000000 --- a/roles/atom/CONTRIBUTING.md +++ /dev/null @@ -1,10 +0,0 @@ -# Please contribute - -You can really make a difference by: - -- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) -- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. - -I'll try to help and take every contribution seriously. - -It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. diff --git a/roles/atom/defaults/main.yml b/roles/atom/defaults/main.yml deleted file mode 100644 index fbabfd5..0000000 --- a/roles/atom/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# defaults file for atom diff --git a/roles/atom/meta/.galaxy_install_info b/roles/atom/meta/.galaxy_install_info deleted file mode 100644 index 2cd8902..0000000 --- a/roles/atom/meta/.galaxy_install_info +++ /dev/null @@ -1,2 +0,0 @@ -install_date: Mon Dec 16 06:44:34 2019 -version: 2.2.2 diff --git a/roles/atom/meta/exception.yml b/roles/atom/meta/exception.yml deleted file mode 100644 index dbb2862..0000000 --- a/roles/atom/meta/exception.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -exceptions: - - variation: amazonlinux:1 - reason: "Package: atom ... Requires: libsecret-1.so.0 ... and ... polkit" diff --git a/roles/atom/vars/main.yml b/roles/atom/vars/main.yml deleted file mode 100644 index b5490f7..0000000 --- a/roles/atom/vars/main.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -# vars file for atom -_atom_requirements: - apt: - - apt-transport-https - -atom_requirements: "{{ _atom_requirements[ansible_pkg_mgr] | default(omit) }}" - -atom_packages: "{{ _atom_packages[ansible_distribution ~ '-' ~ ansible_distribution_major_version] | default(_atom_packages[ansible_distribution] | default(_atom_packages['default'])) }}" - -_atom_package: - apt: - url: 'https://atom.io/download/deb' - name: atom-amd64.deb - dnf: - url: 'https://atom.io/download/rpm' - name: atom.x86_64.rpm - yum: - url: 'https://atom.io/download/rpm' - name: atom.x86_64.rpm - zypper: - url: 'https://atom.io/download/rpm' - name: atom.x86_64.rpm - -atom_package_url: '{{ _atom_package[ansible_pkg_mgr]["url"] }}' -atom_package: "{{ _atom_package[ansible_pkg_mgr]['name'] }}" diff --git a/roles/bootstrap/.ansible-lint b/roles/bootstrap/.ansible-lint deleted file mode 100644 index 788f1ce..0000000 --- a/roles/bootstrap/.ansible-lint +++ /dev/null @@ -1,3 +0,0 @@ -# -# Ansible managed -# diff --git a/roles/bootstrap/.github/ISSUE_TEMPLATE/bug_report.md b/roles/bootstrap/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index c695b98..0000000 --- a/roles/bootstrap/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**Playbook** -Please paste the playbook you are using. (Consider `requirements.yml` and -optionally the command you've invoked.) - - -```yaml -YOUR PLAYBOOK HERE -``` - -**Output** -Show at least the error, possible related output, maybe just all the output. - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Environment** -- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) -- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) -- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) diff --git a/roles/bootstrap/.github/ISSUE_TEMPLATE/feature_request.md b/roles/bootstrap/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 066b2d9..0000000 --- a/roles/bootstrap/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/roles/bootstrap/.travis.yml b/roles/bootstrap/.travis.yml deleted file mode 100644 index 41c7894..0000000 --- a/roles/bootstrap/.travis.yml +++ /dev/null @@ -1,53 +0,0 @@ ---- -# -# Ansible managed -# -language: python - -python: - - "3.7" - -services: - - docker - -env: - global: - namespace="robertdebock" - matrix: - - image="amazonlinux" tag="1" - - image="amazonlinux" - - image="alpine" - - image="alpine" tag="edge" - # - namespace="archlinux" image="base" - - image="debian" tag="unstable" - - image="debian" - - image="centos" tag="7" - - image="oraclelinux" tag="7" - - image="centos" - - image="oraclelinux" - - image="fedora" - - image="fedora" tag="rawhide" - - image="opensuse" - - image="ubuntu" - -matrix: - allow_failures: - - env: image="alpine" tag="edge" - - env: image="debian" tag="unstable" - - env: image="fedora" tag="rawhide" - -cache: - - pip - -install: - - pip install --upgrade pip - - pip install tox - -script: - - tox --parallel all - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ - slack: - secure: "aulwiTA7Pd7ckRc4A99/ldtgA3ke8+xC2LOTNA0REpgkUOp19IDYZvwZBGWoBTR4dGsh4P7/Z3V/9vpi7d/b8zDDF4pF+xayo7xSFtqJviawJuRIC7OTCzAKQrTvQccNA1sLPWWH49hWjjQCwVd7VnhhXZOFFJwtx7KT7S+xABInFQIRyuEEJocDrTzlF8xG63P3iFkv3YE90QSsi7gxAB6dnSiOOESwAnnhWEuvAEsLsEkHCANEoA90O477/jqH6eCBGGyA4ItO7dRwdhn8iSEbqakQ6WWD5bMUjnydQ/5CsyolJeV6ejr1z3CaPWMDA1nM+gCBuIPlkTV2E+uWWzYIGEcUt/oXY/P8d4AzfSbIECE0VQptOBVnxvDTY++39MPMDVtWW9j82ZyAylswQrx7eNqnhLMOF0MhTAJxiOeLAnPJe179j47dVDJRGWVzlBSqg0XIk8tVsVNrF7+hkkxYkP8pe3+yQYIW03j+JZyPR9uzkJnNhMSnoTC3ey7wd9aJD+9wgEeXkmvtIPCd6QIR35irRSKVHTyU5yArHzQDRCK5IwRqkfWG3fH1s92ApCzDn6AzbYCpdgf8f1diFHyNSmmO0eePRvo89skoRnUv3LhUre8HJbx2946AamrIeYYKi77uTcrLG9AekP/oiT31y6U/GcWXJnlaSyKhXFU=" - email: false diff --git a/roles/bootstrap/.yamllint b/roles/bootstrap/.yamllint deleted file mode 100644 index 77be3fb..0000000 --- a/roles/bootstrap/.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/roles/bootstrap/LICENSE b/roles/bootstrap/LICENSE deleted file mode 100644 index 744118c..0000000 --- a/roles/bootstrap/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 Robert de Bock (robert@meinit.nl) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/roles/bootstrap/meta/.galaxy_install_info b/roles/bootstrap/meta/.galaxy_install_info deleted file mode 100644 index 858d9c6..0000000 --- a/roles/bootstrap/meta/.galaxy_install_info +++ /dev/null @@ -1,2 +0,0 @@ -install_date: Mon Dec 16 06:44:42 2019 -version: 4.0.2 diff --git a/roles/bootstrap/tox.ini b/roles/bootstrap/tox.ini deleted file mode 100644 index a902e16..0000000 --- a/roles/bootstrap/tox.ini +++ /dev/null @@ -1,22 +0,0 @@ -# -# Ansible managed -# -[tox] -minversion = 3.7 -envlist = py{37}-ansible-{previous,current,next} -skipsdist = true - -[testenv] -deps = - previous: ansible>=2.8, <2.9 - current: ansible>=2.9 - next: git+https://github.com/ansible/ansible.git@devel - docker - molecule -commands = - molecule test -setenv = - TOX_ENVNAME={envname} - MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} - -passenv = namespace image tag diff --git a/roles/buildtools/.ansible-lint b/roles/buildtools/.ansible-lint deleted file mode 100644 index 5f770c6..0000000 --- a/roles/buildtools/.ansible-lint +++ /dev/null @@ -1,5 +0,0 @@ -# -# Ansible managed -# -exclude_paths: - - ./meta/exception.yml diff --git a/roles/buildtools/.github/ISSUE_TEMPLATE/bug_report.md b/roles/buildtools/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index c695b98..0000000 --- a/roles/buildtools/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**Playbook** -Please paste the playbook you are using. (Consider `requirements.yml` and -optionally the command you've invoked.) - - -```yaml -YOUR PLAYBOOK HERE -``` - -**Output** -Show at least the error, possible related output, maybe just all the output. - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Environment** -- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) -- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) -- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) diff --git a/roles/buildtools/.github/ISSUE_TEMPLATE/feature_request.md b/roles/buildtools/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 066b2d9..0000000 --- a/roles/buildtools/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/roles/buildtools/.travis.yml b/roles/buildtools/.travis.yml deleted file mode 100644 index f7d782c..0000000 --- a/roles/buildtools/.travis.yml +++ /dev/null @@ -1,51 +0,0 @@ ---- -# -# Ansible managed -# -language: python - -python: - - "3.7" - -services: - - docker - -env: - global: - namespace="robertdebock" - matrix: - - image="amazonlinux" tag="1" - - image="amazonlinux" - - image="alpine" - - image="alpine" tag="edge" - # - namespace="archlinux" image="base" - - image="debian" tag="unstable" - - image="debian" - - image="centos" tag="7" - - image="centos" - - image="fedora" - - image="fedora" tag="rawhide" - - image="opensuse" - - image="ubuntu" - -matrix: - allow_failures: - - env: image="alpine" tag="edge" - - env: image="debian" tag="unstable" - - env: image="fedora" tag="rawhide" - -cache: - - pip - -install: - - pip install --upgrade pip - - pip install tox - -script: - - tox --parallel all - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ - slack: - secure: "iTJzjXzcFBfoTgvxgyhUtMSQhYJlDxTHdjoEx3MBqStvdMoBTTrnhZWy9jL6vMzXscMKWQboWZerMiES4sDuRykmRKuoz7ymXGKtrYuTecmTdYmWMhV8nj9PcDlO27HSIfPwHuUkRW14tBv2RWxTkp2fgWNGSsoNngtydgw2JHX4mWrOEZoDTFWnauj+D256NpEA31ej0ZptbmYN3ZExb1A+q0p02aRpvrbPt+zvVlZG8iFbrVBCwHkl+TnGoHFl3vG4C3P5VDHxWvPKuQ+F+et7c0kVPrCo3fEz+grqGv/BKNg8uJ0IAdFtq7M5AXlM5G+yT3ERYuuGkExQOu9ZnILh8oMdEn2XXeMzb7OoA7g0ayNm2m3JEsAsYM64/kcXwZgfJo22dQ9NDFhfS5Tdddri8nrldQAC/LGOntr+Z20W/dzEDiBC14845Gif9SS1N0dA1M2dUjVLTLGO5vZwyLdpcTzSVAbZZ+L0mgBs3kuyJYmolPianQJimnKJ8dI5SbQ+UwKTagDpoC8XY4PWhXtqVk+/PAMqzPpZPHyooAwRiqCoyHVaHWu4IKgy/x2BW9QJez5X9gvXIbrJlipWheBHkUDABaRTED5vdjqlXgZq9+kG1MQ8r3MMaYvQIWip/05T0w9ZgcgUhwt/qljHa4YR53Jo7JIdODST60lWyXM=" - email: false diff --git a/roles/buildtools/.yamllint b/roles/buildtools/.yamllint deleted file mode 100644 index ad0be76..0000000 --- a/roles/buildtools/.yamllint +++ /dev/null @@ -1,11 +0,0 @@ -extends: default - -rules: - braces: - max-spaces-inside: 1 - level: error - brackets: - max-spaces-inside: 1 - level: error - line-length: disable - truthy: disable diff --git a/roles/buildtools/LICENSE b/roles/buildtools/LICENSE deleted file mode 100644 index 744118c..0000000 --- a/roles/buildtools/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 Robert de Bock (robert@meinit.nl) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/roles/buildtools/defaults/main.yml b/roles/buildtools/defaults/main.yml deleted file mode 100644 index 75c6b21..0000000 --- a/roles/buildtools/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# defaults file for buildtools diff --git a/roles/buildtools/meta/.galaxy_install_info b/roles/buildtools/meta/.galaxy_install_info deleted file mode 100644 index 7b9674b..0000000 --- a/roles/buildtools/meta/.galaxy_install_info +++ /dev/null @@ -1,2 +0,0 @@ -install_date: Mon Dec 16 06:44:47 2019 -version: 2.2.5 diff --git a/roles/buildtools/tox.ini b/roles/buildtools/tox.ini deleted file mode 100644 index a902e16..0000000 --- a/roles/buildtools/tox.ini +++ /dev/null @@ -1,22 +0,0 @@ -# -# Ansible managed -# -[tox] -minversion = 3.7 -envlist = py{37}-ansible-{previous,current,next} -skipsdist = true - -[testenv] -deps = - previous: ansible>=2.8, <2.9 - current: ansible>=2.9 - next: git+https://github.com/ansible/ansible.git@devel - docker - molecule -commands = - molecule test -setenv = - TOX_ENVNAME={envname} - MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} - -passenv = namespace image tag diff --git a/roles/common/.ansible-lint b/roles/common/.ansible-lint deleted file mode 100644 index 5f770c6..0000000 --- a/roles/common/.ansible-lint +++ /dev/null @@ -1,5 +0,0 @@ -# -# Ansible managed -# -exclude_paths: - - ./meta/exception.yml diff --git a/roles/common/.github/ISSUE_TEMPLATE/bug_report.md b/roles/common/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index c695b98..0000000 --- a/roles/common/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**Playbook** -Please paste the playbook you are using. (Consider `requirements.yml` and -optionally the command you've invoked.) - - -```yaml -YOUR PLAYBOOK HERE -``` - -**Output** -Show at least the error, possible related output, maybe just all the output. - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Environment** -- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) -- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) -- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) diff --git a/roles/common/.github/ISSUE_TEMPLATE/feature_request.md b/roles/common/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 066b2d9..0000000 --- a/roles/common/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/roles/common/.travis.yml b/roles/common/.travis.yml deleted file mode 100644 index 8c46a77..0000000 --- a/roles/common/.travis.yml +++ /dev/null @@ -1,53 +0,0 @@ ---- -# -# Ansible managed -# -language: python - -python: - - "3.7" - -services: - - docker - -env: - global: - namespace="robertdebock" - matrix: - - image="amazonlinux" tag="1" - - image="amazonlinux" - - image="alpine" - - image="alpine" tag="edge" - # - namespace="archlinux" image="base" - - image="debian" tag="unstable" - - image="debian" - - image="centos" tag="7" - - image="redhat" tag="7" - - image="centos" - - image="redhat" - - image="fedora" - - image="fedora" tag="rawhide" - - image="opensuse" - - image="ubuntu" - -matrix: - allow_failures: - - env: image="alpine" tag="edge" - - env: image="debian" tag="unstable" - - env: image="fedora" tag="rawhide" - -cache: - - pip - -install: - - pip install --upgrade pip - - pip install tox - -script: - - tox --parallel all - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ - slack: - secure: "bPMYgxeg7GNaRQnvYIeXLf+rVuKC6w8DM5VEAG8tVis+esPrJFY2u8WGUWF5R4xRxNwq5Dn/A7cXPk3RYz9j2BfaGq0QzeN6C4DyJb8LHhL7VVJypOAkcnNpmwlmWYmR5FSJxRA2i8Tmx3kVc82eLZgMNoFgStg2gMQHDHkiNw2bOiPt/HWycXPkpmfjJkg/JTe7yEkLDzO4PyvUwnI7HjZT5RUrSCsZeMiU5uZMi0VgQ41ypgCSoF6X3tlCQP3vyCo9HGN9PQIrIerwrEArUHxiZXycDuBKRlyDj85hQdZzNTz7xzQ8IA58wcFrN/o9/LEv5T7W+iSlx4c4rZjHRZ1yqjBTPmXIDCHnVFObGkSkfXYjyYgjc9fRGYLjorTJqk7mVL5U/AVd+rrhFtcnuKI1o0c8rvK/gOPvr6dLYkRVxGhethcHOrIQAV1KSt1HaFyUKqL89t5448gMKHEH4Q+bTjVxyR9Y50WBIvSRgvxmzsXfepnXmoxETlcDo0Yk/rgCn4M2LI1AzW/xY3nlEwbG4SRFLDSWkXPh6Hxq6ftGnf9ZdfMv4lXuSYxPgwvMNjb7GUKkAMU61fay5OdPbU6qnhDjqV+tKOGYvbyOlso+bf8FoyD+tl8eyl2yQtCcpjbdLfYaDtj/ETweS3VKdrDNJ6Eu/l2gGhw44CPkcEE=" - email: false diff --git a/roles/common/.yamllint b/roles/common/.yamllint deleted file mode 100644 index ad0be76..0000000 --- a/roles/common/.yamllint +++ /dev/null @@ -1,11 +0,0 @@ -extends: default - -rules: - braces: - max-spaces-inside: 1 - level: error - brackets: - max-spaces-inside: 1 - level: error - line-length: disable - truthy: disable diff --git a/roles/common/LICENSE b/roles/common/LICENSE deleted file mode 100644 index 744118c..0000000 --- a/roles/common/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 Robert de Bock (robert@meinit.nl) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/roles/common/meta/.galaxy_install_info b/roles/common/meta/.galaxy_install_info deleted file mode 100644 index 6bcee6e..0000000 --- a/roles/common/meta/.galaxy_install_info +++ /dev/null @@ -1,2 +0,0 @@ -install_date: Mon Dec 16 06:44:52 2019 -version: 3.1.3 diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml deleted file mode 100644 index 32ea262..0000000 --- a/roles/common/tasks/main.yml +++ /dev/null @@ -1,65 +0,0 @@ ---- -# tasks file for common -- name: install requirements - package: - name: "{{ common_requirements }}" - state: present - register: common_install_requirements - until: common_install_requirements is succeeded - retries: 3 - -- name: check for network manager - stat: - path: /etc/NetworkManager/NetworkManager.conf - register: common_check_for_network_manager - -- name: set nameserver in resolv.conf - lineinfile: - path: /etc/resolv.conf - line: "nameserver {{ item }}" - with_items: - - "{{ common_nameservers }}" - when: - - common_nameservers is defined - - not common_check_for_network_manager.stat.exists - - ansible_virtualization_type != "docker" - notify: - - gather facts - -- name: set nameservers in network manager - ini_file: - path: /etc/NetworkManager/conf.d/dnsservers.conf - section: global-dns-domain-* - option: servers - value: "{{ common_nameservers | join(',') }}" - when: - - common_check_for_network_manager.stat.exists - notify: - - reload network manager - - gather facts - -- name: flush handlers - meta: flush_handlers - -- name: set hostname - hostname: - name: "{{ common_hostname }}" - when: - - ansible_virtualization_type != "docker" - register: set_hostname - -- name: reboot for hostname - include_role: - name: robertdebock.reboot - when: - - set_hostname.changed - - common_reboot | bool - tags: - - skip_ansible_lint - -- name: fill /etc/hosts - template: - src: hosts.j2 - dest: /etc/hosts - when: - - ansible_virtualization_type != "docker" diff --git a/roles/common/tox.ini b/roles/common/tox.ini deleted file mode 100644 index a902e16..0000000 --- a/roles/common/tox.ini +++ /dev/null @@ -1,22 +0,0 @@ -# -# Ansible managed -# -[tox] -minversion = 3.7 -envlist = py{37}-ansible-{previous,current,next} -skipsdist = true - -[testenv] -deps = - previous: ansible>=2.8, <2.9 - current: ansible>=2.9 - next: git+https://github.com/ansible/ansible.git@devel - docker - molecule -commands = - molecule test -setenv = - TOX_ENVNAME={envname} - MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} - -passenv = namespace image tag diff --git a/roles/docker/.ansible-lint b/roles/docker/.ansible-lint deleted file mode 100644 index 5f770c6..0000000 --- a/roles/docker/.ansible-lint +++ /dev/null @@ -1,5 +0,0 @@ -# -# Ansible managed -# -exclude_paths: - - ./meta/exception.yml diff --git a/roles/docker/.github/ISSUE_TEMPLATE/bug_report.md b/roles/docker/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index c695b98..0000000 --- a/roles/docker/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**Playbook** -Please paste the playbook you are using. (Consider `requirements.yml` and -optionally the command you've invoked.) - - -```yaml -YOUR PLAYBOOK HERE -``` - -**Output** -Show at least the error, possible related output, maybe just all the output. - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Environment** -- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) -- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) -- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) diff --git a/roles/docker/.github/ISSUE_TEMPLATE/feature_request.md b/roles/docker/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 066b2d9..0000000 --- a/roles/docker/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/roles/docker/.travis.yml b/roles/docker/.travis.yml deleted file mode 100644 index d8dface..0000000 --- a/roles/docker/.travis.yml +++ /dev/null @@ -1,48 +0,0 @@ ---- -# -# Ansible managed -# -language: python - -python: - - "3.7" - -services: - - docker - -env: - global: - namespace="robertdebock" - matrix: - - image="alpine" - - image="alpine" tag="edge" - # - namespace="archlinux" image="base" - - image="debian" tag="unstable" - - image="debian" - - image="centos" tag="7" - - image="centos" - - image="fedora" - - image="fedora" tag="rawhide" - - image="opensuse" - -matrix: - allow_failures: - - env: image="alpine" tag="edge" - - env: image="debian" tag="unstable" - - env: image="fedora" tag="rawhide" - -cache: - - pip - -install: - - pip install --upgrade pip - - pip install tox - -script: - - tox --parallel all - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ - slack: - secure: "meoPGg3WUicE47IA6gfiVlEzuaN/bBoHQ6UNRUjtttvXLWyAHEPHq40NgWxy0iSQ9i6gNVcvzmSFh28aG/27PAeODpsbmePQ8dP+Zn4C4YJJzCEOldZwN79kGfq5VfHUtGcQsegJKPVFbT3bjgLp9Rug8g9ogqT97NwNO1BDcP/ark2TwsWs124tfQWiDDnnzbOZD4kHedOpUC8C1sAwvXFgVWwMk7FDRBUKrCU8xlwKtDCnhxbVeTKp57p1ZEMaQ+BSYZOTzXAbb8csmRQG5nGp+YdBFpSjPDRC9SzYU51dkcTffGfzy155UkVcPhi5KBVXqMM0WFPmmEGwEnL7+pJMGGNePQZlpBK3z+akA4/Vj69PLFQnnhDtGD0FQywYU0b0LnFDWAnkR9oNyWdItHLF/s1VwvearTpZLF35MCiQUeFVL8ZfKpkV3RszZKiywn8PKLc6YmO76Hk06t5CJK1Rmt9BCrko2XaK1LkgRtNx6B2SGF3NrN6t26SHvyHImInE/paq9F4jOmLeBUh96uSoRIzWshd2S5VskB7h25xACNkjXOAwzxuBRTEnVcLJpgOKhvxuCvepQ6D7LsyB3axB6UnHcCD9WCFdeh5ZRVzyqeWxE9Ac9e9+tMghzUohkZD9IRQDPUyUBb82/X9zZeTq55h2h0oFKYebugZPjT4=" - email: false diff --git a/roles/docker/.yamllint b/roles/docker/.yamllint deleted file mode 100644 index ad0be76..0000000 --- a/roles/docker/.yamllint +++ /dev/null @@ -1,11 +0,0 @@ -extends: default - -rules: - braces: - max-spaces-inside: 1 - level: error - brackets: - max-spaces-inside: 1 - level: error - line-length: disable - truthy: disable diff --git a/roles/docker/CONTRIBUTING.md b/roles/docker/CONTRIBUTING.md deleted file mode 100644 index 3209430..0000000 --- a/roles/docker/CONTRIBUTING.md +++ /dev/null @@ -1,10 +0,0 @@ -# Please contribute - -You can really make a difference by: - -- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) -- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. - -I'll try to help and take every contribution seriously. - -It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. diff --git a/roles/docker/LICENSE b/roles/docker/LICENSE deleted file mode 100644 index 744118c..0000000 --- a/roles/docker/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 Robert de Bock (robert@meinit.nl) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/roles/docker/defaults/main.yml b/roles/docker/defaults/main.yml deleted file mode 100644 index f0327f6..0000000 --- a/roles/docker/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# defaults file for docker diff --git a/roles/docker/handlers/main.yml b/roles/docker/handlers/main.yml deleted file mode 100644 index ffc14fd..0000000 --- a/roles/docker/handlers/main.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -# handlers file for docker -- name: change owner for docker socket - file: - path: /var/run/docker.sock - group: docker diff --git a/roles/docker/meta/.galaxy_install_info b/roles/docker/meta/.galaxy_install_info deleted file mode 100644 index bfba71c..0000000 --- a/roles/docker/meta/.galaxy_install_info +++ /dev/null @@ -1,2 +0,0 @@ -install_date: Mon Dec 16 06:44:57 2019 -version: 2.3.2 diff --git a/roles/docker/molecule/default/prepare.yml b/roles/docker/molecule/default/prepare.yml deleted file mode 100644 index 32a00e0..0000000 --- a/roles/docker/molecule/default/prepare.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -- name: Prepare - hosts: all - gather_facts: no - become: yes - - roles: - - robertdebock.bootstrap - - robertdebock.core_dependencies - - robertdebock.buildtools - - robertdebock.epel - - robertdebock.python_pip diff --git a/roles/docker/tox.ini b/roles/docker/tox.ini deleted file mode 100644 index a902e16..0000000 --- a/roles/docker/tox.ini +++ /dev/null @@ -1,22 +0,0 @@ -# -# Ansible managed -# -[tox] -minversion = 3.7 -envlist = py{37}-ansible-{previous,current,next} -skipsdist = true - -[testenv] -deps = - previous: ansible>=2.8, <2.9 - current: ansible>=2.9 - next: git+https://github.com/ansible/ansible.git@devel - docker - molecule -commands = - molecule test -setenv = - TOX_ENVNAME={envname} - MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} - -passenv = namespace image tag diff --git a/roles/epel/.ansible-lint b/roles/epel/.ansible-lint deleted file mode 100644 index 788f1ce..0000000 --- a/roles/epel/.ansible-lint +++ /dev/null @@ -1,3 +0,0 @@ -# -# Ansible managed -# diff --git a/roles/epel/.github/ISSUE_TEMPLATE/bug_report.md b/roles/epel/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index c695b98..0000000 --- a/roles/epel/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**Playbook** -Please paste the playbook you are using. (Consider `requirements.yml` and -optionally the command you've invoked.) - - -```yaml -YOUR PLAYBOOK HERE -``` - -**Output** -Show at least the error, possible related output, maybe just all the output. - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Environment** -- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) -- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) -- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) diff --git a/roles/epel/.github/ISSUE_TEMPLATE/feature_request.md b/roles/epel/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 066b2d9..0000000 --- a/roles/epel/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/roles/epel/.travis.yml b/roles/epel/.travis.yml deleted file mode 100644 index b1153b6..0000000 --- a/roles/epel/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ ---- -# -# Ansible managed -# -language: python - -python: - - "3.7" - -services: - - docker - -env: - global: - namespace="robertdebock" - matrix: - - image="amazonlinux" tag="1" - - image="amazonlinux" - - image="centos" tag="7" - - image="redhat" tag="7" - - image="centos" - - image="redhat" - -matrix: - allow_failures: - -cache: - - pip - -install: - - pip install --upgrade pip - - pip install tox - -script: - - tox --parallel all - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ - slack: - secure: "UCtHXxGlko9yhbPzIlhDNINhnYk1bUCkTyQzHNN/toT37uzzTQGsQksb8AOxS5C3LhkgTcMucM68rlM4yaaDize92ppWOfpePnqasRSLRPnI9HpHF5toJbnEZUA/1L2SBn1oHzrFBpoFiizTSt35yuo2uYIc8SSYphksiywtyW47+SErzZB0A+UvQvHSOj1LRqh5KYe1vcR028V8MabwIV0Pt4IccvPBrKbWjZZgyoYJbwhj+H7dXZ3u5Y7dmoLfcpJFPv44iz4o4zg2NRx7yYuVRyhaNOeikScKyjFXL4t+3RyqEfuWHTg5ffwvxIY2gG7fotj5aplxMlc04FASHLYlQwDKRRXb7pkb0fiK6h9CiB2V8iIXUYhj15lDitTJe1MZu2WUTxA/hGK81aI6IwRCPF1nAphS0UcVfi+EyNIO463aW9vW6t53FIdQ5O4MQuH/YkSmP2y/YX3qoAB9mlcglYOWWgoEFvDpJezRouzOA0wGBhKFRtMg8NZnsTU8CMPsjsRRNDb4Y2mcymkzpKT7ljmKyav+EK9Ko9Mizh5CCIMClsxZ4Hg/1bWn+R4y7T7qlzboGonZ2USw6s/sa/bQ69eAw4JC2IIL7EqadBwTeALUBWd1tY0gvuFPLJIG+LX+XRvne85nYC1m7ioUeGsFrjDrodNuMeyxwiEjfYo=" - email: false diff --git a/roles/epel/.yamllint b/roles/epel/.yamllint deleted file mode 100644 index ad0be76..0000000 --- a/roles/epel/.yamllint +++ /dev/null @@ -1,11 +0,0 @@ -extends: default - -rules: - braces: - max-spaces-inside: 1 - level: error - brackets: - max-spaces-inside: 1 - level: error - line-length: disable - truthy: disable diff --git a/roles/epel/LICENSE b/roles/epel/LICENSE deleted file mode 100644 index 744118c..0000000 --- a/roles/epel/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 Robert de Bock (robert@meinit.nl) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/roles/epel/defaults/main.yml b/roles/epel/defaults/main.yml deleted file mode 100644 index 155edb4..0000000 --- a/roles/epel/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# defaults file for epel diff --git a/roles/epel/meta/.galaxy_install_info b/roles/epel/meta/.galaxy_install_info deleted file mode 100644 index f8c8190..0000000 --- a/roles/epel/meta/.galaxy_install_info +++ /dev/null @@ -1,2 +0,0 @@ -install_date: Mon Dec 16 06:45:01 2019 -version: 2.3.3 diff --git a/roles/epel/molecule/default/playbook.yml b/roles/epel/molecule/default/playbook.yml deleted file mode 100644 index 5cbf3eb..0000000 --- a/roles/epel/molecule/default/playbook.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: Converge - hosts: all - become: yes - gather_facts: yes - - roles: - - ansible-role-epel diff --git a/roles/epel/tasks/main.yml b/roles/epel/tasks/main.yml deleted file mode 100644 index 08627c8..0000000 --- a/roles/epel/tasks/main.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -# tasks file for epel -- name: install epel-release - package: - name: "{{ epel_url }}" - state: present - when: - - ansible_distribution in [ "CentOS", "RedHat", "Amazon" ] - register: epel_install_epel_release - until: epel_install_epel_release is succeeded - retries: 3 diff --git a/roles/epel/tox.ini b/roles/epel/tox.ini deleted file mode 100644 index a902e16..0000000 --- a/roles/epel/tox.ini +++ /dev/null @@ -1,22 +0,0 @@ -# -# Ansible managed -# -[tox] -minversion = 3.7 -envlist = py{37}-ansible-{previous,current,next} -skipsdist = true - -[testenv] -deps = - previous: ansible>=2.8, <2.9 - current: ansible>=2.9 - next: git+https://github.com/ansible/ansible.git@devel - docker - molecule -commands = - molecule test -setenv = - TOX_ENVNAME={envname} - MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} - -passenv = namespace image tag diff --git a/roles/fail2ban/.ansible-lint b/roles/fail2ban/.ansible-lint deleted file mode 100644 index 5f770c6..0000000 --- a/roles/fail2ban/.ansible-lint +++ /dev/null @@ -1,5 +0,0 @@ -# -# Ansible managed -# -exclude_paths: - - ./meta/exception.yml diff --git a/roles/fail2ban/.github/ISSUE_TEMPLATE/bug_report.md b/roles/fail2ban/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index c695b98..0000000 --- a/roles/fail2ban/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**Playbook** -Please paste the playbook you are using. (Consider `requirements.yml` and -optionally the command you've invoked.) - - -```yaml -YOUR PLAYBOOK HERE -``` - -**Output** -Show at least the error, possible related output, maybe just all the output. - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Environment** -- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) -- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) -- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) diff --git a/roles/fail2ban/.github/ISSUE_TEMPLATE/feature_request.md b/roles/fail2ban/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 066b2d9..0000000 --- a/roles/fail2ban/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/roles/fail2ban/.travis.yml b/roles/fail2ban/.travis.yml deleted file mode 100644 index 3494ac4..0000000 --- a/roles/fail2ban/.travis.yml +++ /dev/null @@ -1,48 +0,0 @@ ---- -# -# Ansible managed -# -language: python - -python: - - "3.7" - -services: - - docker - -env: - global: - namespace="robertdebock" - matrix: - - image="amazonlinux" tag="1" - - image="amazonlinux" - # - namespace="archlinux" image="base" - - image="debian" tag="unstable" - - image="debian" - - image="centos" tag="7" - - image="centos" - - image="fedora" - - image="fedora" tag="rawhide" - - image="opensuse" - - image="ubuntu" - -matrix: - allow_failures: - - env: image="debian" tag="unstable" - - env: image="fedora" tag="rawhide" - -cache: - - pip - -install: - - pip install --upgrade pip - - pip install tox - -script: - - tox --parallel all - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ - slack: - secure: "mYOHaSRDBSnw58PRnQB3JPf92saah4d9c6p0zLKWj7SOzc8uOqxbrXTaoHUouoNIVbZuNl64zruYWBZSUCk3ReBFcRWTU+qi0OuQU1ifTeBIH/eM50saQYgjEdMFeN1FYbgI75x2aDJ0go+2qU3kZFvdwDh7xs1McBf2MNKo8Xlwe20jPy8jUyBlp66+DOFJ+W7EGbGkgvUzW5YWlAaL9ItHrDoaup++dBc1RlHDidz/cvfaMzw9XeXTjATOYm9/VhQsHOa9sVKWVe102E6M+uphoel1gjdHSPYLvno85DiK08kJPIvRu+3hvbkWAJKu6H1ILp2g3uF13jZpibTIIaSbXLUCXa2gYi252pUs4+blwuRy7onS67HLiUqG9aufKhcFxgeCvpcn/Au1pMnhLKVG3M9yWe3FxiAzjgfU0rSz/tHhwEr3m1MwylA+k3gfir3uDS6JsFlkAy/6aNRYDoL693yPB/Y1cNHdJTQf5VJ0kcwx/5FGz+1MdxzW2Mw8uTQJa42c1dDOeL6YgkPDbbgCvRP3mh+rHAGn8SGp6O9QzSwTdMwnNMw087N+3Onw1rDsnYVX3KS/j7oqS0TABiPF8SCze8cgW6X1V+5hFD+5H8dhcE05naQicU6Abr+pyA++c5q5AKtg2tbenMAZB+9tkPfF1C+q12HasnNGMl8=" - email: false diff --git a/roles/fail2ban/.yamllint b/roles/fail2ban/.yamllint deleted file mode 100644 index ad0be76..0000000 --- a/roles/fail2ban/.yamllint +++ /dev/null @@ -1,11 +0,0 @@ -extends: default - -rules: - braces: - max-spaces-inside: 1 - level: error - brackets: - max-spaces-inside: 1 - level: error - line-length: disable - truthy: disable diff --git a/roles/fail2ban/CONTRIBUTING.md b/roles/fail2ban/CONTRIBUTING.md deleted file mode 100644 index 3209430..0000000 --- a/roles/fail2ban/CONTRIBUTING.md +++ /dev/null @@ -1,10 +0,0 @@ -# Please contribute - -You can really make a difference by: - -- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) -- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. - -I'll try to help and take every contribution seriously. - -It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. diff --git a/roles/fail2ban/LICENSE b/roles/fail2ban/LICENSE deleted file mode 100644 index 744118c..0000000 --- a/roles/fail2ban/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 Robert de Bock (robert@meinit.nl) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/roles/fail2ban/meta/.galaxy_install_info b/roles/fail2ban/meta/.galaxy_install_info deleted file mode 100644 index 70f447d..0000000 --- a/roles/fail2ban/meta/.galaxy_install_info +++ /dev/null @@ -1,2 +0,0 @@ -install_date: Mon Dec 16 06:45:06 2019 -version: 2.1.1 diff --git a/roles/fail2ban/meta/exception.yml b/roles/fail2ban/meta/exception.yml deleted file mode 100644 index cd1683d..0000000 --- a/roles/fail2ban/meta/exception.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -exceptions: - - variation: alpine - reason: "Service `fail2ban' needs non existent service `logger'" diff --git a/roles/fail2ban/molecule/default/playbook.yml b/roles/fail2ban/molecule/default/playbook.yml deleted file mode 100644 index 3079943..0000000 --- a/roles/fail2ban/molecule/default/playbook.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: Converge - hosts: all - become: yes - gather_facts: yes - - roles: - - ansible-role-fail2ban diff --git a/roles/fail2ban/tox.ini b/roles/fail2ban/tox.ini deleted file mode 100644 index a902e16..0000000 --- a/roles/fail2ban/tox.ini +++ /dev/null @@ -1,22 +0,0 @@ -# -# Ansible managed -# -[tox] -minversion = 3.7 -envlist = py{37}-ansible-{previous,current,next} -skipsdist = true - -[testenv] -deps = - previous: ansible>=2.8, <2.9 - current: ansible>=2.9 - next: git+https://github.com/ansible/ansible.git@devel - docker - molecule -commands = - molecule test -setenv = - TOX_ENVNAME={envname} - MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} - -passenv = namespace image tag diff --git a/roles/git/.ansible-lint b/roles/git/.ansible-lint deleted file mode 100644 index 788f1ce..0000000 --- a/roles/git/.ansible-lint +++ /dev/null @@ -1,3 +0,0 @@ -# -# Ansible managed -# diff --git a/roles/git/.github/ISSUE_TEMPLATE/bug_report.md b/roles/git/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index c695b98..0000000 --- a/roles/git/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**Playbook** -Please paste the playbook you are using. (Consider `requirements.yml` and -optionally the command you've invoked.) - - -```yaml -YOUR PLAYBOOK HERE -``` - -**Output** -Show at least the error, possible related output, maybe just all the output. - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Environment** -- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) -- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) -- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) diff --git a/roles/git/.github/ISSUE_TEMPLATE/feature_request.md b/roles/git/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 066b2d9..0000000 --- a/roles/git/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/roles/git/.travis.yml b/roles/git/.travis.yml deleted file mode 100644 index 0c2f8ab..0000000 --- a/roles/git/.travis.yml +++ /dev/null @@ -1,53 +0,0 @@ ---- -# -# Ansible managed -# -language: python - -python: - - "3.7" - -services: - - docker - -env: - global: - namespace="robertdebock" - matrix: - - image="amazonlinux" tag="1" - - image="amazonlinux" - - image="alpine" - - image="alpine" tag="edge" - # - namespace="archlinux" image="base" - - image="debian" tag="unstable" - - image="debian" - - image="centos" tag="7" - - image="redhat" tag="7" - - image="centos" - - image="redhat" - - image="fedora" - - image="fedora" tag="rawhide" - - image="opensuse" - - image="ubuntu" - -matrix: - allow_failures: - - env: image="alpine" tag="edge" - - env: image="debian" tag="unstable" - - env: image="fedora" tag="rawhide" - -cache: - - pip - -install: - - pip install --upgrade pip - - pip install tox - -script: - - tox --parallel all - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ - slack: - secure: "ZGQaRaplYeFs9BKaNBLpIQocM8GTRjXS9lyFZzdWHacdamjnEyGko8G2HUSfMB/1mjE84z/+TWdPYHFXhYQZzqPv92uRuoE++zisYyiSE8viYnbrLnUoI5HCBWmkKJHrfDgg3hnLVeErvYDG870mz6WyQVIf0UNuTcnS/+lU6JonRFwdp1s8J4At30X3wK9ZGpCtXaWSloFmr0Y2WO7FUBuhdNIhB98j43m8ymLrQAe4Yg085bGUnw112g/uLQ9+NLrZtKSazF8/RpXDKG7WrnAlwHWrlKerePcEywM6Abs0vWGgAcR0COO1+SglPjfQtGViYonDMGITq6S96h1G0cONVVd6x8ykbE29WY0zknsfswcXnQ9mw05Y9woWtt6Et8OYYi1ygQBzD7ClSCzvyja05zVoQOIPojWeYR2uDmTbcxjDM6FKLE75bQYBav2s6+KyqQHl9txNH5m9Xf+3sj6PuNMEmJHdhMiduObMp9ILS3cFgU/kKVbxipXy6r7/az5q+DI7+nAETXNVTKOR13hOH6X0QJ7cYeZgz+bA2pwGMW+cIkHl6UaHvceOcNJskccyBtu5/HOeIrDa1CYuZgOIGWpVh49dhI65s4HRoUXBGwUv+kEjbQ97r9qM6Ixd7ZpSWDjUooJjigvczsL/Qfej1W2UDR+2J79SoTjLs34=" - email: false diff --git a/roles/git/.yamllint b/roles/git/.yamllint deleted file mode 100644 index ad0be76..0000000 --- a/roles/git/.yamllint +++ /dev/null @@ -1,11 +0,0 @@ -extends: default - -rules: - braces: - max-spaces-inside: 1 - level: error - brackets: - max-spaces-inside: 1 - level: error - line-length: disable - truthy: disable diff --git a/roles/git/CONTRIBUTING.md b/roles/git/CONTRIBUTING.md deleted file mode 100644 index 11becd9..0000000 --- a/roles/git/CONTRIBUTING.md +++ /dev/null @@ -1,74 +0,0 @@ -# Please contribute - -You can really make a difference by: - -- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) -- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. - -I'll try to help and take every contribution seriously. - -It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. - -## Step by step - -Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. - -### 1. Make an issue. - -When you spot an issue, [create an issue](https://github.com/robertdebock/git/issues). - -Making the issue help me and others to find similar problems in the future. - -### 2. Fork the project. - -On the top right side of [the repository on GitHub](https://github.com/robertdebock/git), click `fork`. This copies everything to your GitHub namespace. - -### 3. Make the changes - -In you own GitHub namespace, make the required changes. - -I typically do that by cloning the repository (in your namespace) locally: - -``` -git clone git@github.com:YOURNAMESPACE/git.git -``` - -Now you can start to edit on your laptop. - -### 4. Optionally: test your changes - -Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): - -``` -pip install molecule tox -``` - -And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: - -``` -image=centos tag=7 molecule test -``` - -Once it start to work, you can test multiple version of Ansible: - -``` -image=centos tag=7 tox -``` - -### 6. Optionally: Regenerate all dynamic content - -You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. - -If you don't do it, I'll do it later for you. - -### 7. Make a pull request - -[GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. - -In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. - -### 8. Wait - -Now I'll get a message that you've added some code. Thank you, really. - -CI starts to test your changes. You can follow the progress on Travis. diff --git a/roles/git/LICENSE b/roles/git/LICENSE deleted file mode 100644 index 744118c..0000000 --- a/roles/git/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 Robert de Bock (robert@meinit.nl) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/roles/git/meta/.galaxy_install_info b/roles/git/meta/.galaxy_install_info deleted file mode 100644 index 7fbab8a..0000000 --- a/roles/git/meta/.galaxy_install_info +++ /dev/null @@ -1,2 +0,0 @@ -install_date: Mon Dec 16 06:45:11 2019 -version: 3.1.3 diff --git a/roles/git/tox.ini b/roles/git/tox.ini deleted file mode 100644 index a902e16..0000000 --- a/roles/git/tox.ini +++ /dev/null @@ -1,22 +0,0 @@ -# -# Ansible managed -# -[tox] -minversion = 3.7 -envlist = py{37}-ansible-{previous,current,next} -skipsdist = true - -[testenv] -deps = - previous: ansible>=2.8, <2.9 - current: ansible>=2.9 - next: git+https://github.com/ansible/ansible.git@devel - docker - molecule -commands = - molecule test -setenv = - TOX_ENVNAME={envname} - MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} - -passenv = namespace image tag diff --git a/roles/investigate/.ansible-lint b/roles/investigate/.ansible-lint deleted file mode 100644 index 788f1ce..0000000 --- a/roles/investigate/.ansible-lint +++ /dev/null @@ -1,3 +0,0 @@ -# -# Ansible managed -# diff --git a/roles/investigate/.github/ISSUE_TEMPLATE/bug_report.md b/roles/investigate/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index c695b98..0000000 --- a/roles/investigate/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**Playbook** -Please paste the playbook you are using. (Consider `requirements.yml` and -optionally the command you've invoked.) - - -```yaml -YOUR PLAYBOOK HERE -``` - -**Output** -Show at least the error, possible related output, maybe just all the output. - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Environment** -- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) -- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) -- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) diff --git a/roles/investigate/.github/ISSUE_TEMPLATE/feature_request.md b/roles/investigate/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 066b2d9..0000000 --- a/roles/investigate/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/roles/investigate/.travis.yml b/roles/investigate/.travis.yml deleted file mode 100644 index 5ec0492..0000000 --- a/roles/investigate/.travis.yml +++ /dev/null @@ -1,51 +0,0 @@ ---- -# -# Ansible managed -# -language: python - -python: - - "3.7" - -services: - - docker - -env: - global: - namespace="robertdebock" - matrix: - - image="amazonlinux" tag="1" - - image="amazonlinux" - - image="alpine" - - image="alpine" tag="edge" - # - namespace="archlinux" image="base" - - image="debian" tag="unstable" - - image="debian" - - image="centos" tag="7" - - image="centos" - - image="fedora" - - image="fedora" tag="rawhide" - - image="opensuse" - - image="ubuntu" - -matrix: - allow_failures: - - env: image="alpine" tag="edge" - - env: image="debian" tag="unstable" - - env: image="fedora" tag="rawhide" - -cache: - - pip - -install: - - pip install --upgrade pip - - pip install tox - -script: - - tox --parallel all - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ - slack: - secure: "me8c9Zt7dVW51f85HW7hYMWjpZrm1aeb0nUXyz2G2ymZfT2DN9TJOp7PLu0hbucos1qIQjxcc8JXiRsoFKwLxAYr3HrftQF+OS4IffSw5d31bbD93u+vvpJDVjovMHaNIjJj39b3G2siIjzoiAH7fJxrkSWY9Bq3DgK4oH2nMbmjYqc3VG6S3uOJJt/MX8sfq8phl14277TudGlOy4nLxN93GxVWkssFx5/liFk/io1hX8Dv9JtOU+zw9GiS8uoPqTHZtxJaiJyi+omjV8rs+NClHHCCd9nG8pnW4aWZLp1BQtOMSP1qwVwWgXMu1q5SxnYi+kjhHljOI2eoOra1vaDHkHWpLnQ9WnrVITNNVAoRiHyowtg1n0n+V7pd+ZQReGwUtTwsewOvWxB0/K9fBxw10PelIAciayaPQUiv7uCOM7tLz2ljS3sAj/KG/+oYdQoNxhgrLuG8szdZV982f9uFIos5SLe0s4Wo7EjhEFgg2odn1xcRYONFtElBlsxckr+yzSjzsFS7YhjkR0ca2nFUeU1eloRHAY4M76rHO4b9birn5SbXYvrXg+D/zyo2U8DAjWdId5fbQid7jz+u6LDlfbK4a3S4qJLb0fl9HNIdE88mq7XD95AK1XS6Qth8mpCafQthFAYjS4tC50HEZ8tDzag7adkPeKQGSoQE3io=" - email: false diff --git a/roles/investigate/.yamllint b/roles/investigate/.yamllint deleted file mode 100644 index ad0be76..0000000 --- a/roles/investigate/.yamllint +++ /dev/null @@ -1,11 +0,0 @@ -extends: default - -rules: - braces: - max-spaces-inside: 1 - level: error - brackets: - max-spaces-inside: 1 - level: error - line-length: disable - truthy: disable diff --git a/roles/investigate/CONTRIBUTING.md b/roles/investigate/CONTRIBUTING.md deleted file mode 100644 index 3209430..0000000 --- a/roles/investigate/CONTRIBUTING.md +++ /dev/null @@ -1,10 +0,0 @@ -# Please contribute - -You can really make a difference by: - -- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) -- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. - -I'll try to help and take every contribution seriously. - -It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. diff --git a/roles/investigate/LICENSE b/roles/investigate/LICENSE deleted file mode 100644 index 744118c..0000000 --- a/roles/investigate/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 Robert de Bock (robert@meinit.nl) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/roles/investigate/handlers/main.yml b/roles/investigate/handlers/main.yml deleted file mode 100644 index 4149297..0000000 --- a/roles/investigate/handlers/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -# handlers file for investigate -- name: restart investigate - service: - name: "{{ investigate_service }}" - state: restarted - when: - - ansible_virtualization_type != "docker" diff --git a/roles/investigate/meta/.galaxy_install_info b/roles/investigate/meta/.galaxy_install_info deleted file mode 100644 index 97ab5b9..0000000 --- a/roles/investigate/meta/.galaxy_install_info +++ /dev/null @@ -1,2 +0,0 @@ -install_date: Mon Dec 16 06:45:17 2019 -version: 2.1.3 diff --git a/roles/investigate/molecule/default/playbook.yml b/roles/investigate/molecule/default/playbook.yml deleted file mode 100644 index 5508315..0000000 --- a/roles/investigate/molecule/default/playbook.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: Converge - hosts: all - become: yes - gather_facts: yes - - roles: - - ansible-role-investigate diff --git a/roles/investigate/tox.ini b/roles/investigate/tox.ini deleted file mode 100644 index a902e16..0000000 --- a/roles/investigate/tox.ini +++ /dev/null @@ -1,22 +0,0 @@ -# -# Ansible managed -# -[tox] -minversion = 3.7 -envlist = py{37}-ansible-{previous,current,next} -skipsdist = true - -[testenv] -deps = - previous: ansible>=2.8, <2.9 - current: ansible>=2.9 - next: git+https://github.com/ansible/ansible.git@devel - docker - molecule -commands = - molecule test -setenv = - TOX_ENVNAME={envname} - MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} - -passenv = namespace image tag diff --git a/roles/molecule/.ansible-lint b/roles/molecule/.ansible-lint deleted file mode 100644 index 5f770c6..0000000 --- a/roles/molecule/.ansible-lint +++ /dev/null @@ -1,5 +0,0 @@ -# -# Ansible managed -# -exclude_paths: - - ./meta/exception.yml diff --git a/roles/molecule/.github/ISSUE_TEMPLATE/bug_report.md b/roles/molecule/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index c695b98..0000000 --- a/roles/molecule/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**Playbook** -Please paste the playbook you are using. (Consider `requirements.yml` and -optionally the command you've invoked.) - - -```yaml -YOUR PLAYBOOK HERE -``` - -**Output** -Show at least the error, possible related output, maybe just all the output. - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Environment** -- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) -- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) -- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) diff --git a/roles/molecule/.github/ISSUE_TEMPLATE/feature_request.md b/roles/molecule/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 066b2d9..0000000 --- a/roles/molecule/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/roles/molecule/.travis.yml b/roles/molecule/.travis.yml deleted file mode 100644 index 87021fa..0000000 --- a/roles/molecule/.travis.yml +++ /dev/null @@ -1,47 +0,0 @@ ---- -# -# Ansible managed -# -language: python - -python: - - "3.7" - -services: - - docker - -env: - global: - namespace="robertdebock" - matrix: - - image="alpine" - - image="alpine" tag="edge" - # - namespace="archlinux" image="base" - - image="debian" tag="unstable" - - image="debian" - - image="centos" - - image="fedora" - - image="fedora" tag="rawhide" - - image="opensuse" - -matrix: - allow_failures: - - env: image="alpine" tag="edge" - - env: image="debian" tag="unstable" - - env: image="fedora" tag="rawhide" - -cache: - - pip - -install: - - pip install --upgrade pip - - pip install tox - -script: - - tox --parallel all - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ - slack: - secure: "n7u1Uc3sZszghMynczG25+WGHDctpTRgXNpL7VDbj0ehoPQf1e0gNvXh2oQJhjssqfCgSPzdKhbF+X0/TJL2CLIZaMJXzlnQNek1AbpKfAfzmAAk8xCshAvUvto/sP/LKUCUY6dRVUS154p5p9h7RIYVPkBLqvTM0OdOizo6LzJTiqHPd0IwwsUMj6xAms6hwlY1m3M0q1GCx9R+DsqNxKWXR8mEBgvDap+KLxrGT34dOjUZqVqUA7qflbQpLrDsEG6ZR9UIXxOoQoyqwKqXG66FJfKRrMLnxLbi7UC9HBl4Dda0PZIyWbVhotM/vK/8SW72YyR+bqvqBmunPwaU5p15ipArGpMkRTm642RyeKB4XvgCvIBBycC/kl5aj2DBumkGs+nqZpq1fFpK2clSVUHdmkffAddbjRrMH9ZMnWfP85KaHXkg6cymBFxpp+K0uRL6QFTqPO/tHmZ+oWtiKUvy25n06KiDkMdn4MsqfvpaB5CfidbC7zcKMcGk5lcWwvKLMsBKXZI48z7ty/8XKYO1Ss/XgEyPbXg4MrSTwPCY/0tawaAdqqMen+0qLfSURsFN5TG0+Ym/ov+rLqq3TaqyawSRMAe9p1atWKkE3lEbS45KLuvlEMS9W1XHrzrx5MuDcFFqii8ePI7FFeMWoSFqeYXT0Bk7K3FlQ/vyf28=" - email: false diff --git a/roles/molecule/.yamllint b/roles/molecule/.yamllint deleted file mode 100644 index ad0be76..0000000 --- a/roles/molecule/.yamllint +++ /dev/null @@ -1,11 +0,0 @@ -extends: default - -rules: - braces: - max-spaces-inside: 1 - level: error - brackets: - max-spaces-inside: 1 - level: error - line-length: disable - truthy: disable diff --git a/roles/molecule/CONTRIBUTING.md b/roles/molecule/CONTRIBUTING.md deleted file mode 100644 index 3209430..0000000 --- a/roles/molecule/CONTRIBUTING.md +++ /dev/null @@ -1,10 +0,0 @@ -# Please contribute - -You can really make a difference by: - -- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) -- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. - -I'll try to help and take every contribution seriously. - -It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. diff --git a/roles/molecule/LICENSE b/roles/molecule/LICENSE deleted file mode 100644 index 744118c..0000000 --- a/roles/molecule/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 Robert de Bock (robert@meinit.nl) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/roles/molecule/meta/.galaxy_install_info b/roles/molecule/meta/.galaxy_install_info deleted file mode 100644 index 3a68e08..0000000 --- a/roles/molecule/meta/.galaxy_install_info +++ /dev/null @@ -1,2 +0,0 @@ -install_date: Mon Dec 16 06:45:23 2019 -version: 2.1.1 diff --git a/roles/molecule/molecule/default/playbook.yml b/roles/molecule/molecule/default/playbook.yml deleted file mode 100644 index 800082b..0000000 --- a/roles/molecule/molecule/default/playbook.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: Converge - hosts: all - become: yes - gather_facts: yes - - roles: - - ansible-role-molecule diff --git a/roles/molecule/tox.ini b/roles/molecule/tox.ini deleted file mode 100644 index a902e16..0000000 --- a/roles/molecule/tox.ini +++ /dev/null @@ -1,22 +0,0 @@ -# -# Ansible managed -# -[tox] -minversion = 3.7 -envlist = py{37}-ansible-{previous,current,next} -skipsdist = true - -[testenv] -deps = - previous: ansible>=2.8, <2.9 - current: ansible>=2.9 - next: git+https://github.com/ansible/ansible.git@devel - docker - molecule -commands = - molecule test -setenv = - TOX_ENVNAME={envname} - MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} - -passenv = namespace image tag diff --git a/roles/postfix/.ansible-lint b/roles/postfix/.ansible-lint deleted file mode 100644 index 5f770c6..0000000 --- a/roles/postfix/.ansible-lint +++ /dev/null @@ -1,5 +0,0 @@ -# -# Ansible managed -# -exclude_paths: - - ./meta/exception.yml diff --git a/roles/postfix/.github/ISSUE_TEMPLATE/bug_report.md b/roles/postfix/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index c695b98..0000000 --- a/roles/postfix/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**Playbook** -Please paste the playbook you are using. (Consider `requirements.yml` and -optionally the command you've invoked.) - - -```yaml -YOUR PLAYBOOK HERE -``` - -**Output** -Show at least the error, possible related output, maybe just all the output. - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Environment** -- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) -- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) -- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) diff --git a/roles/postfix/.github/ISSUE_TEMPLATE/feature_request.md b/roles/postfix/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 066b2d9..0000000 --- a/roles/postfix/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/roles/postfix/.travis.yml b/roles/postfix/.travis.yml deleted file mode 100644 index 674a815..0000000 --- a/roles/postfix/.travis.yml +++ /dev/null @@ -1,50 +0,0 @@ ---- -# -# Ansible managed -# -language: python - -python: - - "3.7" - -services: - - docker - -env: - global: - namespace="robertdebock" - matrix: - - image="alpine" - - image="alpine" tag="edge" - # - namespace="archlinux" image="base" - - image="debian" tag="unstable" - - image="debian" - - image="centos" tag="7" - - image="redhat" tag="7" - - image="centos" - - image="redhat" - - image="fedora" - - image="fedora" tag="rawhide" - - image="ubuntu" - -matrix: - allow_failures: - - env: image="alpine" tag="edge" - - env: image="debian" tag="unstable" - - env: image="fedora" tag="rawhide" - -cache: - - pip - -install: - - pip install --upgrade pip - - pip install tox - -script: - - tox --parallel all - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ - slack: - secure: "Wi69Ef0QvViLESAaT/IZFiPjBzqSyalb5VajrCtb4Zj1L0HT0Wt7kWwJhXiiLtAycCRZAqidjBcJvBF7eCVRjGSVkTDSX3HnMG/ErbKYshlNt/aelTEAt5bfqUmDOP9mvXL7kWbuGa7P+0BDPGc96QLX3OhhmivVZSuhTSUQbtBV71c92IAw1D+w/MSeu4yevrPL3vNAqgmjk6tqzA00wahIESgyZY8FtiCSDCyoL9FwUxCOt8Ko9zXf8TEM4ZbhihF4NmUe2klAlPnzFXkMHrPnFDWbHL0PpjSm1ALM8d5jsBC8YjI+oTCI5x82/Z0Ov1MntSyy/JEOHqOn835UhvOql2nDOHTS7IMsPAaskiNu9PMnSX7RQDgoGFfIKEaMS4/q/c/Uxzmi5WHzieS/yT4ghPi66EYaYjoLS4/cXIfrZsAHkl5xCQSLQyPgkzUkS/yWDduzusTvq/qxMoWP8m8asjNPfz13sou2/ZyVBXXQv0dDIWGO3hhFbucZ6hJqmOnbXRnngNXY4W68VFa2KatiOvMgDSJyG+Tk+R5sPHVxnTSv7Q3qzQbV6osS542VG3aV6y3SNhYU201pCwKxQHh9dpatnwijnpDVBZWKVGnA/rRWlf1MZ/1Y3saXd7irubUNgc1J3jYrEVk6g/EUZ/dfQlmvvJw3sRrBWPWkOWc=" - email: false diff --git a/roles/postfix/.yamllint b/roles/postfix/.yamllint deleted file mode 100644 index ad0be76..0000000 --- a/roles/postfix/.yamllint +++ /dev/null @@ -1,11 +0,0 @@ -extends: default - -rules: - braces: - max-spaces-inside: 1 - level: error - brackets: - max-spaces-inside: 1 - level: error - line-length: disable - truthy: disable diff --git a/roles/postfix/CONTRIBUTING.md b/roles/postfix/CONTRIBUTING.md deleted file mode 100644 index fa765a3..0000000 --- a/roles/postfix/CONTRIBUTING.md +++ /dev/null @@ -1,74 +0,0 @@ -# Please contribute - -You can really make a difference by: - -- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) -- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. - -I'll try to help and take every contribution seriously. - -It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. - -## Step by step - -Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. - -### 1. Make an issue. - -When you spot an issue, [create an issue](https://github.com/robertdebock/postfix/issues). - -Making the issue help me and others to find similar problems in the future. - -### 2. Fork the project. - -On the top right side of [the repository on GitHub](https://github.com/robertdebock/postfix), click `fork`. This copies everything to your GitHub namespace. - -### 3. Make the changes - -In you own GitHub namespace, make the required changes. - -I typically do that by cloning the repository (in your namespace) locally: - -``` -git clone git@github.com:YOURNAMESPACE/postfix.git -``` - -Now you can start to edit on your laptop. - -### 4. Optionally: test your changes - -Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): - -``` -pip install molecule tox -``` - -And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: - -``` -image=centos tag=7 molecule test -``` - -Once it start to work, you can test multiple version of Ansible: - -``` -image=centos tag=7 tox -``` - -### 6. Optionally: Regenerate all dynamic content - -You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. - -If you don't do it, I'll do it later for you. - -### 7. Make a pull request - -[GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. - -In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. - -### 8. Wait - -Now I'll get a message that you've added some code. Thank you, really. - -CI starts to test your changes. You can follow the progress on Travis. diff --git a/roles/postfix/LICENSE b/roles/postfix/LICENSE deleted file mode 100644 index 744118c..0000000 --- a/roles/postfix/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 Robert de Bock (robert@meinit.nl) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/roles/postfix/handlers/main.yml b/roles/postfix/handlers/main.yml deleted file mode 100644 index c632d52..0000000 --- a/roles/postfix/handlers/main.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# handlers file for postfix -- name: restart postfix - service: - name: "{{ postfix_service }}" - state: restarted - -- name: rebuild alias database - command: postmap "{{ postfix_alias_path }}" diff --git a/roles/postfix/meta/.galaxy_install_info b/roles/postfix/meta/.galaxy_install_info deleted file mode 100644 index 078660c..0000000 --- a/roles/postfix/meta/.galaxy_install_info +++ /dev/null @@ -1,2 +0,0 @@ -install_date: Mon Dec 16 06:45:28 2019 -version: 2.1.1 diff --git a/roles/postfix/molecule/default/playbook.yml b/roles/postfix/molecule/default/playbook.yml deleted file mode 100644 index a357fa3..0000000 --- a/roles/postfix/molecule/default/playbook.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -- name: Converge - hosts: all - become: yes - gather_facts: yes - - vars: - postfix_aliases: - - name: root - destination: robert@meinit.nl - - roles: - - ansible-role-postfix diff --git a/roles/postfix/molecule/default/prepare.yml b/roles/postfix/molecule/default/prepare.yml deleted file mode 100644 index ca6c748..0000000 --- a/roles/postfix/molecule/default/prepare.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -- name: Prepare - hosts: all - become: yes - gather_facts: no - - roles: - - robertdebock.bootstrap - - robertdebock.core_dependencies diff --git a/roles/postfix/tasks/main.yml b/roles/postfix/tasks/main.yml deleted file mode 100644 index 2cdd152..0000000 --- a/roles/postfix/tasks/main.yml +++ /dev/null @@ -1,60 +0,0 @@ ---- -# tasks file for postfix -- name: install postfix - package: - name: "{{ postfix_packages }}" - state: present - register: postfix_install_postfix - until: postfix_install_postfix is succeeded - retries: 3 - -- name: create group - group: - name: "{{ postfix_group }}" - state: present - -- name: configure postfix (main.cf) - template: - src: main.cf.j2 - dest: /etc/postfix/main.cf - validate: postconf -d -c %s - notify: - - restart postfix - -- name: configure postfix (master.cf) - template: - src: master.cf.j2 - dest: /etc/postfix/master.cf - validate: postconf -d -c %s - notify: - - restart postfix - -- name: configure aliases - lineinfile: - path: "{{ postfix_alias_path }}" - regexp: "^{{ item.name }}:" - line: "{{ item.name }}: {{ item.destination }}" - when: - - postfix_aliases is defined - with_items: - - "{{ postfix_aliases }}" - notify: - - rebuild alias database - loop_control: - label: "{{ item.name }}" - -- name: set group owner - file: - path: "{{ item }}" - group: "{{ postfix_group }}" - with_items: - - /usr/sbin/postqueue - - /usr/sbin/postdrop - - /var/spool/postfix/public - - /var/spool/postfix/maildrop - -- name: start and enable postfix - service: - name: "{{ postfix_service }}" - state: started - enabled: yes diff --git a/roles/postfix/tox.ini b/roles/postfix/tox.ini deleted file mode 100644 index a902e16..0000000 --- a/roles/postfix/tox.ini +++ /dev/null @@ -1,22 +0,0 @@ -# -# Ansible managed -# -[tox] -minversion = 3.7 -envlist = py{37}-ansible-{previous,current,next} -skipsdist = true - -[testenv] -deps = - previous: ansible>=2.8, <2.9 - current: ansible>=2.9 - next: git+https://github.com/ansible/ansible.git@devel - docker - molecule -commands = - molecule test -setenv = - TOX_ENVNAME={envname} - MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} - -passenv = namespace image tag diff --git a/roles/python_pip/.ansible-lint b/roles/python_pip/.ansible-lint deleted file mode 100644 index 5f770c6..0000000 --- a/roles/python_pip/.ansible-lint +++ /dev/null @@ -1,5 +0,0 @@ -# -# Ansible managed -# -exclude_paths: - - ./meta/exception.yml diff --git a/roles/python_pip/.github/ISSUE_TEMPLATE/bug_report.md b/roles/python_pip/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index c695b98..0000000 --- a/roles/python_pip/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**Playbook** -Please paste the playbook you are using. (Consider `requirements.yml` and -optionally the command you've invoked.) - - -```yaml -YOUR PLAYBOOK HERE -``` - -**Output** -Show at least the error, possible related output, maybe just all the output. - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Environment** -- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) -- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) -- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) diff --git a/roles/python_pip/.github/ISSUE_TEMPLATE/feature_request.md b/roles/python_pip/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 066b2d9..0000000 --- a/roles/python_pip/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/roles/python_pip/.travis.yml b/roles/python_pip/.travis.yml deleted file mode 100644 index b1421c7..0000000 --- a/roles/python_pip/.travis.yml +++ /dev/null @@ -1,49 +0,0 @@ ---- -# -# Ansible managed -# -language: python - -python: - - "3.7" - -services: - - docker - -env: - global: - namespace="robertdebock" - matrix: - - image="alpine" - - image="alpine" tag="edge" - # - namespace="archlinux" image="base" - - image="debian" tag="unstable" - - image="debian" - - image="centos" tag="7" - - image="centos" - - image="fedora" - - image="fedora" tag="rawhide" - - image="opensuse" - - image="ubuntu" - -matrix: - allow_failures: - - env: image="alpine" tag="edge" - - env: image="debian" tag="unstable" - - env: image="fedora" tag="rawhide" - -cache: - - pip - -install: - - pip install --upgrade pip - - pip install tox - -script: - - tox --parallel all - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ - slack: - secure: "rJpoqZx8pkcsMfTDcNAfoo7JI6vQFtmkQFQS7XfEILkYLYPXtpXRM24NT2lz7cTW6CsYmGc6PiCCToIUpbzXYUX05T/fgC0aEYODSdudmChzlMlaUIlvhenMklWHa2aVJLZZK7/HVj7hd+YWWaWjRRdUjNjT42qMAQNkUtuarrICnSJRKDvXnh2KuIbZz/wzf8fLhQLEDRjeNwvxNz835r1d2MqHKMddPlM9LIMA6W9NoTSVzC7OjcGUcITQo4IppJmeFLR1ijjHSrgIC+8mCJCMMc2MoU7iALZPNHciWcy8R1nQVEFwuTf4sq+nQAseilNYB4z8I8Lvzm6gdOco+TRfpj7D/beZ33NHOtv5yxbrQ2Z40FKcMncCG5vBejX70Mx6kLqKuFbUTDworhEyhDSs3AcA3WAY2+keQKWlFnPYZdrAPVsLbYFDjolU9/vl4P56wbxfTFIhAicAPkJfFXWYRdRRD0UdDZQ1YzsgRb/2KX/rhQZCKxq84EMUg7F8D0AYBnb+pFokZHY8zeR2CkyjMePZWw8mln1dzIptSiduO8Z1Cf/mJxfyOBI9MFGw8B3i8wuZOpINkq6F6n2GsZGtQaZ5oOC1mZXCXxBRhZT7RvlzwO5b3iAkKJwDVOFnm0VHtNJwg6O9g3jYvy+LkSBd7jlcTcl2Vu4zsT8siFk=" - email: false diff --git a/roles/python_pip/.yamllint b/roles/python_pip/.yamllint deleted file mode 100644 index ad0be76..0000000 --- a/roles/python_pip/.yamllint +++ /dev/null @@ -1,11 +0,0 @@ -extends: default - -rules: - braces: - max-spaces-inside: 1 - level: error - brackets: - max-spaces-inside: 1 - level: error - line-length: disable - truthy: disable diff --git a/roles/python_pip/CONTRIBUTING.md b/roles/python_pip/CONTRIBUTING.md deleted file mode 100644 index 6f436d4..0000000 --- a/roles/python_pip/CONTRIBUTING.md +++ /dev/null @@ -1,74 +0,0 @@ -# Please contribute - -You can really make a difference by: - -- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) -- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. - -I'll try to help and take every contribution seriously. - -It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. - -## Step by step - -Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. - -### 1. Make an issue. - -When you spot an issue, [create an issue](https://github.com/robertdebock/python_pip/issues). - -Making the issue help me and others to find similar problems in the future. - -### 2. Fork the project. - -On the top right side of [the repository on GitHub](https://github.com/robertdebock/python_pip), click `fork`. This copies everything to your GitHub namespace. - -### 3. Make the changes - -In you own GitHub namespace, make the required changes. - -I typically do that by cloning the repository (in your namespace) locally: - -``` -git clone git@github.com:YOURNAMESPACE/python_pip.git -``` - -Now you can start to edit on your laptop. - -### 4. Optionally: test your changes - -Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): - -``` -pip install molecule tox -``` - -And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: - -``` -image=centos tag=7 molecule test -``` - -Once it start to work, you can test multiple version of Ansible: - -``` -image=centos tag=7 tox -``` - -### 6. Optionally: Regenerate all dynamic content - -You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. - -If you don't do it, I'll do it later for you. - -### 7. Make a pull request - -[GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. - -In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. - -### 8. Wait - -Now I'll get a message that you've added some code. Thank you, really. - -CI starts to test your changes. You can follow the progress on Travis. diff --git a/roles/python_pip/LICENSE b/roles/python_pip/LICENSE deleted file mode 100644 index 744118c..0000000 --- a/roles/python_pip/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 Robert de Bock (robert@meinit.nl) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/roles/python_pip/meta/.galaxy_install_info b/roles/python_pip/meta/.galaxy_install_info deleted file mode 100644 index 1734496..0000000 --- a/roles/python_pip/meta/.galaxy_install_info +++ /dev/null @@ -1,2 +0,0 @@ -install_date: Mon Dec 16 06:45:33 2019 -version: 3.0.9 diff --git a/roles/python_pip/molecule/default/playbook.yml b/roles/python_pip/molecule/default/playbook.yml deleted file mode 100644 index 66d12e6..0000000 --- a/roles/python_pip/molecule/default/playbook.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: Converge - hosts: all - become: yes - gather_facts: yes - - roles: - - ansible-role-python_pip diff --git a/roles/python_pip/molecule/default/prepare.yml b/roles/python_pip/molecule/default/prepare.yml deleted file mode 100644 index 99c05e0..0000000 --- a/roles/python_pip/molecule/default/prepare.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -- name: Prepare - hosts: all - gather_facts: no - become: yes - - roles: - - robertdebock.bootstrap - - robertdebock.epel - - robertdebock.buildtools diff --git a/roles/python_pip/molecule/default/verify.yml b/roles/python_pip/molecule/default/verify.yml deleted file mode 100644 index 13736fb..0000000 --- a/roles/python_pip/molecule/default/verify.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -- name: Verify - hosts: all - become: yes - gather_facts: yes - - tasks: - - name: install pip module - pip: - name: ansible - state: present diff --git a/roles/python_pip/tox.ini b/roles/python_pip/tox.ini deleted file mode 100644 index a902e16..0000000 --- a/roles/python_pip/tox.ini +++ /dev/null @@ -1,22 +0,0 @@ -# -# Ansible managed -# -[tox] -minversion = 3.7 -envlist = py{37}-ansible-{previous,current,next} -skipsdist = true - -[testenv] -deps = - previous: ansible>=2.8, <2.9 - current: ansible>=2.9 - next: git+https://github.com/ansible/ansible.git@devel - docker - molecule -commands = - molecule test -setenv = - TOX_ENVNAME={envname} - MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} - -passenv = namespace image tag diff --git a/roles/python_pip/vars/main.yml b/roles/python_pip/vars/main.yml deleted file mode 100644 index f33b957..0000000 --- a/roles/python_pip/vars/main.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -# vars file for python_pip -_python_pip_packages: - Alpine: - - py-pip - - py-setuptools - - python2-dev - Archlinux: - - python-pip - - python-setuptools - Debian: - - python3-pip - - python3-setuptools - CentOS-7: - - python2-pip - - python-setuptools - RedHat-7: - - python2-pip - - python-setuptools - RedHat: - - python3-pip - - python3-setuptools - Suse: - - python-pip - - python-setuptools - -python_pip_packages: "{{ _python_pip_packages[ansible_distribution ~ '-' ~ ansible_distribution_major_version] | default(_python_pip_packages[ansible_os_family] | default(_python_pip_packages['default'])) }}" diff --git a/roles/reboot/.ansible-lint b/roles/reboot/.ansible-lint deleted file mode 100644 index 5f770c6..0000000 --- a/roles/reboot/.ansible-lint +++ /dev/null @@ -1,5 +0,0 @@ -# -# Ansible managed -# -exclude_paths: - - ./meta/exception.yml diff --git a/roles/reboot/.github/ISSUE_TEMPLATE/bug_report.md b/roles/reboot/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index c695b98..0000000 --- a/roles/reboot/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**Playbook** -Please paste the playbook you are using. (Consider `requirements.yml` and -optionally the command you've invoked.) - - -```yaml -YOUR PLAYBOOK HERE -``` - -**Output** -Show at least the error, possible related output, maybe just all the output. - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Environment** -- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) -- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) -- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) diff --git a/roles/reboot/.github/ISSUE_TEMPLATE/feature_request.md b/roles/reboot/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 066b2d9..0000000 --- a/roles/reboot/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/roles/reboot/.travis.yml b/roles/reboot/.travis.yml deleted file mode 100644 index d0b5d38..0000000 --- a/roles/reboot/.travis.yml +++ /dev/null @@ -1,50 +0,0 @@ ---- -# -# Ansible managed -# -language: python - -python: - - "3.7" - -services: - - docker - -env: - global: - namespace="robertdebock" - matrix: - - image="alpine" - - image="alpine" tag="edge" - - image="debian" tag="unstable" - - image="debian" - - image="centos" tag="7" - - image="redhat" tag="7" - - image="centos" - - image="redhat" - - image="fedora" - - image="fedora" tag="rawhide" - - image="opensuse" - - image="ubuntu" - -matrix: - allow_failures: - - env: image="alpine" tag="edge" - - env: image="debian" tag="unstable" - - env: image="fedora" tag="rawhide" - -cache: - - pip - -install: - - pip install --upgrade pip - - pip install tox - -script: - - tox --parallel all - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ - slack: - secure: "KeXA8wXxYX41jjXJAMEU3dBFf0jf6T/OuY62Zt6fCxmse+R4nC7P6TZGx7LKjaVCXKdRz3+giJz7Ef/7q23yTSFIoasiB0rzWiAg0S0E5o8ZFdJ0HdQQZknA7j21GcvK9Kj/zgxXUqFu6hhc+vgKRnPAMOjpyaoo74PwG4kHARFLAxb7fKdCxhkfBWvtdkgAUWzESWNeUHNsknFlbEP7PTk1akfsOaC3xUYjfA7kmZMH6w0eM+/FuTaoYdJ8EM3OcH+3j2q0IXuXVrJ0B1IyGvpJ1qVvDu9YSvkxbD6Qd9BCVRDBkCcTxsBpZX+Ks5DhaTOO71zsk1nZtBIFPAanXARygoyuMrAS4exfSrWT2TTxu0D01J9JZUlGmI/Uf7R9Kf7LAT1KfvZR/7VAK3X53i3pZHQqp8EOPr+FGpB9MPn62jfWF7gWYR8AfP4M1gaP7JYVxZqmSKE0LgqQNY/SmPcs37TU8jL6h1ojN0PPy8tRhGUhY3/tQq/19aF62WDTzH1j/OgcI5GrAZ2bR8EOQGvSfJX2uWnFhBQsISxaYo4Eiocw5z/QGU/JFBXOgipAGeS2PjiR3PYa3SkeftEOHnbp7rzakKd4zDCM/EGiIG4rPnFSwvVPBnnm64ut+PqpX8JI5uxdoJ8bjVIM/47hGNUnVFIG/ZQUXzI5vySqwyY=" - email: false diff --git a/roles/reboot/.yamllint b/roles/reboot/.yamllint deleted file mode 100644 index ad0be76..0000000 --- a/roles/reboot/.yamllint +++ /dev/null @@ -1,11 +0,0 @@ -extends: default - -rules: - braces: - max-spaces-inside: 1 - level: error - brackets: - max-spaces-inside: 1 - level: error - line-length: disable - truthy: disable diff --git a/roles/reboot/CONTRIBUTING.md b/roles/reboot/CONTRIBUTING.md deleted file mode 100644 index b8b9b09..0000000 --- a/roles/reboot/CONTRIBUTING.md +++ /dev/null @@ -1,74 +0,0 @@ -# Please contribute - -You can really make a difference by: - -- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) -- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. - -I'll try to help and take every contribution seriously. - -It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. - -## Step by step - -Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. - -### 1. Make an issue. - -When you spot an issue, [create an issue](https://github.com/robertdebock/reboot/issues). - -Making the issue help me and others to find similar problems in the future. - -### 2. Fork the project. - -On the top right side of [the repository on GitHub](https://github.com/robertdebock/reboot), click `fork`. This copies everything to your GitHub namespace. - -### 3. Make the changes - -In you own GitHub namespace, make the required changes. - -I typically do that by cloning the repository (in your namespace) locally: - -``` -git clone git@github.com:YOURNAMESPACE/reboot.git -``` - -Now you can start to edit on your laptop. - -### 4. Optionally: test your changes - -Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): - -``` -pip install molecule tox -``` - -And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: - -``` -image=centos tag=7 molecule test -``` - -Once it start to work, you can test multiple version of Ansible: - -``` -image=centos tag=7 tox -``` - -### 6. Optionally: Regenerate all dynamic content - -You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. - -If you don't do it, I'll do it later for you. - -### 7. Make a pull request - -[GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. - -In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. - -### 8. Wait - -Now I'll get a message that you've added some code. Thank you, really. - -CI starts to test your changes. You can follow the progress on Travis. diff --git a/roles/reboot/LICENSE b/roles/reboot/LICENSE deleted file mode 100644 index 744118c..0000000 --- a/roles/reboot/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 Robert de Bock (robert@meinit.nl) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/roles/reboot/handlers/main.yml b/roles/reboot/handlers/main.yml deleted file mode 100644 index 294f982..0000000 --- a/roles/reboot/handlers/main.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -# handlers file for reboot -- name: 1 wait for the start of reboot - pause: - seconds: "{{ reboot_delay }}" - -- name: 2 wait for the machine to be up - wait_for_connection: - delay: "{{ reboot_up_delay }}" - -- name: 3 gather facts after reboot - setup: diff --git a/roles/reboot/meta/.galaxy_install_info b/roles/reboot/meta/.galaxy_install_info deleted file mode 100644 index 9537fad..0000000 --- a/roles/reboot/meta/.galaxy_install_info +++ /dev/null @@ -1,2 +0,0 @@ -install_date: Mon Dec 16 06:45:38 2019 -version: 2.3.4 diff --git a/roles/reboot/meta/exception.yml b/roles/reboot/meta/exception.yml deleted file mode 100644 index 98f94ba..0000000 --- a/roles/reboot/meta/exception.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -exceptions: - - variation: archlinux/base - reason: New-style module did not handle its own exit diff --git a/roles/reboot/molecule/default/playbook.yml b/roles/reboot/molecule/default/playbook.yml deleted file mode 100644 index 1a33108..0000000 --- a/roles/reboot/molecule/default/playbook.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: Converge - hosts: all - become: yes - gather_facts: yes - - roles: - - ansible-role-reboot diff --git a/roles/reboot/tasks/main.yml b/roles/reboot/tasks/main.yml deleted file mode 100644 index d9c41c3..0000000 --- a/roles/reboot/tasks/main.yml +++ /dev/null @@ -1,51 +0,0 @@ ---- -# tasks file for reboot -- name: install requirements - package: - name: "{{ reboot_requirements }}" - state: present - register: reboot_install_requirements - until: reboot_install_requirements is succeeded - retries: 3 - -- name: check for needs-restarting for rhel - stat: - path: /usr/bin/needs-restarting - register: reboot_check_for_needs_restarting_for_rhel - -- name: check for needs-restarting for debian - stat: - path: /var/run/needs-restarting - register: reboot_check_for_needs_restarting_for_debian - -- name: see if a reboot is required for rhel - command: "{{ reboot_needs_restarting_command }}" - register: needsrestarting - changed_when: - - needsrestarting.rc != 0 - failed_when: - - needsrestarting.rc != 1 - - needsrestarting.rc != 0 - when: - - ansible_virtualization_type != "docker" - - reboot_check_for_needs_restarting_for_rhel.stat.exists - - not reboot_always | bool - -- name: reboot the machine - shell: "(sleep {{ reboot_delay }} && {{ reboot_command }} &)" - async: 1 - poll: 0 - ignore_errors: yes - when: - - ansible_virtualization_type != "docker" - - reboot_always | bool or - ((reboot_check_for_needs_restarting_for_rhel.stat.exists and - needsrestarting.rc == 1) or - reboot_check_for_needs_restarting_for_debian.stat.exists) - notify: - - 1 wait for the start of reboot - - 2 wait for the machine to be up - - 3 gather facts after reboot - -- name: flush handlers - meta: flush_handlers diff --git a/roles/reboot/tox.ini b/roles/reboot/tox.ini deleted file mode 100644 index a902e16..0000000 --- a/roles/reboot/tox.ini +++ /dev/null @@ -1,22 +0,0 @@ -# -# Ansible managed -# -[tox] -minversion = 3.7 -envlist = py{37}-ansible-{previous,current,next} -skipsdist = true - -[testenv] -deps = - previous: ansible>=2.8, <2.9 - current: ansible>=2.9 - next: git+https://github.com/ansible/ansible.git@devel - docker - molecule -commands = - molecule test -setenv = - TOX_ENVNAME={envname} - MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} - -passenv = namespace image tag diff --git a/roles/requirements.yml b/roles/requirements.yml index cabb0af..ccb73c8 100644 --- a/roles/requirements.yml +++ b/roles/requirements.yml @@ -1,45 +1,23 @@ --- - src: robertdebock.ansible - name: ansible - src: robertdebock.ansible_lint - name: ansible_lint - src: robertdebock.ara - name: ara - src: robertdebock.atom - name: atom - src: robertdebock.bootstrap - name: bootstrap - src: robertdebock.buildtools - name: buildtools - src: robertdebock.common - name: common - src: robertdebock.docker - name: docker - src: robertdebock.epel - name: epel - src: robertdebock.fail2ban - name: fail2ban - src: robertdebock.git - name: git - src: robertdebock.investigate - name: investigate - src: robertdebock.molecule - name: molecule - src: robertdebock.postfix - name: postfix - src: robertdebock.python_pip - name: python_pip - src: robertdebock.reboot - name: reboot - src: robertdebock.ruby - name: ruby - src: robertdebock.service - name: service - src: robertdebock.travis - name: travis - src: robertdebock.update - name: update - src: robertdebock.users - name: users - src: robertdebock.vagrant - name: vagrant diff --git a/roles/robertdebock.ansible/.ansible-lint b/roles/robertdebock.ansible/.ansible-lint new file mode 100644 index 0000000..eba57d1 --- /dev/null +++ b/roles/robertdebock.ansible/.ansible-lint @@ -0,0 +1,8 @@ +# +# Ansible managed +# +exclude_paths: + - ./meta/exception.yml + - ./meta/preferences.yml + - ./molecule/default/verify.yml + - ./.tox diff --git a/roles/robertdebock.ansible/.github/FUNDING.yml b/roles/robertdebock.ansible/.github/FUNDING.yml new file mode 100644 index 0000000..67320f0 --- /dev/null +++ b/roles/robertdebock.ansible/.github/FUNDING.yml @@ -0,0 +1,2 @@ +--- +github: robertdebock diff --git a/roles/ara/.github/ISSUE_TEMPLATE/bug_report.md b/roles/robertdebock.ansible/.github/ISSUE_TEMPLATE/bug_report.md similarity index 72% rename from roles/ara/.github/ISSUE_TEMPLATE/bug_report.md rename to roles/robertdebock.ansible/.github/ISSUE_TEMPLATE/bug_report.md index c695b98..f39b5dc 100644 --- a/roles/ara/.github/ISSUE_TEMPLATE/bug_report.md +++ b/roles/robertdebock.ansible/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,28 +1,31 @@ --- name: Bug report -about: Create a report to help us improve +about: Create a report to help me improve --- -**Describe the bug** +## Describe the bug A clear and concise description of what the bug is. -**Playbook** +## Playbook + Please paste the playbook you are using. (Consider `requirements.yml` and optionally the command you've invoked.) ```yaml +--- YOUR PLAYBOOK HERE ``` -**Output** +## Output + Show at least the error, possible related output, maybe just all the output. -**Expected behavior** -A clear and concise description of what you expected to happen. +## Environment -**Environment** - Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) - Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) - Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.ansible/.github/ISSUE_TEMPLATE/feature_request.md b/roles/robertdebock.ansible/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..55a93c4 --- /dev/null +++ b/roles/robertdebock.ansible/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +## Proposed feature + +A clear and concise description of what you want to happen. + +## Rationale + +Why is this feature required? + +## Additional context + +Add any other context about the feature request here. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/ansible/PULL_REQUEST_TEMPLATE.md b/roles/robertdebock.ansible/.github/pull_request_template.md similarity index 100% rename from roles/ansible/PULL_REQUEST_TEMPLATE.md rename to roles/robertdebock.ansible/.github/pull_request_template.md diff --git a/roles/ansible/.github/settings.yml b/roles/robertdebock.ansible/.github/settings.yml similarity index 100% rename from roles/ansible/.github/settings.yml rename to roles/robertdebock.ansible/.github/settings.yml diff --git a/roles/robertdebock.ansible/.github/workflows/galaxy.yml b/roles/robertdebock.ansible/.github/workflows/galaxy.yml new file mode 100644 index 0000000..46a2556 --- /dev/null +++ b/roles/robertdebock.ansible/.github/workflows/galaxy.yml @@ -0,0 +1,22 @@ +--- +# +# Ansible managed +# + +name: Release to Ansible Galaxy + +on: + push: + tags: + - '*' + schedule: + - cron: '1 1 1 * *' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: galaxy + uses: robertdebock/galaxy-action@1.0.1 + with: + galaxy_api_key: ${{ secrets.galaxy_api_key }} diff --git a/roles/robertdebock.ansible/.github/workflows/molecule.yml b/roles/robertdebock.ansible/.github/workflows/molecule.yml new file mode 100644 index 0000000..a7b03b3 --- /dev/null +++ b/roles/robertdebock.ansible/.github/workflows/molecule.yml @@ -0,0 +1,76 @@ +--- +# +# Ansible managed +# + +name: Ansible Molecule + +on: + push: + tags_ignore: + - '*' + pull_request: + schedule: + - cron: '1 1 1 * *' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + command: lint + test: + needs: + - lint + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + config: + - image: "alpine" + tag: "latest" + - image: "alpine" + tag: "edge" + - image: "centos" + tag: "7" + - image: "centos" + tag: "latest" + - image: "debian" + tag: "latest" + - image: "debian" + tag: "bullseye" + - image: "fedora" + tag: "31" + - image: "fedora" + tag: "latest" + - image: "opensuse" + tag: "latest" + - image: "ubuntu" + tag: "latest" + - image: "ubuntu" + tag: "bionic" + - image: "ubuntu" + tag: "xenial" + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: disable apparmor for mysql + run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + - name: parse apparmor for mysql + run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + image: ${{ matrix.config.image }} + tag: ${{ matrix.config.tag }} + options: "--parallel all" + env: + TOX_PARALLEL_NO_SPINNER: 1 diff --git a/roles/ansible/.gitignore b/roles/robertdebock.ansible/.gitignore similarity index 100% rename from roles/ansible/.gitignore rename to roles/robertdebock.ansible/.gitignore diff --git a/roles/robertdebock.ansible/.travis.yml b/roles/robertdebock.ansible/.travis.yml new file mode 100644 index 0000000..bcf2b82 --- /dev/null +++ b/roles/robertdebock.ansible/.travis.yml @@ -0,0 +1,49 @@ +--- +# +# Ansible managed +# +language: python + +os: linux +dist: xenial + +python: + - "3.8" + +services: + - docker + +env: + global: + namespace="robertdebock" + jobs: + - image="alpine" tag="latest" + - image="alpine" tag="edge" + - image="centos" tag="7" + - image="centos" tag="latest" + - image="debian" tag="latest" + - image="debian" tag="bullseye" + - image="fedora" tag="31" + - image="fedora" tag="latest" + - image="opensuse" tag="latest" + - image="ubuntu" tag="latest" + - image="ubuntu" tag="bionic" + - image="ubuntu" tag="xenial" + +cache: + - pip + +install: + - pip install --upgrade pip + - pip install tox + +script: + - function retry { counter=0 ; until "$@" ; do exit=$? ; counter=$(($counter + 1)) ; if [ $counter -ge 3 ] ; then return $exit ; fi ; done ; return 0; } ; retry tox --parallel all + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ + slack: + secure: "TrlwhHG0+mcoQ1GI0ormhAX3DN6hR60B4dlVlkwRUqnJYJGh9BFuJChNegVAmidXSbpNB5KsvVvlXQlB3OypQniBhrS3P9mn2wd4HOrMDWDjZLPrXCZphDUHC1uN/1vqnsmgVeB6tyJkwN9hj6pYM86FqKXW0MP3Bt2MkFj3pK9VN8eyFeNXDMzfDRv/rayUoYAwyOyNVqKVQWqyEF4MdZ2VQAU/La9QXzeLUBmP+53JXrTeljavWx4DvYtDdbZDLYT/rmdCxkE7mkBrOSAd9wB1AjGU2sH0dxMHAmDtfiKZTwFxgToFD1K95c21SJXMOvIQXw0quQmgvuJtHuR3z6PyTmJ5gbezkRmiMcJOqlGiRYsVXhyr+qB43e0HpaSAEOk/CsdCefIwUyfUJuVV2qjl2w/L4oyLpLPJJRi7eJrDOrZbaTSvi/RQHGLW+it4gBQS+sxfUvwi6r5gwm4m2EHTd/IcvNcOsvQPL7VEVPjZYhq3BNU9CpJy8suMrLPWUOOYFvyJ90vVAAjzyYHOXLv3rqtsQqA6W0aO33om8CoNINOj/gi3TFdJY+GKr59y08ZUapM6/OYZAuOFgZPb/AsFprzhapciOP15cHu3octzpyW1GlJH0SGN3qGdvrm7SaChOw0+Fbh1fbnihnGS7tz2qFvze2XPNA5tk/va3K4=" + on_success: change + template: "%{result}: %{repository_slug}@%{branch}, build <%{build_url}|#%{build_number}> (<%{compare_url}|%{commit}>)" + email: false diff --git a/roles/robertdebock.ansible/.yamllint b/roles/robertdebock.ansible/.yamllint new file mode 100644 index 0000000..894450c --- /dev/null +++ b/roles/robertdebock.ansible/.yamllint @@ -0,0 +1,15 @@ +--- +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + line-length: disable + truthy: disable + +ignore: | + .tox/ diff --git a/roles/ansible/CODE_OF_CONDUCT.md b/roles/robertdebock.ansible/CODE_OF_CONDUCT.md similarity index 100% rename from roles/ansible/CODE_OF_CONDUCT.md rename to roles/robertdebock.ansible/CODE_OF_CONDUCT.md diff --git a/roles/robertdebock.ansible/CONTRIBUTING.md b/roles/robertdebock.ansible/CONTRIBUTING.md new file mode 100644 index 0000000..3210428 --- /dev/null +++ b/roles/robertdebock.ansible/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# [Please contribute](#please-contribute) + +You can really make a difference by: + +- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) +- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. + +I'll try to help and take every contribution seriously. + +It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. + +## [Step by step](#step-by-step) + +Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. + +### [1. Make an issue.](#1-make-an-issue) + +When you spot an issue, [create an issue](https://github.com/robertdebock/ansible-role-ansible/issues). + +Making the issue help me and others to find similar problems in the future. + +### [2. Fork the project.](#2-fork-the-project) + +On the top right side of [the repository on GitHub](https://github.com/robertdebock/ansible-role-ansible), click `fork`. This copies everything to your GitHub namespace. + +### [3. Make the changes](#3-make-the-changes) + +In you own GitHub namespace, make the required changes. + +I typically do that by cloning the repository (in your namespace) locally: + +``` +git clone git@github.com:YOURNAMESPACE/ansible-role-ansible.git +``` + +Now you can start to edit on your laptop. + +### [4. Optionally: test your changes](#4-optionally-test-your-changes) + +Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): + +``` +pip install molecule tox ansible-lint docker +``` + +And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: + +``` +image=centos tag=7 molecule test +``` + +Once it start to work, you can test multiple version of Ansible: + +``` +image=centos tag=7 tox +``` + +### [5. Optionally: Regenerate all dynamic content](#5-optionally-regenerate-all-dynamic-content) + +You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. + +If you don't do it, I'll do it later for you. + +### [6. Make a pull request](#6-make-a-pull-request) + +[GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. + +In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. + +### [7. Wait](#7-wait) + +Now I'll get a message that you've added some code. Thank you, really. + +CI starts to test your changes. You can follow the progress on Travis. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/ansible/LICENSE b/roles/robertdebock.ansible/LICENSE similarity index 99% rename from roles/ansible/LICENSE rename to roles/robertdebock.ansible/LICENSE index 744118c..bd15893 100644 --- a/roles/ansible/LICENSE +++ b/roles/robertdebock.ansible/LICENSE @@ -187,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2019 Robert de Bock (robert@meinit.nl) + Copyright 2020 Robert de Bock (robert@meinit.nl) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/roles/ansible/README.md b/roles/robertdebock.ansible/README.md similarity index 64% rename from roles/ansible/README.md rename to roles/robertdebock.ansible/README.md index 430a7f3..9e7864f 100644 --- a/roles/ansible/README.md +++ b/roles/robertdebock.ansible/README.md @@ -1,15 +1,14 @@ -ansible -========= - -Ansible logo - Build status +# [ansible](#ansible) Install and configure ansible on your system. -Example Playbook ----------------- +|Travis|GitHub|Quality|Downloads|Version| +|------|------|-------|---------|-------| +|[![travis](https://travis-ci.com/robertdebock/ansible-role-ansible.svg?branch=master)](https://travis-ci.com/robertdebock/ansible-role-ansible)|[![github](https://github.com/robertdebock/ansible-role-ansible/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-ansible/actions)|[![quality](https://img.shields.io/ansible/quality/35944)](https://galaxy.ansible.com/robertdebock/ansible)|[![downloads](https://img.shields.io/ansible/role/d/35944)](https://galaxy.ansible.com/robertdebock/ansible)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-ansible.svg)](https://github.com/robertdebock/ansible-role-ansible/releases/)| -This example is taken from `molecule/resources/playbook.yml` and is tested on each push, pull request and release. +## [Example Playbook](#example-playbook) + +This example is taken from `molecule/resources/converge.yml` and is tested on each push, pull request and release. ```yaml --- - name: Converge @@ -18,10 +17,10 @@ This example is taken from `molecule/resources/playbook.yml` and is tested on ea gather_facts: yes roles: - - robertdebock.ansible + - role: robertdebock.ansible ``` -The machine you are running this on, may need to be prepared, I use this playbook to ensure everything is in place to let the role work. +The machine may need to be prepared using `molecule/resources/prepare.yml`: ```yaml --- - name: Prepare @@ -36,7 +35,7 @@ The machine you are running this on, may need to be prepared, I use this playboo - role: robertdebock.python_pip ``` -After running this role, this playbook runs to verify that everything works, this may be a good example how you can use this role. +For verification `molecule/resources/verify.yml` runs after the role has been applied. ```yaml --- - name: Verify @@ -49,13 +48,11 @@ After running this role, this playbook runs to verify that everything works, thi shell: ansible --version > ansible.version args: creates: ansible.version - ``` Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles. -Role Variables --------------- +## [Role Variables](#role-variables) These variables are set in `defaults/main.yml`: ```yaml @@ -66,7 +63,7 @@ ansible_configuration: - option: roles_path value: roles - option: retry_files_enabled - value: no + value: "no" - option: inventory value: inventory - option: stdout_callback @@ -75,8 +72,7 @@ ansible_configuration: value: profile_roles ``` -Requirements ------------- +## [Requirements](#requirements) - Access to a repository containing packages, likely on the internet. - A recent version of Ansible. (Tests run on the current, previous and next release of Ansible.) @@ -86,45 +82,39 @@ The following roles can be installed to ensure all requirements are met, using ` ```yaml --- - robertdebock.bootstrap -- robertdebock.epel - robertdebock.buildtools +- robertdebock.epel - robertdebock.python_pip ``` -Context -------- +## [Context](#context) This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information. Here is an overview of related roles: ![dependencies](https://raw.githubusercontent.com/robertdebock/drawings/artifacts/ansible.png "Dependency") +## [Compatibility](#compatibility) -Compatibility -------------- +This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): -This role has been tested on these [container images](https://hub.docker.com/): +|container|tags| +|---------|----| +|alpine|all| +|el|7, 8| +|debian|buster, bullseye| +|fedora|31, 32| +|opensuse|all| +|ubuntu|focal, bionic, xenial| -|container|tag|allow_failures| -|---------|---|--------------| -|amazonlinux|latest|no| -|alpine|latest|no| -|alpine|edge|yes| -|debian|unstable|yes| -|debian|latest|no| -|fedora|latest|no| -|fedora|rawhide|yes| -|ubuntu|latest|no| +The minimum version of Ansible required is 2.8 but tests have been done to: -This role has been tested on these Ansible versions: +- The previous version, on version lower. +- The current version. +- The development version. -- ansible>=2.8, <2.9 -- ansible>=2.9 -- git+https://github.com/ansible/ansible.git@devel - -Exceptions ----------- +## [Exceptions](#exceptions) Some variarations of the build matrix do not work. These are the variations and reasons why the build won't work: @@ -133,10 +123,9 @@ Some variarations of the build matrix do not work. These are the variations and | amazonlinux:1 | No package matching 'python3-pip' | -Testing -------- +## [Testing](#testing) -[Unit tests](https://travis-ci.org/robertdebock/ansible-role-ansible) are done on every commit, pull request, release and periodically. +[Unit tests](https://travis-ci.com/robertdebock/ansible-role-ansible) are done on every commit, pull request, release and periodically. If you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-ansible/issues) @@ -168,24 +157,13 @@ image="centos" tox image="debian" tag="stable" tox ``` -Modules -------- - -This role uses the following modules: -```yaml ---- -- file -- ini_file -- lineinfile -``` - -License -------- +## [License](#license) Apache-2.0 -Author Information ------------------- +## [Author Information](#author-information) [Robert de Bock](https://robertdebock.nl/) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/ansible/SECURITY.md b/roles/robertdebock.ansible/SECURITY.md similarity index 76% rename from roles/ansible/SECURITY.md rename to roles/robertdebock.ansible/SECURITY.md index fb83a25..b715a17 100644 --- a/roles/ansible/SECURITY.md +++ b/roles/robertdebock.ansible/SECURITY.md @@ -1,8 +1,8 @@ -# Security Policy +# [Security Policy](#security-policy) This software implements other software, it's not very likely that this software introduces new vulnerabilities. -## Supported Versions +## [Supported Versions](#supported-versions) The current major version is supported. For example if the current version is 3.4.1: @@ -14,10 +14,12 @@ The current major version is supported. For example if the current version is 3. | 2.0.0 | :x: | | 1.0.0 | :x: | -## Reporting a Vulnerability +## [Reporting a Vulnerability](#reporting-a-vulnarability) Please [open an issue](https://github.com/robertdebock/ansible-role-ansible/issues) describing the vulnerability. Tell them where to go, how often they can expect to get an update on a reported vulnerability, what to expect if the vulnerability is accepted or declined, etc. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/ansible/defaults/main.yml b/roles/robertdebock.ansible/defaults/main.yml similarity index 94% rename from roles/ansible/defaults/main.yml rename to roles/robertdebock.ansible/defaults/main.yml index 64b444a..f5f5eee 100644 --- a/roles/ansible/defaults/main.yml +++ b/roles/robertdebock.ansible/defaults/main.yml @@ -5,7 +5,7 @@ ansible_configuration: - option: roles_path value: roles - option: retry_files_enabled - value: no + value: "no" - option: inventory value: inventory - option: stdout_callback diff --git a/roles/robertdebock.ansible/meta/.galaxy_install_info b/roles/robertdebock.ansible/meta/.galaxy_install_info new file mode 100644 index 0000000..0538ac1 --- /dev/null +++ b/roles/robertdebock.ansible/meta/.galaxy_install_info @@ -0,0 +1,2 @@ +install_date: Mon Sep 28 09:36:23 2020 +version: 2.3.3 diff --git a/roles/ansible/meta/exception.yml b/roles/robertdebock.ansible/meta/exception.yml similarity index 100% rename from roles/ansible/meta/exception.yml rename to roles/robertdebock.ansible/meta/exception.yml diff --git a/roles/ansible/meta/main.yml b/roles/robertdebock.ansible/meta/main.yml similarity index 80% rename from roles/ansible/meta/main.yml rename to roles/robertdebock.ansible/meta/main.yml index a90b0f0..ac105b8 100644 --- a/roles/ansible/meta/main.yml +++ b/roles/robertdebock.ansible/meta/main.yml @@ -8,29 +8,29 @@ galaxy_info: min_ansible_version: 2.8 platforms: - - name: Amazon - versions: - - Candidate - name: Alpine versions: - all - - name: ArchLinux - versions: - - all - - name: Debian - versions: - - all - name: EL versions: - 7 - 8 + - name: Debian + versions: + - buster + - bullseye - name: Fedora + versions: + - 31 + - 32 + - name: OpenSUSE versions: - all - name: Ubuntu versions: - - artful + - focal - bionic + - xenial galaxy_tags: - ansible diff --git a/roles/robertdebock.ansible/meta/preferences.yml b/roles/robertdebock.ansible/meta/preferences.yml new file mode 100644 index 0000000..e7fdebf --- /dev/null +++ b/roles/robertdebock.ansible/meta/preferences.yml @@ -0,0 +1,2 @@ +--- +tox_parallel: yes diff --git a/roles/robertdebock.ansible/molecule/default/converge.yml b/roles/robertdebock.ansible/molecule/default/converge.yml new file mode 100644 index 0000000..935c6b8 --- /dev/null +++ b/roles/robertdebock.ansible/molecule/default/converge.yml @@ -0,0 +1,8 @@ +--- +- name: Converge + hosts: all + become: yes + gather_facts: yes + + roles: + - role: ansible-role-ansible diff --git a/roles/ansible/molecule/default/molecule.yml b/roles/robertdebock.ansible/molecule/default/molecule.yml similarity index 78% rename from roles/ansible/molecule/default/molecule.yml rename to roles/robertdebock.ansible/molecule/default/molecule.yml index 1bbd498..1762dfe 100644 --- a/roles/ansible/molecule/default/molecule.yml +++ b/roles/robertdebock.ansible/molecule/default/molecule.yml @@ -6,8 +6,9 @@ dependency: name: galaxy options: role-file: requirements.yml -lint: - name: yamllint +lint: | + set -e + yamllint . driver: name: docker platforms: @@ -20,10 +21,9 @@ platforms: pre_build_image: yes provisioner: name: ansible + config_options: + defaults: + stdout_callback: yaml + bin_ansible_callbacks: yes verifier: name: ansible - lint: - name: ansible-lint - enabled: no -scenario: - name: default diff --git a/roles/ansible/molecule/default/prepare.yml b/roles/robertdebock.ansible/molecule/default/prepare.yml similarity index 100% rename from roles/ansible/molecule/default/prepare.yml rename to roles/robertdebock.ansible/molecule/default/prepare.yml diff --git a/roles/ansible/molecule/default/verify.yml b/roles/robertdebock.ansible/molecule/default/verify.yml similarity index 100% rename from roles/ansible/molecule/default/verify.yml rename to roles/robertdebock.ansible/molecule/default/verify.yml diff --git a/roles/ansible_lint/requirements.yml b/roles/robertdebock.ansible/requirements.yml similarity index 100% rename from roles/ansible_lint/requirements.yml rename to roles/robertdebock.ansible/requirements.yml diff --git a/roles/robertdebock.ansible/tasks/assert.yml b/roles/robertdebock.ansible/tasks/assert.yml new file mode 100644 index 0000000..7c58d45 --- /dev/null +++ b/roles/robertdebock.ansible/tasks/assert.yml @@ -0,0 +1,23 @@ +--- +- name: test if ansible_configuration is set correctly + assert: + that: + - ansible_configuration | length > 0 + - ansible_configuration is iterable + quiet: yes + when: + - ansible_configuration is defined + +- name: test if item in ansible_configuration is set correctly + assert: + that: + - item.option is defined + - item.option | length > 0 + - item.value is defined + - item.value | length > 0 + quiet: yes + loop: "{{ ansible_configuration }}" + loop_control: + label: "{{ item.option }}" + when: + - ansible_configuration is defined diff --git a/roles/ansible/tasks/main.yml b/roles/robertdebock.ansible/tasks/main.yml similarity index 74% rename from roles/ansible/tasks/main.yml rename to roles/robertdebock.ansible/tasks/main.yml index d3d0e73..2132e07 100644 --- a/roles/ansible/tasks/main.yml +++ b/roles/robertdebock.ansible/tasks/main.yml @@ -1,27 +1,25 @@ --- # tasks file for ansible +- name: include assert.yml + include_tasks: assert.yml + - name: install ansible block: - name: install ansible package (allowed to fail) package: name: "{{ ansible_packages }}" state: present - register: ansible_install_ansible_package - until: ansible_install_ansible_package is succeeded - retries: 3 rescue: - name: install ansible pip pip: name: ansible state: present - register: ansible_install_ansible_pip - until: ansible_install_ansible_pip is succeeded - retries: 3 - name: ensure the ansible directory exists file: - path: /etc/ansible + path: "{{ ansible_configuration_directory }}" state: directory + mode: "0755" - name: mark configuration file as ansible managed lineinfile: @@ -29,6 +27,7 @@ create: yes insertbefore: BOF line: "# This file is managed by Ansible." + mode: "0644" - name: configure ansible ini_file: @@ -36,7 +35,7 @@ section: "{{ item.section | default('defaults') }}" option: "{{ item.option }}" value: "{{ item.value }}" - with_items: - - "{{ ansible_configuration }}" + mode: "0644" + loop: "{{ ansible_configuration }}" loop_control: label: "{{ item.option }}" diff --git a/roles/ansible/tox.ini b/roles/robertdebock.ansible/tox.ini similarity index 54% rename from roles/ansible/tox.ini rename to roles/robertdebock.ansible/tox.ini index a902e16..c1bc1d4 100644 --- a/roles/ansible/tox.ini +++ b/roles/robertdebock.ansible/tox.ini @@ -3,7 +3,10 @@ # [tox] minversion = 3.7 -envlist = py{37}-ansible-{previous,current,next} +# Disabled "next" because of: +# https://github.com/ansible-community/molecule/issues/2626. +# envlist = py{38}-ansible-{previous,current,next} +envlist = py{38}-ansible-{previous,current} skipsdist = true [testenv] @@ -11,12 +14,13 @@ deps = previous: ansible>=2.8, <2.9 current: ansible>=2.9 next: git+https://github.com/ansible/ansible.git@devel - docker - molecule -commands = - molecule test + molecule[lint]>=3, <4 + docker>=4.2, <4.3 +commands = molecule test setenv = TOX_ENVNAME={envname} MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} + PY_COLORS=1 + ANSIBLE_FORCE_COLOR=1 passenv = namespace image tag diff --git a/roles/ansible/vars/main.yml b/roles/robertdebock.ansible/vars/main.yml similarity index 99% rename from roles/ansible/vars/main.yml rename to roles/robertdebock.ansible/vars/main.yml index 147985b..5bec738 100644 --- a/roles/ansible/vars/main.yml +++ b/roles/robertdebock.ansible/vars/main.yml @@ -1,5 +1,6 @@ --- # vars file for ansible + ansible_packages: - ansible diff --git a/roles/robertdebock.ansible_lint/.ansible-lint b/roles/robertdebock.ansible_lint/.ansible-lint new file mode 100644 index 0000000..eba57d1 --- /dev/null +++ b/roles/robertdebock.ansible_lint/.ansible-lint @@ -0,0 +1,8 @@ +# +# Ansible managed +# +exclude_paths: + - ./meta/exception.yml + - ./meta/preferences.yml + - ./molecule/default/verify.yml + - ./.tox diff --git a/roles/robertdebock.ansible_lint/.github/FUNDING.yml b/roles/robertdebock.ansible_lint/.github/FUNDING.yml new file mode 100644 index 0000000..67320f0 --- /dev/null +++ b/roles/robertdebock.ansible_lint/.github/FUNDING.yml @@ -0,0 +1,2 @@ +--- +github: robertdebock diff --git a/roles/ansible/.github/ISSUE_TEMPLATE/bug_report.md b/roles/robertdebock.ansible_lint/.github/ISSUE_TEMPLATE/bug_report.md similarity index 72% rename from roles/ansible/.github/ISSUE_TEMPLATE/bug_report.md rename to roles/robertdebock.ansible_lint/.github/ISSUE_TEMPLATE/bug_report.md index c695b98..f39b5dc 100644 --- a/roles/ansible/.github/ISSUE_TEMPLATE/bug_report.md +++ b/roles/robertdebock.ansible_lint/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,28 +1,31 @@ --- name: Bug report -about: Create a report to help us improve +about: Create a report to help me improve --- -**Describe the bug** +## Describe the bug A clear and concise description of what the bug is. -**Playbook** +## Playbook + Please paste the playbook you are using. (Consider `requirements.yml` and optionally the command you've invoked.) ```yaml +--- YOUR PLAYBOOK HERE ``` -**Output** +## Output + Show at least the error, possible related output, maybe just all the output. -**Expected behavior** -A clear and concise description of what you expected to happen. +## Environment -**Environment** - Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) - Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) - Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.ansible_lint/.github/ISSUE_TEMPLATE/feature_request.md b/roles/robertdebock.ansible_lint/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..55a93c4 --- /dev/null +++ b/roles/robertdebock.ansible_lint/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +## Proposed feature + +A clear and concise description of what you want to happen. + +## Rationale + +Why is this feature required? + +## Additional context + +Add any other context about the feature request here. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/ansible_lint/PULL_REQUEST_TEMPLATE.md b/roles/robertdebock.ansible_lint/.github/pull_request_template.md similarity index 100% rename from roles/ansible_lint/PULL_REQUEST_TEMPLATE.md rename to roles/robertdebock.ansible_lint/.github/pull_request_template.md diff --git a/roles/ansible_lint/.github/settings.yml b/roles/robertdebock.ansible_lint/.github/settings.yml similarity index 100% rename from roles/ansible_lint/.github/settings.yml rename to roles/robertdebock.ansible_lint/.github/settings.yml diff --git a/roles/robertdebock.ansible_lint/.github/workflows/galaxy.yml b/roles/robertdebock.ansible_lint/.github/workflows/galaxy.yml new file mode 100644 index 0000000..46a2556 --- /dev/null +++ b/roles/robertdebock.ansible_lint/.github/workflows/galaxy.yml @@ -0,0 +1,22 @@ +--- +# +# Ansible managed +# + +name: Release to Ansible Galaxy + +on: + push: + tags: + - '*' + schedule: + - cron: '1 1 1 * *' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: galaxy + uses: robertdebock/galaxy-action@1.0.1 + with: + galaxy_api_key: ${{ secrets.galaxy_api_key }} diff --git a/roles/robertdebock.ansible_lint/.github/workflows/molecule.yml b/roles/robertdebock.ansible_lint/.github/workflows/molecule.yml new file mode 100644 index 0000000..feae771 --- /dev/null +++ b/roles/robertdebock.ansible_lint/.github/workflows/molecule.yml @@ -0,0 +1,68 @@ +--- +# +# Ansible managed +# + +name: Ansible Molecule + +on: + push: + tags_ignore: + - '*' + pull_request: + schedule: + - cron: '1 1 1 * *' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + command: lint + test: + needs: + - lint + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + config: + - image: "centos" + tag: "latest" + - image: "debian" + tag: "latest" + - image: "debian" + tag: "bullseye" + - image: "fedora" + tag: "31" + - image: "fedora" + tag: "latest" + - image: "ubuntu" + tag: "latest" + - image: "ubuntu" + tag: "bionic" + - image: "ubuntu" + tag: "xenial" + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: disable apparmor for mysql + run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + - name: parse apparmor for mysql + run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + image: ${{ matrix.config.image }} + tag: ${{ matrix.config.tag }} + options: "--parallel all" + env: + TOX_PARALLEL_NO_SPINNER: 1 diff --git a/roles/ansible_lint/.gitignore b/roles/robertdebock.ansible_lint/.gitignore similarity index 100% rename from roles/ansible_lint/.gitignore rename to roles/robertdebock.ansible_lint/.gitignore diff --git a/roles/robertdebock.ansible_lint/.travis.yml b/roles/robertdebock.ansible_lint/.travis.yml new file mode 100644 index 0000000..4a1cd07 --- /dev/null +++ b/roles/robertdebock.ansible_lint/.travis.yml @@ -0,0 +1,45 @@ +--- +# +# Ansible managed +# +language: python + +os: linux +dist: xenial + +python: + - "3.8" + +services: + - docker + +env: + global: + namespace="robertdebock" + jobs: + - image="centos" tag="latest" + - image="debian" tag="latest" + - image="debian" tag="bullseye" + - image="fedora" tag="31" + - image="fedora" tag="latest" + - image="ubuntu" tag="latest" + - image="ubuntu" tag="bionic" + - image="ubuntu" tag="xenial" + +cache: + - pip + +install: + - pip install --upgrade pip + - pip install tox + +script: + - function retry { counter=0 ; until "$@" ; do exit=$? ; counter=$(($counter + 1)) ; if [ $counter -ge 3 ] ; then return $exit ; fi ; done ; return 0; } ; retry tox --parallel all + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ + slack: + secure: "FjNc+FnNGmc/0LZQl1KY1yB/yFL1AdcD/qlaqQXSxogbtvXP/UmP/lgCBXBLIGUfoyJY0xM/pNSYucijdAkqpAD9LBFlV1StBdzBXM2c5LIklzZFJtWVu5OeymItyZ8Nyz8aFlbv3Q7vApXNNNSF6TMCgysIq7ODbIcCx5+7JtxMJEUBlXe2Xggye0BAxd4IAdYRK72/Zsp5YNYIB3VbhdA9dAxLVj9oUU4z1I0W0WQEl6sS9L/vy8jOHNo/Qw7j4RksrPzGsGQK4bcRqHtC+QnU5p4WlQE4uSAs+x6ohwZg9qT3jZHkzF0TwCcwaigVDmrDrudFnfu7/ymU/YvF/8RV2Dcr8T4HjceFGpGy4GusXxJf3K0mDCL0ULfBI9Hu35xVXJ7ARqhi/DqUzvxnqQTr6v/NfnajqOEC7aSME7CR8QnvBml3JLAnMZTpJ+F98/rf21UZ6zRlfZwyRAQa1PX7kBaCXLuPJqmtL40eREryNqno9sFXgwJlvfgrsMR91nYLPwBaYxHVRqzLUZjYQEDAnozidzf4qhdXyhYDNFqLIhpYPlII4nf0qsufm3tQjarV0A8X/hySHD6xoZmYSH4r0nNJcXizENkK9ILgsw+F2LWHkZx81Bv9mZP3fKCZ7iY1Ruce5k+EAEIehVmlEfZte4OdrWRH5ABYvnqJ0b4=" + on_success: change + template: "%{result}: %{repository_slug}@%{branch}, build <%{build_url}|#%{build_number}> (<%{compare_url}|%{commit}>)" + email: false diff --git a/roles/robertdebock.ansible_lint/.yamllint b/roles/robertdebock.ansible_lint/.yamllint new file mode 100644 index 0000000..894450c --- /dev/null +++ b/roles/robertdebock.ansible_lint/.yamllint @@ -0,0 +1,15 @@ +--- +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + line-length: disable + truthy: disable + +ignore: | + .tox/ diff --git a/roles/ansible_lint/CODE_OF_CONDUCT.md b/roles/robertdebock.ansible_lint/CODE_OF_CONDUCT.md similarity index 100% rename from roles/ansible_lint/CODE_OF_CONDUCT.md rename to roles/robertdebock.ansible_lint/CODE_OF_CONDUCT.md diff --git a/roles/robertdebock.ansible_lint/CONTRIBUTING.md b/roles/robertdebock.ansible_lint/CONTRIBUTING.md new file mode 100644 index 0000000..65bddeb --- /dev/null +++ b/roles/robertdebock.ansible_lint/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# [Please contribute](#please-contribute) + +You can really make a difference by: + +- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) +- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. + +I'll try to help and take every contribution seriously. + +It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. + +## [Step by step](#step-by-step) + +Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. + +### [1. Make an issue.](#1-make-an-issue) + +When you spot an issue, [create an issue](https://github.com/robertdebock/ansible-role-ansible_lint/issues). + +Making the issue help me and others to find similar problems in the future. + +### [2. Fork the project.](#2-fork-the-project) + +On the top right side of [the repository on GitHub](https://github.com/robertdebock/ansible-role-ansible_lint), click `fork`. This copies everything to your GitHub namespace. + +### [3. Make the changes](#3-make-the-changes) + +In you own GitHub namespace, make the required changes. + +I typically do that by cloning the repository (in your namespace) locally: + +``` +git clone git@github.com:YOURNAMESPACE/ansible-role-ansible_lint.git +``` + +Now you can start to edit on your laptop. + +### [4. Optionally: test your changes](#4-optionally-test-your-changes) + +Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): + +``` +pip install molecule tox ansible-lint docker +``` + +And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: + +``` +image=centos tag=7 molecule test +``` + +Once it start to work, you can test multiple version of Ansible: + +``` +image=centos tag=7 tox +``` + +### [5. Optionally: Regenerate all dynamic content](#5-optionally-regenerate-all-dynamic-content) + +You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. + +If you don't do it, I'll do it later for you. + +### [6. Make a pull request](#6-make-a-pull-request) + +[GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. + +In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. + +### [7. Wait](#7-wait) + +Now I'll get a message that you've added some code. Thank you, really. + +CI starts to test your changes. You can follow the progress on Travis. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/ansible_lint/LICENSE b/roles/robertdebock.ansible_lint/LICENSE similarity index 99% rename from roles/ansible_lint/LICENSE rename to roles/robertdebock.ansible_lint/LICENSE index 744118c..bd15893 100644 --- a/roles/ansible_lint/LICENSE +++ b/roles/robertdebock.ansible_lint/LICENSE @@ -187,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2019 Robert de Bock (robert@meinit.nl) + Copyright 2020 Robert de Bock (robert@meinit.nl) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/roles/ansible_lint/README.md b/roles/robertdebock.ansible_lint/README.md similarity index 59% rename from roles/ansible_lint/README.md rename to roles/robertdebock.ansible_lint/README.md index b3ce189..d733896 100644 --- a/roles/ansible_lint/README.md +++ b/roles/robertdebock.ansible_lint/README.md @@ -1,15 +1,14 @@ -ansible_lint -========= - -Ansible logo - Build status +# [ansible_lint](#ansible_lint) Install ansible-lint on your system. -Example Playbook ----------------- +|Travis|GitHub|Quality|Downloads|Version| +|------|------|-------|---------|-------| +|[![travis](https://travis-ci.com/robertdebock/ansible-role-ansible_lint.svg?branch=master)](https://travis-ci.com/robertdebock/ansible-role-ansible_lint)|[![github](https://github.com/robertdebock/ansible-role-ansible_lint/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-ansible_lint/actions)|[![quality](https://img.shields.io/ansible/quality/35946)](https://galaxy.ansible.com/robertdebock/ansible_lint)|[![downloads](https://img.shields.io/ansible/role/d/35946)](https://galaxy.ansible.com/robertdebock/ansible_lint)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-ansible_lint.svg)](https://github.com/robertdebock/ansible-role-ansible_lint/releases/)| -This example is taken from `molecule/resources/playbook.yml` and is tested on each push, pull request and release. +## [Example Playbook](#example-playbook) + +This example is taken from `molecule/resources/converge.yml` and is tested on each push, pull request and release. ```yaml --- - name: Converge @@ -18,10 +17,10 @@ This example is taken from `molecule/resources/playbook.yml` and is tested on ea gather_facts: yes roles: - - robertdebock.ansible_lint + - role: robertdebock.ansible_lint ``` -The machine you are running this on, may need to be prepared, I use this playbook to ensure everything is in place to let the role work. +The machine may need to be prepared using `molecule/resources/prepare.yml`: ```yaml --- - name: Prepare @@ -36,20 +35,23 @@ The machine you are running this on, may need to be prepared, I use this playboo - role: robertdebock.python_pip ``` +For verification `molecule/resources/verify.yml` runs after the role has been applied. +```yaml +--- +- name: Verify + hosts: all + become: yes + gather_facts: no + + tasks: + - name: check if connection still works + ping: +``` Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles. -Role Variables --------------- -These variables are set in `defaults/main.yml`: -```yaml ---- -# defaults file for ansible_lint -``` - -Requirements ------------- +## [Requirements](#requirements) - Access to a repository containing packages, likely on the internet. - A recent version of Ansible. (Tests run on the current, previous and next release of Ansible.) @@ -65,38 +67,31 @@ The following roles can be installed to ensure all requirements are met, using ` ``` -Context -------- +## [Context](#context) This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information. Here is an overview of related roles: ![dependencies](https://raw.githubusercontent.com/robertdebock/drawings/artifacts/ansible_lint.png "Dependency") +## [Compatibility](#compatibility) -Compatibility -------------- +This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): -This role has been tested on these [container images](https://hub.docker.com/): +|container|tags| +|---------|----| +|el|8| +|debian|buster, bullseye| +|fedora|31, 32| +|ubuntu|focal, bionic, xenial| -|container|tag|allow_failures| -|---------|---|--------------| -|debian|unstable|yes| -|debian|latest|no| -|centos|latest|no| -|fedora|latest|no| -|fedora|rawhide|yes| -|opensuse|latest|no| -|ubuntu|latest|no| +The minimum version of Ansible required is 2.8 but tests have been done to: -This role has been tested on these Ansible versions: +- The previous version, on version lower. +- The current version. +- The development version. -- ansible>=2.8, <2.9 -- ansible>=2.9 -- git+https://github.com/ansible/ansible.git@devel - -Exceptions ----------- +## [Exceptions](#exceptions) Some variarations of the build matrix do not work. These are the variations and reasons why the build won't work: @@ -106,10 +101,9 @@ Some variarations of the build matrix do not work. These are the variations and | amazonlinux | No module named pkg_resources | -Testing -------- +## [Testing](#testing) -[Unit tests](https://travis-ci.org/robertdebock/ansible-role-ansible_lint) are done on every commit, pull request, release and periodically. +[Unit tests](https://travis-ci.com/robertdebock/ansible-role-ansible_lint) are done on every commit, pull request, release and periodically. If you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-ansible_lint/issues) @@ -141,22 +135,13 @@ image="centos" tox image="debian" tag="stable" tox ``` -Modules -------- - -This role uses the following modules: -```yaml ---- -- pip -``` - -License -------- +## [License](#license) Apache-2.0 -Author Information ------------------- +## [Author Information](#author-information) [Robert de Bock](https://robertdebock.nl/) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/ansible_lint/SECURITY.md b/roles/robertdebock.ansible_lint/SECURITY.md similarity index 76% rename from roles/ansible_lint/SECURITY.md rename to roles/robertdebock.ansible_lint/SECURITY.md index 8f0da53..4ea9e15 100644 --- a/roles/ansible_lint/SECURITY.md +++ b/roles/robertdebock.ansible_lint/SECURITY.md @@ -1,8 +1,8 @@ -# Security Policy +# [Security Policy](#security-policy) This software implements other software, it's not very likely that this software introduces new vulnerabilities. -## Supported Versions +## [Supported Versions](#supported-versions) The current major version is supported. For example if the current version is 3.4.1: @@ -14,10 +14,12 @@ The current major version is supported. For example if the current version is 3. | 2.0.0 | :x: | | 1.0.0 | :x: | -## Reporting a Vulnerability +## [Reporting a Vulnerability](#reporting-a-vulnarability) Please [open an issue](https://github.com/robertdebock/ansible-role-ansible_lint/issues) describing the vulnerability. Tell them where to go, how often they can expect to get an update on a reported vulnerability, what to expect if the vulnerability is accepted or declined, etc. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.ansible_lint/meta/.galaxy_install_info b/roles/robertdebock.ansible_lint/meta/.galaxy_install_info new file mode 100644 index 0000000..5d95aa0 --- /dev/null +++ b/roles/robertdebock.ansible_lint/meta/.galaxy_install_info @@ -0,0 +1,2 @@ +install_date: Mon Sep 28 09:36:26 2020 +version: 2.3.12 diff --git a/roles/ansible_lint/meta/exception.yml b/roles/robertdebock.ansible_lint/meta/exception.yml similarity index 100% rename from roles/ansible_lint/meta/exception.yml rename to roles/robertdebock.ansible_lint/meta/exception.yml diff --git a/roles/ansible_lint/meta/main.yml b/roles/robertdebock.ansible_lint/meta/main.yml similarity index 71% rename from roles/ansible_lint/meta/main.yml rename to roles/robertdebock.ansible_lint/meta/main.yml index f05d0fa..bec2ed2 100644 --- a/roles/ansible_lint/meta/main.yml +++ b/roles/robertdebock.ansible_lint/meta/main.yml @@ -8,30 +8,25 @@ galaxy_info: min_ansible_version: 2.8 platforms: - - name: ArchLinux - versions: - - all - - name: Debian - versions: - - all - name: EL versions: - 8 + - name: Debian + versions: + - buster + - bullseye - name: Fedora versions: - - all - - name: OpenSUSE - versions: - - all + - 31 + - 32 - name: Ubuntu versions: - - artful + - focal - bionic + - xenial galaxy_tags: - ansiblelint - - archlinux - centos - - rhel dependencies: [] diff --git a/roles/robertdebock.ansible_lint/meta/preferences.yml b/roles/robertdebock.ansible_lint/meta/preferences.yml new file mode 100644 index 0000000..e7fdebf --- /dev/null +++ b/roles/robertdebock.ansible_lint/meta/preferences.yml @@ -0,0 +1,2 @@ +--- +tox_parallel: yes diff --git a/roles/robertdebock.ansible_lint/molecule/default/converge.yml b/roles/robertdebock.ansible_lint/molecule/default/converge.yml new file mode 100644 index 0000000..d390827 --- /dev/null +++ b/roles/robertdebock.ansible_lint/molecule/default/converge.yml @@ -0,0 +1,8 @@ +--- +- name: Converge + hosts: all + become: yes + gather_facts: yes + + roles: + - role: ansible-role-ansible_lint diff --git a/roles/ansible_lint/molecule/default/molecule.yml b/roles/robertdebock.ansible_lint/molecule/default/molecule.yml similarity index 74% rename from roles/ansible_lint/molecule/default/molecule.yml rename to roles/robertdebock.ansible_lint/molecule/default/molecule.yml index 2660bc8..d0c5bf0 100644 --- a/roles/ansible_lint/molecule/default/molecule.yml +++ b/roles/robertdebock.ansible_lint/molecule/default/molecule.yml @@ -6,8 +6,9 @@ dependency: name: galaxy options: role-file: requirements.yml -lint: - name: yamllint +lint: | + set -e + yamllint . driver: name: docker platforms: @@ -20,5 +21,9 @@ platforms: pre_build_image: yes provisioner: name: ansible -scenario: - name: default + config_options: + defaults: + stdout_callback: yaml + bin_ansible_callbacks: yes +verifier: + name: ansible diff --git a/roles/ansible_lint/molecule/default/prepare.yml b/roles/robertdebock.ansible_lint/molecule/default/prepare.yml similarity index 100% rename from roles/ansible_lint/molecule/default/prepare.yml rename to roles/robertdebock.ansible_lint/molecule/default/prepare.yml diff --git a/roles/robertdebock.ansible_lint/molecule/default/verify.yml b/roles/robertdebock.ansible_lint/molecule/default/verify.yml new file mode 100644 index 0000000..b9dc6f8 --- /dev/null +++ b/roles/robertdebock.ansible_lint/molecule/default/verify.yml @@ -0,0 +1,9 @@ +--- +- name: Verify + hosts: all + become: yes + gather_facts: no + + tasks: + - name: check if connection still works + ping: diff --git a/roles/molecule/requirements.yml b/roles/robertdebock.ansible_lint/requirements.yml similarity index 100% rename from roles/molecule/requirements.yml rename to roles/robertdebock.ansible_lint/requirements.yml diff --git a/roles/ansible_lint/tasks/main.yml b/roles/robertdebock.ansible_lint/tasks/main.yml similarity index 52% rename from roles/ansible_lint/tasks/main.yml rename to roles/robertdebock.ansible_lint/tasks/main.yml index 31d7fcc..84ee2dd 100644 --- a/roles/ansible_lint/tasks/main.yml +++ b/roles/robertdebock.ansible_lint/tasks/main.yml @@ -4,6 +4,3 @@ pip: name: "{{ ansible_lint_packages }}" state: present - register: ansible_lint_install_ansible_lint - until: ansible_lint_install_ansible_lint is succeeded - retries: 3 diff --git a/roles/ara/tox.ini b/roles/robertdebock.ansible_lint/tox.ini similarity index 54% rename from roles/ara/tox.ini rename to roles/robertdebock.ansible_lint/tox.ini index a902e16..c1bc1d4 100644 --- a/roles/ara/tox.ini +++ b/roles/robertdebock.ansible_lint/tox.ini @@ -3,7 +3,10 @@ # [tox] minversion = 3.7 -envlist = py{37}-ansible-{previous,current,next} +# Disabled "next" because of: +# https://github.com/ansible-community/molecule/issues/2626. +# envlist = py{38}-ansible-{previous,current,next} +envlist = py{38}-ansible-{previous,current} skipsdist = true [testenv] @@ -11,12 +14,13 @@ deps = previous: ansible>=2.8, <2.9 current: ansible>=2.9 next: git+https://github.com/ansible/ansible.git@devel - docker - molecule -commands = - molecule test + molecule[lint]>=3, <4 + docker>=4.2, <4.3 +commands = molecule test setenv = TOX_ENVNAME={envname} MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} + PY_COLORS=1 + ANSIBLE_FORCE_COLOR=1 passenv = namespace image tag diff --git a/roles/ansible_lint/vars/main.yml b/roles/robertdebock.ansible_lint/vars/main.yml similarity index 98% rename from roles/ansible_lint/vars/main.yml rename to roles/robertdebock.ansible_lint/vars/main.yml index cf44daa..0a1756c 100644 --- a/roles/ansible_lint/vars/main.yml +++ b/roles/robertdebock.ansible_lint/vars/main.yml @@ -1,4 +1,5 @@ --- # vars file for ansible_lint + ansible_lint_packages: - ansible-lint diff --git a/roles/robertdebock.ara/.ansible-lint b/roles/robertdebock.ara/.ansible-lint new file mode 100644 index 0000000..eba57d1 --- /dev/null +++ b/roles/robertdebock.ara/.ansible-lint @@ -0,0 +1,8 @@ +# +# Ansible managed +# +exclude_paths: + - ./meta/exception.yml + - ./meta/preferences.yml + - ./molecule/default/verify.yml + - ./.tox diff --git a/roles/robertdebock.ara/.github/FUNDING.yml b/roles/robertdebock.ara/.github/FUNDING.yml new file mode 100644 index 0000000..67320f0 --- /dev/null +++ b/roles/robertdebock.ara/.github/FUNDING.yml @@ -0,0 +1,2 @@ +--- +github: robertdebock diff --git a/roles/atom/.github/ISSUE_TEMPLATE/bug_report.md b/roles/robertdebock.ara/.github/ISSUE_TEMPLATE/bug_report.md similarity index 72% rename from roles/atom/.github/ISSUE_TEMPLATE/bug_report.md rename to roles/robertdebock.ara/.github/ISSUE_TEMPLATE/bug_report.md index c695b98..f39b5dc 100644 --- a/roles/atom/.github/ISSUE_TEMPLATE/bug_report.md +++ b/roles/robertdebock.ara/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,28 +1,31 @@ --- name: Bug report -about: Create a report to help us improve +about: Create a report to help me improve --- -**Describe the bug** +## Describe the bug A clear and concise description of what the bug is. -**Playbook** +## Playbook + Please paste the playbook you are using. (Consider `requirements.yml` and optionally the command you've invoked.) ```yaml +--- YOUR PLAYBOOK HERE ``` -**Output** +## Output + Show at least the error, possible related output, maybe just all the output. -**Expected behavior** -A clear and concise description of what you expected to happen. +## Environment -**Environment** - Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) - Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) - Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.ara/.github/ISSUE_TEMPLATE/feature_request.md b/roles/robertdebock.ara/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..55a93c4 --- /dev/null +++ b/roles/robertdebock.ara/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +## Proposed feature + +A clear and concise description of what you want to happen. + +## Rationale + +Why is this feature required? + +## Additional context + +Add any other context about the feature request here. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/ara/PULL_REQUEST_TEMPLATE.md b/roles/robertdebock.ara/.github/pull_request_template.md similarity index 100% rename from roles/ara/PULL_REQUEST_TEMPLATE.md rename to roles/robertdebock.ara/.github/pull_request_template.md diff --git a/roles/ara/.github/settings.yml b/roles/robertdebock.ara/.github/settings.yml similarity index 100% rename from roles/ara/.github/settings.yml rename to roles/robertdebock.ara/.github/settings.yml diff --git a/roles/robertdebock.ara/.github/workflows/galaxy.yml b/roles/robertdebock.ara/.github/workflows/galaxy.yml new file mode 100644 index 0000000..46a2556 --- /dev/null +++ b/roles/robertdebock.ara/.github/workflows/galaxy.yml @@ -0,0 +1,22 @@ +--- +# +# Ansible managed +# + +name: Release to Ansible Galaxy + +on: + push: + tags: + - '*' + schedule: + - cron: '1 1 1 * *' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: galaxy + uses: robertdebock/galaxy-action@1.0.1 + with: + galaxy_api_key: ${{ secrets.galaxy_api_key }} diff --git a/roles/robertdebock.ara/.github/workflows/molecule.yml b/roles/robertdebock.ara/.github/workflows/molecule.yml new file mode 100644 index 0000000..0e236c8 --- /dev/null +++ b/roles/robertdebock.ara/.github/workflows/molecule.yml @@ -0,0 +1,64 @@ +--- +# +# Ansible managed +# + +name: Ansible Molecule + +on: + push: + tags_ignore: + - '*' + pull_request: + schedule: + - cron: '1 1 1 * *' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + command: lint + test: + needs: + - lint + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + config: + - image: "centos" + tag: "latest" + - image: "debian" + tag: "latest" + - image: "debian" + tag: "bullseye" + - image: "fedora" + tag: "31" + - image: "fedora" + tag: "latest" + - image: "ubuntu" + tag: "bionic" + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: disable apparmor for mysql + run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + - name: parse apparmor for mysql + run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + image: ${{ matrix.config.image }} + tag: ${{ matrix.config.tag }} + options: "--parallel all" + env: + TOX_PARALLEL_NO_SPINNER: 1 diff --git a/roles/ara/.gitignore b/roles/robertdebock.ara/.gitignore similarity index 100% rename from roles/ara/.gitignore rename to roles/robertdebock.ara/.gitignore diff --git a/roles/robertdebock.ara/.travis.yml b/roles/robertdebock.ara/.travis.yml new file mode 100644 index 0000000..a32aefa --- /dev/null +++ b/roles/robertdebock.ara/.travis.yml @@ -0,0 +1,43 @@ +--- +# +# Ansible managed +# +language: python + +os: linux +dist: xenial + +python: + - "3.8" + +services: + - docker + +env: + global: + namespace="robertdebock" + jobs: + - image="centos" tag="latest" + - image="debian" tag="latest" + - image="debian" tag="bullseye" + - image="fedora" tag="31" + - image="fedora" tag="latest" + - image="ubuntu" tag="bionic" + +cache: + - pip + +install: + - pip install --upgrade pip + - pip install tox + +script: + - function retry { counter=0 ; until "$@" ; do exit=$? ; counter=$(($counter + 1)) ; if [ $counter -ge 3 ] ; then return $exit ; fi ; done ; return 0; } ; retry tox --parallel all + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ + slack: + secure: "dACQ6+hjrlymJb+XtpgegARWoz/k5ngOmpcPXfttkYmocU07ergyvn7xFF2PwCyw2wCds+E/iK2tOTMZ9yN6wbjGHfWbPsIJEzU6TyIYCoH5NJRn4j32Iql1y9lEGxYg1eaH7FIN0MLRMPuDLK6IINCBxaHR4GqIrIwrBIuGUInkzGQZhSDQ5xRYef+EfZIdmyQNOH7pW5n9zjbF1csy3bhZoem9/JLIfy7I+o08ddZYepdk7qYFmSEgR7TB1stTVZuCthRHdLZhgoW5tYrIpWXJD2OlIywaLMsJEfhW7EIfhd8aU8qbE8B7gjDkAYcaqK6D3zJr0TLI4u0ZLyMRwFDQSiMpr3IUeeR/Gtefu9KeSdxtPTDWZd0XA5sDmgRNe5m6FUNOnVZSwExdq5fWyzzaTqtqYu6YpWYXOa/zaodvHnouXlAeOWWFrmoV/I8MBF2ut5LwaiEK6XYfFt3o57RZynWe4z4KpLInwuBjjnaadYKzl1MMRFD+iNZQCP3BqbCR3pJcEash3yXFx/RW9eyVYnLSNnt5HJW99Eu5lEp9rdfc8GObZhlulVgwOAFVjbamP8AV7BjqLOqVjasVM85/op9s6bBy3x4DEG3yFhf6tc3fp1y44r4781NPhe92qrbq/a/rF0Drzza3CNmyZhZ0jVsamz8gQBby4RLY0iQ=" + on_success: change + template: "%{result}: %{repository_slug}@%{branch}, build <%{build_url}|#%{build_number}> (<%{compare_url}|%{commit}>)" + email: false diff --git a/roles/robertdebock.ara/.yamllint b/roles/robertdebock.ara/.yamllint new file mode 100644 index 0000000..894450c --- /dev/null +++ b/roles/robertdebock.ara/.yamllint @@ -0,0 +1,15 @@ +--- +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + line-length: disable + truthy: disable + +ignore: | + .tox/ diff --git a/roles/ara/CODE_OF_CONDUCT.md b/roles/robertdebock.ara/CODE_OF_CONDUCT.md similarity index 100% rename from roles/ara/CODE_OF_CONDUCT.md rename to roles/robertdebock.ara/CODE_OF_CONDUCT.md diff --git a/roles/buildtools/CONTRIBUTING.md b/roles/robertdebock.ara/CONTRIBUTING.md similarity index 72% rename from roles/buildtools/CONTRIBUTING.md rename to roles/robertdebock.ara/CONTRIBUTING.md index bfbf40f..f8b87ec 100644 --- a/roles/buildtools/CONTRIBUTING.md +++ b/roles/robertdebock.ara/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Please contribute +# [Please contribute](#please-contribute) You can really make a difference by: @@ -9,38 +9,38 @@ I'll try to help and take every contribution seriously. It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. -## Step by step +## [Step by step](#step-by-step) Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. -### 1. Make an issue. +### [1. Make an issue.](#1-make-an-issue) -When you spot an issue, [create an issue](https://github.com/robertdebock/buildtools/issues). +When you spot an issue, [create an issue](https://github.com/robertdebock/ansible-role-ara/issues). Making the issue help me and others to find similar problems in the future. -### 2. Fork the project. +### [2. Fork the project.](#2-fork-the-project) -On the top right side of [the repository on GitHub](https://github.com/robertdebock/buildtools), click `fork`. This copies everything to your GitHub namespace. +On the top right side of [the repository on GitHub](https://github.com/robertdebock/ansible-role-ara), click `fork`. This copies everything to your GitHub namespace. -### 3. Make the changes +### [3. Make the changes](#3-make-the-changes) In you own GitHub namespace, make the required changes. I typically do that by cloning the repository (in your namespace) locally: ``` -git clone git@github.com:YOURNAMESPACE/buildtools.git +git clone git@github.com:YOURNAMESPACE/ansible-role-ara.git ``` Now you can start to edit on your laptop. -### 4. Optionally: test your changes +### [4. Optionally: test your changes](#4-optionally-test-your-changes) Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): ``` -pip install molecule tox +pip install molecule tox ansible-lint docker ``` And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: @@ -55,20 +55,22 @@ Once it start to work, you can test multiple version of Ansible: image=centos tag=7 tox ``` -### 6. Optionally: Regenerate all dynamic content +### [5. Optionally: Regenerate all dynamic content](#5-optionally-regenerate-all-dynamic-content) You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. If you don't do it, I'll do it later for you. -### 7. Make a pull request +### [6. Make a pull request](#6-make-a-pull-request) [GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. -### 8. Wait +### [7. Wait](#7-wait) Now I'll get a message that you've added some code. Thank you, really. CI starts to test your changes. You can follow the progress on Travis. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/ara/LICENSE b/roles/robertdebock.ara/LICENSE similarity index 99% rename from roles/ara/LICENSE rename to roles/robertdebock.ara/LICENSE index 744118c..bd15893 100644 --- a/roles/ara/LICENSE +++ b/roles/robertdebock.ara/LICENSE @@ -187,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2019 Robert de Bock (robert@meinit.nl) + Copyright 2020 Robert de Bock (robert@meinit.nl) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/roles/ara/README.md b/roles/robertdebock.ara/README.md similarity index 63% rename from roles/ara/README.md rename to roles/robertdebock.ara/README.md index d03d282..283e61d 100644 --- a/roles/ara/README.md +++ b/roles/robertdebock.ara/README.md @@ -1,15 +1,14 @@ -ara -========= - -Ansible logo - Build status +# [ara](#ara) Install and configure ara on your system. -Example Playbook ----------------- +|Travis|GitHub|Quality|Downloads|Version| +|------|------|-------|---------|-------| +|[![travis](https://travis-ci.com/robertdebock/ansible-role-ara.svg?branch=master)](https://travis-ci.com/robertdebock/ansible-role-ara)|[![github](https://github.com/robertdebock/ansible-role-ara/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-ara/actions)|[![quality](https://img.shields.io/ansible/quality/24687)](https://galaxy.ansible.com/robertdebock/ara)|[![downloads](https://img.shields.io/ansible/role/d/24687)](https://galaxy.ansible.com/robertdebock/ara)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-ara.svg)](https://github.com/robertdebock/ansible-role-ara/releases/)| -This example is taken from `molecule/resources/playbook.yml` and is tested on each push, pull request and release. +## [Example Playbook](#example-playbook) + +This example is taken from `molecule/resources/converge.yml` and is tested on each push, pull request and release. ```yaml --- - name: Converge @@ -18,10 +17,10 @@ This example is taken from `molecule/resources/playbook.yml` and is tested on ea gather_facts: yes roles: - - robertdebock.ara + - role: robertdebock.ara ``` -The machine you are running this on, may need to be prepared, I use this playbook to ensure everything is in place to let the role work. +The machine may need to be prepared using `molecule/resources/prepare.yml`: ```yaml --- - name: Prepare @@ -30,25 +29,34 @@ The machine you are running this on, may need to be prepared, I use this playboo gather_facts: no roles: - - robertdebock.bootstrap - - robertdebock.buildtools - - robertdebock.epel - - robertdebock.python_pip + - role: robertdebock.bootstrap + - role: robertdebock.buildtools + - role: robertdebock.epel + - role: robertdebock.python_pip ``` +For verification `molecule/resources/verify.yml` runs after the role has been applied. +```yaml +--- +- name: Verify + hosts: all + become: yes + gather_facts: no + + tasks: + - name: check if connection still works + ping: +``` Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles. -Role Variables --------------- +## [Role Variables](#role-variables) These variables are set in `defaults/main.yml`: ```yaml --- # defaults file for ara -# If you would like to update the packages that this role installs, set `ara_packages_state` to `latest`, otherwise use `default`. - # The ansible.cfg to modify. ara_configuration_file: /etc/ansible/ansible.cfg @@ -67,8 +75,7 @@ ara_user: root # value: 25 ``` -Requirements ------------- +## [Requirements](#requirements) - Access to a repository containing packages, likely on the internet. - A recent version of Ansible. (Tests run on the current, previous and next release of Ansible.) @@ -78,44 +85,38 @@ The following roles can be installed to ensure all requirements are met, using ` ```yaml --- - robertdebock.bootstrap -- robertdebock.epel - robertdebock.buildtools +- robertdebock.epel - robertdebock.python_pip - robertdebock.service ``` -Context -------- +## [Context](#context) This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information. Here is an overview of related roles: ![dependencies](https://raw.githubusercontent.com/robertdebock/drawings/artifacts/ara.png "Dependency") +## [Compatibility](#compatibility) -Compatibility -------------- +This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): -This role has been tested on these [container images](https://hub.docker.com/): +|container|tags| +|---------|----| +|el|8| +|debian|buster, bullseye| +|fedora|31, 32| +|ubuntu|bionic| -|container|tag|allow_failures| -|---------|---|--------------| -|debian|unstable|yes| -|debian|latest|no| -|centos|latest|no| -|fedora|latest|no| -|fedora|rawhide|yes| -|ubuntu|latest|no| +The minimum version of Ansible required is 2.8 but tests have been done to: -This role has been tested on these Ansible versions: +- The previous version, on version lower. +- The current version. +- The development version. -- ansible>=2.8, <2.9 -- ansible>=2.9 -- git+https://github.com/ansible/ansible.git@devel - -Exceptions ----------- +## [Exceptions](#exceptions) Some variarations of the build matrix do not work. These are the variations and reasons why the build won't work: @@ -127,10 +128,9 @@ Some variarations of the build matrix do not work. These are the variations and | amazonlinux | No module named pkg_resources | -Testing -------- +## [Testing](#testing) -[Unit tests](https://travis-ci.org/robertdebock/ansible-role-ara) are done on every commit, pull request, release and periodically. +[Unit tests](https://travis-ci.com/robertdebock/ansible-role-ara) are done on every commit, pull request, release and periodically. If you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-ara/issues) @@ -162,26 +162,13 @@ image="centos" tox image="debian" tag="stable" tox ``` -Modules -------- - -This role uses the following modules: -```yaml ---- -- import_role -- ini_file -- pip -- service -- systemd -``` - -License -------- +## [License](#license) Apache-2.0 -Author Information ------------------- +## [Author Information](#author-information) [Robert de Bock](https://robertdebock.nl/) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/ara/SECURITY.md b/roles/robertdebock.ara/SECURITY.md similarity index 76% rename from roles/ara/SECURITY.md rename to roles/robertdebock.ara/SECURITY.md index 464bb10..6b7b862 100644 --- a/roles/ara/SECURITY.md +++ b/roles/robertdebock.ara/SECURITY.md @@ -1,8 +1,8 @@ -# Security Policy +# [Security Policy](#security-policy) This software implements other software, it's not very likely that this software introduces new vulnerabilities. -## Supported Versions +## [Supported Versions](#supported-versions) The current major version is supported. For example if the current version is 3.4.1: @@ -14,10 +14,12 @@ The current major version is supported. For example if the current version is 3. | 2.0.0 | :x: | | 1.0.0 | :x: | -## Reporting a Vulnerability +## [Reporting a Vulnerability](#reporting-a-vulnarability) Please [open an issue](https://github.com/robertdebock/ansible-role-ara/issues) describing the vulnerability. Tell them where to go, how often they can expect to get an update on a reported vulnerability, what to expect if the vulnerability is accepted or declined, etc. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/ara/defaults/main.yml b/roles/robertdebock.ara/defaults/main.yml similarity index 80% rename from roles/ara/defaults/main.yml rename to roles/robertdebock.ara/defaults/main.yml index 3bf8709..8b35de7 100644 --- a/roles/ara/defaults/main.yml +++ b/roles/robertdebock.ara/defaults/main.yml @@ -1,8 +1,6 @@ --- # defaults file for ara -# If you would like to update the packages that this role installs, set `ara_packages_state` to `latest`, otherwise use `default`. - # The ansible.cfg to modify. ara_configuration_file: /etc/ansible/ansible.cfg diff --git a/roles/ara/handlers/main.yml b/roles/robertdebock.ara/handlers/main.yml similarity index 100% rename from roles/ara/handlers/main.yml rename to roles/robertdebock.ara/handlers/main.yml diff --git a/roles/robertdebock.ara/meta/.galaxy_install_info b/roles/robertdebock.ara/meta/.galaxy_install_info new file mode 100644 index 0000000..8af3878 --- /dev/null +++ b/roles/robertdebock.ara/meta/.galaxy_install_info @@ -0,0 +1,2 @@ +install_date: Mon Sep 28 09:36:29 2020 +version: 2.5.2 diff --git a/roles/ara/meta/exception.yml b/roles/robertdebock.ara/meta/exception.yml similarity index 100% rename from roles/ara/meta/exception.yml rename to roles/robertdebock.ara/meta/exception.yml diff --git a/roles/ara/meta/main.yml b/roles/robertdebock.ara/meta/main.yml similarity index 83% rename from roles/ara/meta/main.yml rename to roles/robertdebock.ara/meta/main.yml index ffc8449..83fd29d 100644 --- a/roles/ara/meta/main.yml +++ b/roles/robertdebock.ara/meta/main.yml @@ -8,21 +8,19 @@ galaxy_info: min_ansible_version: 2.8 platforms: - - name: ArchLinux - versions: - - all - - name: Debian - versions: - - all - name: EL versions: - 8 + - name: Debian + versions: + - buster + - bullseye - name: Fedora versions: - - all + - 31 + - 32 - name: Ubuntu versions: - - artful - bionic galaxy_tags: @@ -33,7 +31,6 @@ galaxy_info: - centos - development - monitoring - - rhel - reporting dependencies: [] diff --git a/roles/robertdebock.ara/meta/preferences.yml b/roles/robertdebock.ara/meta/preferences.yml new file mode 100644 index 0000000..e7fdebf --- /dev/null +++ b/roles/robertdebock.ara/meta/preferences.yml @@ -0,0 +1,2 @@ +--- +tox_parallel: yes diff --git a/roles/common/molecule/default/playbook.yml b/roles/robertdebock.ara/molecule/default/converge.yml similarity index 72% rename from roles/common/molecule/default/playbook.yml rename to roles/robertdebock.ara/molecule/default/converge.yml index 4feb6cb..2b8d6e5 100644 --- a/roles/common/molecule/default/playbook.yml +++ b/roles/robertdebock.ara/molecule/default/converge.yml @@ -5,4 +5,4 @@ gather_facts: yes roles: - - ansible-role-common + - role: ansible-role-ara diff --git a/roles/ara/molecule/default/molecule.yml b/roles/robertdebock.ara/molecule/default/molecule.yml similarity index 73% rename from roles/ara/molecule/default/molecule.yml rename to roles/robertdebock.ara/molecule/default/molecule.yml index a5e309a..a698dd3 100644 --- a/roles/ara/molecule/default/molecule.yml +++ b/roles/robertdebock.ara/molecule/default/molecule.yml @@ -6,8 +6,9 @@ dependency: name: galaxy options: role-file: requirements.yml -lint: - name: yamllint +lint: | + set -e + yamllint . driver: name: docker platforms: @@ -20,5 +21,9 @@ platforms: pre_build_image: yes provisioner: name: ansible -scenario: - name: default + config_options: + defaults: + stdout_callback: yaml + bin_ansible_callbacks: yes +verifier: + name: ansible diff --git a/roles/robertdebock.ara/molecule/default/prepare.yml b/roles/robertdebock.ara/molecule/default/prepare.yml new file mode 100644 index 0000000..b7ec2fa --- /dev/null +++ b/roles/robertdebock.ara/molecule/default/prepare.yml @@ -0,0 +1,11 @@ +--- +- name: Prepare + hosts: all + become: yes + gather_facts: no + + roles: + - role: robertdebock.bootstrap + - role: robertdebock.buildtools + - role: robertdebock.epel + - role: robertdebock.python_pip diff --git a/roles/robertdebock.ara/molecule/default/verify.yml b/roles/robertdebock.ara/molecule/default/verify.yml new file mode 100644 index 0000000..b9dc6f8 --- /dev/null +++ b/roles/robertdebock.ara/molecule/default/verify.yml @@ -0,0 +1,9 @@ +--- +- name: Verify + hosts: all + become: yes + gather_facts: no + + tasks: + - name: check if connection still works + ping: diff --git a/roles/ara/requirements.yml b/roles/robertdebock.ara/requirements.yml similarity index 100% rename from roles/ara/requirements.yml rename to roles/robertdebock.ara/requirements.yml index f1ffb01..7e6f377 100644 --- a/roles/ara/requirements.yml +++ b/roles/robertdebock.ara/requirements.yml @@ -1,6 +1,6 @@ --- - robertdebock.bootstrap -- robertdebock.epel - robertdebock.buildtools +- robertdebock.epel - robertdebock.python_pip - robertdebock.service diff --git a/roles/robertdebock.ara/tasks/assert.yml b/roles/robertdebock.ara/tasks/assert.yml new file mode 100644 index 0000000..3dd6326 --- /dev/null +++ b/roles/robertdebock.ara/tasks/assert.yml @@ -0,0 +1,37 @@ +--- +- name: test if ara_configuration_file is set correctly + assert: + that: + - ara_configuration_file is defined + - ara_configuration_file | length > 0 + quiet: yes + +- name: test if ara_user is set correctly + assert: + that: + - ara_user is defined + - ara_user | length > 0 + quiet: yes + +- name: test if ara_configuration is set correctly + assert: + that: + - ara_configuration | length > 0 + - ara_configuration is iterable + quiet: yes + when: + - ara_configuration is defined + +- name: test if item in ara_configuration is set correctly + assert: + that: + - item.option is defined + - item.option | length > 0 + - item.value is defined + - item.value | length > 0 + quiet: yes + loop: "{{ ara_configuration }}" + loop_control: + label: "{{ item.option }}" + when: + - ara_configuration is defined diff --git a/roles/ara/tasks/main.yml b/roles/robertdebock.ara/tasks/main.yml similarity index 88% rename from roles/ara/tasks/main.yml rename to roles/robertdebock.ara/tasks/main.yml index 852af9b..bd2d045 100644 --- a/roles/ara/tasks/main.yml +++ b/roles/robertdebock.ara/tasks/main.yml @@ -1,12 +1,12 @@ --- # tasks file for ara +- name: include assert.yml + include_tasks: assert.yml + - name: install ara pip: name: ara[server] state: present - register: ara_install_ara - until: ara_install_ara is succeeded - retries: 3 - name: create ara service import_role: @@ -18,6 +18,7 @@ command: "{{ ara_setup_command_python2 }}" register: ara_callback_plugins changed_when: no + check_mode: no rescue: - name: try python3 @@ -31,6 +32,7 @@ section: defaults option: callback_plugins value: "{{ ara_callback_plugins.stdout }}" + mode: "0644" notify: - restart ara when: @@ -43,10 +45,10 @@ section: ara option: "{{ item.option }}" value: "{{ item.value }}" + mode: "0644" notify: - restart ara - with_items: - - "{{ ara_configuration }}" + loop: "{{ ara_configuration }}" when: - ara_configuration is defined loop_control: diff --git a/roles/atom/tox.ini b/roles/robertdebock.ara/tox.ini similarity index 54% rename from roles/atom/tox.ini rename to roles/robertdebock.ara/tox.ini index a902e16..c1bc1d4 100644 --- a/roles/atom/tox.ini +++ b/roles/robertdebock.ara/tox.ini @@ -3,7 +3,10 @@ # [tox] minversion = 3.7 -envlist = py{37}-ansible-{previous,current,next} +# Disabled "next" because of: +# https://github.com/ansible-community/molecule/issues/2626. +# envlist = py{38}-ansible-{previous,current,next} +envlist = py{38}-ansible-{previous,current} skipsdist = true [testenv] @@ -11,12 +14,13 @@ deps = previous: ansible>=2.8, <2.9 current: ansible>=2.9 next: git+https://github.com/ansible/ansible.git@devel - docker - molecule -commands = - molecule test + molecule[lint]>=3, <4 + docker>=4.2, <4.3 +commands = molecule test setenv = TOX_ENVNAME={envname} MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} + PY_COLORS=1 + ANSIBLE_FORCE_COLOR=1 passenv = namespace image tag diff --git a/roles/ara/vars/main.yml b/roles/robertdebock.ara/vars/main.yml similarity index 99% rename from roles/ara/vars/main.yml rename to roles/robertdebock.ara/vars/main.yml index 16e1359..131206f 100644 --- a/roles/ara/vars/main.yml +++ b/roles/robertdebock.ara/vars/main.yml @@ -1,5 +1,6 @@ --- # vars file for ara + _ara_binary_location: default: /usr/bin Debian: /usr/local/bin diff --git a/roles/robertdebock.atom/.ansible-lint b/roles/robertdebock.atom/.ansible-lint new file mode 100644 index 0000000..eba57d1 --- /dev/null +++ b/roles/robertdebock.atom/.ansible-lint @@ -0,0 +1,8 @@ +# +# Ansible managed +# +exclude_paths: + - ./meta/exception.yml + - ./meta/preferences.yml + - ./molecule/default/verify.yml + - ./.tox diff --git a/roles/robertdebock.atom/.github/FUNDING.yml b/roles/robertdebock.atom/.github/FUNDING.yml new file mode 100644 index 0000000..67320f0 --- /dev/null +++ b/roles/robertdebock.atom/.github/FUNDING.yml @@ -0,0 +1,2 @@ +--- +github: robertdebock diff --git a/roles/ansible_lint/.github/ISSUE_TEMPLATE/bug_report.md b/roles/robertdebock.atom/.github/ISSUE_TEMPLATE/bug_report.md similarity index 72% rename from roles/ansible_lint/.github/ISSUE_TEMPLATE/bug_report.md rename to roles/robertdebock.atom/.github/ISSUE_TEMPLATE/bug_report.md index c695b98..f39b5dc 100644 --- a/roles/ansible_lint/.github/ISSUE_TEMPLATE/bug_report.md +++ b/roles/robertdebock.atom/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,28 +1,31 @@ --- name: Bug report -about: Create a report to help us improve +about: Create a report to help me improve --- -**Describe the bug** +## Describe the bug A clear and concise description of what the bug is. -**Playbook** +## Playbook + Please paste the playbook you are using. (Consider `requirements.yml` and optionally the command you've invoked.) ```yaml +--- YOUR PLAYBOOK HERE ``` -**Output** +## Output + Show at least the error, possible related output, maybe just all the output. -**Expected behavior** -A clear and concise description of what you expected to happen. +## Environment -**Environment** - Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) - Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) - Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.atom/.github/ISSUE_TEMPLATE/feature_request.md b/roles/robertdebock.atom/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..55a93c4 --- /dev/null +++ b/roles/robertdebock.atom/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +## Proposed feature + +A clear and concise description of what you want to happen. + +## Rationale + +Why is this feature required? + +## Additional context + +Add any other context about the feature request here. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/atom/PULL_REQUEST_TEMPLATE.md b/roles/robertdebock.atom/.github/pull_request_template.md similarity index 100% rename from roles/atom/PULL_REQUEST_TEMPLATE.md rename to roles/robertdebock.atom/.github/pull_request_template.md diff --git a/roles/atom/.github/settings.yml b/roles/robertdebock.atom/.github/settings.yml similarity index 100% rename from roles/atom/.github/settings.yml rename to roles/robertdebock.atom/.github/settings.yml diff --git a/roles/robertdebock.atom/.github/workflows/galaxy.yml b/roles/robertdebock.atom/.github/workflows/galaxy.yml new file mode 100644 index 0000000..46a2556 --- /dev/null +++ b/roles/robertdebock.atom/.github/workflows/galaxy.yml @@ -0,0 +1,22 @@ +--- +# +# Ansible managed +# + +name: Release to Ansible Galaxy + +on: + push: + tags: + - '*' + schedule: + - cron: '1 1 1 * *' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: galaxy + uses: robertdebock/galaxy-action@1.0.1 + with: + galaxy_api_key: ${{ secrets.galaxy_api_key }} diff --git a/roles/robertdebock.atom/.github/workflows/molecule.yml b/roles/robertdebock.atom/.github/workflows/molecule.yml new file mode 100644 index 0000000..28c9841 --- /dev/null +++ b/roles/robertdebock.atom/.github/workflows/molecule.yml @@ -0,0 +1,70 @@ +--- +# +# Ansible managed +# + +name: Ansible Molecule + +on: + push: + tags_ignore: + - '*' + pull_request: + schedule: + - cron: '1 1 1 * *' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + command: lint + test: + needs: + - lint + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + config: + - image: "centos" + tag: "7" + - image: "centos" + tag: "latest" + - image: "debian" + tag: "latest" + - image: "fedora" + tag: "31" + - image: "fedora" + tag: "latest" + - image: "opensuse" + tag: "latest" + - image: "ubuntu" + tag: "latest" + - image: "ubuntu" + tag: "bionic" + - image: "ubuntu" + tag: "xenial" + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: disable apparmor for mysql + run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + - name: parse apparmor for mysql + run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + image: ${{ matrix.config.image }} + tag: ${{ matrix.config.tag }} + options: "--parallel all" + env: + TOX_PARALLEL_NO_SPINNER: 1 diff --git a/roles/atom/.gitignore b/roles/robertdebock.atom/.gitignore similarity index 100% rename from roles/atom/.gitignore rename to roles/robertdebock.atom/.gitignore diff --git a/roles/robertdebock.atom/.travis.yml b/roles/robertdebock.atom/.travis.yml new file mode 100644 index 0000000..381df31 --- /dev/null +++ b/roles/robertdebock.atom/.travis.yml @@ -0,0 +1,46 @@ +--- +# +# Ansible managed +# +language: python + +os: linux +dist: xenial + +python: + - "3.8" + +services: + - docker + +env: + global: + namespace="robertdebock" + jobs: + - image="centos" tag="7" + - image="centos" tag="latest" + - image="debian" tag="latest" + - image="fedora" tag="31" + - image="fedora" tag="latest" + - image="opensuse" tag="latest" + - image="ubuntu" tag="latest" + - image="ubuntu" tag="bionic" + - image="ubuntu" tag="xenial" + +cache: + - pip + +install: + - pip install --upgrade pip + - pip install tox + +script: + - function retry { counter=0 ; until "$@" ; do exit=$? ; counter=$(($counter + 1)) ; if [ $counter -ge 3 ] ; then return $exit ; fi ; done ; return 0; } ; retry tox --parallel all + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ + slack: + secure: "YzJVJjKrJ6/mOCRGmFlaLWW1U9/sVQGuFd9ENj2ErPas+Yb4RTGR3+3HgRD9mqS77jkcbCUOjr9vlZpqXaWLMCVDQfLpk3XlyhcifLR6gCPH7DW/pdsvtDRXSbldPb2yMJFM4cHZvqWHq2rXaN0VuI8MHpV54hXc6f8f2pIl2SyBeLmSDAs6yrs0LGvJfWEMcXNqe25MX2YdsCuu8CsVeXOzqVgaRAhSP3nB/eF85ElxrpXyca+s2osGYPuhKLfkss/oqp9Z8Bk4uWe//dAKuGbCWK5C89htCZvYygx8iS1PGLCHGVAhRiKWynVURMx0K6AEqinRy3Mow44TXdY3A4ots3QZeZUNB4le5JZTCrP4+QAtbM31O1Fk8LNxoVQnXB7tuZUJYWX5jrYIxlzAC43DsPcBQsF0Uz1xnNQAhJVtOGzwDjz2lq82cH6ENvUJbQE49mxcFMdvmMrPcxuQBr31N5/UB4txOzl6W41iE/XXOiR5sm0ksNLRN3Uadaefcpy+Sijr0g4HX3tB2ycMIWHV5WfluYyifor2dEar2VsTkTtTiyjaBGutk8vIwQGdoPhTAMu5AwQJOclLjup9vhX8wNG5X/GjmNtny0xVCvxoI5Qw/kbNdCnre2AqqzEvNw8q6mXHyJlaOJ+MnT1CdewzC0UNW/Y1Q67qtmdKpAE=" + on_success: change + template: "%{result}: %{repository_slug}@%{branch}, build <%{build_url}|#%{build_number}> (<%{compare_url}|%{commit}>)" + email: false diff --git a/roles/robertdebock.atom/.yamllint b/roles/robertdebock.atom/.yamllint new file mode 100644 index 0000000..894450c --- /dev/null +++ b/roles/robertdebock.atom/.yamllint @@ -0,0 +1,15 @@ +--- +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + line-length: disable + truthy: disable + +ignore: | + .tox/ diff --git a/roles/atom/CODE_OF_CONDUCT.md b/roles/robertdebock.atom/CODE_OF_CONDUCT.md similarity index 100% rename from roles/atom/CODE_OF_CONDUCT.md rename to roles/robertdebock.atom/CODE_OF_CONDUCT.md diff --git a/roles/bootstrap/CONTRIBUTING.md b/roles/robertdebock.atom/CONTRIBUTING.md similarity index 72% rename from roles/bootstrap/CONTRIBUTING.md rename to roles/robertdebock.atom/CONTRIBUTING.md index 71d0749..ddd1ee2 100644 --- a/roles/bootstrap/CONTRIBUTING.md +++ b/roles/robertdebock.atom/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Please contribute +# [Please contribute](#please-contribute) You can really make a difference by: @@ -9,38 +9,38 @@ I'll try to help and take every contribution seriously. It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. -## Step by step +## [Step by step](#step-by-step) Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. -### 1. Make an issue. +### [1. Make an issue.](#1-make-an-issue) -When you spot an issue, [create an issue](https://github.com/robertdebock/bootstrap/issues). +When you spot an issue, [create an issue](https://github.com/robertdebock/ansible-role-atom/issues). Making the issue help me and others to find similar problems in the future. -### 2. Fork the project. +### [2. Fork the project.](#2-fork-the-project) -On the top right side of [the repository on GitHub](https://github.com/robertdebock/bootstrap), click `fork`. This copies everything to your GitHub namespace. +On the top right side of [the repository on GitHub](https://github.com/robertdebock/ansible-role-atom), click `fork`. This copies everything to your GitHub namespace. -### 3. Make the changes +### [3. Make the changes](#3-make-the-changes) In you own GitHub namespace, make the required changes. I typically do that by cloning the repository (in your namespace) locally: ``` -git clone git@github.com:YOURNAMESPACE/bootstrap.git +git clone git@github.com:YOURNAMESPACE/ansible-role-atom.git ``` Now you can start to edit on your laptop. -### 4. Optionally: test your changes +### [4. Optionally: test your changes](#4-optionally-test-your-changes) Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): ``` -pip install molecule tox +pip install molecule tox ansible-lint docker ``` And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: @@ -55,20 +55,22 @@ Once it start to work, you can test multiple version of Ansible: image=centos tag=7 tox ``` -### 6. Optionally: Regenerate all dynamic content +### [5. Optionally: Regenerate all dynamic content](#5-optionally-regenerate-all-dynamic-content) You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. If you don't do it, I'll do it later for you. -### 7. Make a pull request +### [6. Make a pull request](#6-make-a-pull-request) [GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. -### 8. Wait +### [7. Wait](#7-wait) Now I'll get a message that you've added some code. Thank you, really. CI starts to test your changes. You can follow the progress on Travis. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/atom/LICENSE b/roles/robertdebock.atom/LICENSE similarity index 99% rename from roles/atom/LICENSE rename to roles/robertdebock.atom/LICENSE index 744118c..bd15893 100644 --- a/roles/atom/LICENSE +++ b/roles/robertdebock.atom/LICENSE @@ -187,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2019 Robert de Bock (robert@meinit.nl) + Copyright 2020 Robert de Bock (robert@meinit.nl) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/roles/atom/README.md b/roles/robertdebock.atom/README.md similarity index 55% rename from roles/atom/README.md rename to roles/robertdebock.atom/README.md index ae6750f..45b68d8 100644 --- a/roles/atom/README.md +++ b/roles/robertdebock.atom/README.md @@ -1,15 +1,14 @@ -atom -========= - -Ansible logo - Build status +# [atom](#atom) Install atom on your system. -Example Playbook ----------------- +|Travis|GitHub|Quality|Downloads|Version| +|------|------|-------|---------|-------| +|[![travis](https://travis-ci.com/robertdebock/ansible-role-atom.svg?branch=master)](https://travis-ci.com/robertdebock/ansible-role-atom)|[![github](https://github.com/robertdebock/ansible-role-atom/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-atom/actions)|[![quality](https://img.shields.io/ansible/quality/36572)](https://galaxy.ansible.com/robertdebock/atom)|[![downloads](https://img.shields.io/ansible/role/d/36572)](https://galaxy.ansible.com/robertdebock/atom)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-atom.svg)](https://github.com/robertdebock/ansible-role-atom/releases/)| -This example is taken from `molecule/resources/playbook.yml` and is tested on each push, pull request and release. +## [Example Playbook](#example-playbook) + +This example is taken from `molecule/resources/converge.yml` and is tested on each push, pull request and release. ```yaml --- - name: Converge @@ -18,10 +17,10 @@ This example is taken from `molecule/resources/playbook.yml` and is tested on ea gather_facts: yes roles: - - robertdebock.atom + - role: robertdebock.atom ``` -The machine you are running this on, may need to be prepared, I use this playbook to ensure everything is in place to let the role work. +The machine may need to be prepared using `molecule/resources/prepare.yml`: ```yaml --- - name: Prepare @@ -33,20 +32,36 @@ The machine you are running this on, may need to be prepared, I use this playboo - role: robertdebock.bootstrap ``` +For verification `molecule/resources/verify.yml` runs after the role has been applied. +```yaml +--- +- name: Verify + hosts: all + become: yes + gather_facts: no + + tasks: + - name: check if atom exists works + command: file /usr/bin/atom +``` Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles. -Role Variables --------------- +## [Role Variables](#role-variables) These variables are set in `defaults/main.yml`: ```yaml --- # defaults file for atom + +# What apm packages (https://atom.io/packages) to install. +atom_apm_packages: + - linter + - platformio-ide-terminal + - teletype ``` -Requirements ------------- +## [Requirements](#requirements) - Access to a repository containing packages, likely on the internet. - A recent version of Ansible. (Tests run on the current, previous and next release of Ansible.) @@ -59,52 +74,44 @@ The following roles can be installed to ensure all requirements are met, using ` ``` -Context -------- +## [Context](#context) This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information. Here is an overview of related roles: ![dependencies](https://raw.githubusercontent.com/robertdebock/drawings/artifacts/atom.png "Dependency") +## [Compatibility](#compatibility) -Compatibility -------------- +This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): -This role has been tested on these [container images](https://hub.docker.com/): +|container|tags| +|---------|----| +|el|7, 8| +|debian|buster| +|fedora|31, 32| +|opensuse|all| +|ubuntu|focal, bionic, xenial| -|container|tag|allow_failures| -|---------|---|--------------| -|amazonlinux|latest|no| -|alpine|latest|no| -|alpine|edge|yes| -|debian|unstable|yes| -|debian|latest|no| -|fedora|latest|no| -|fedora|rawhide|yes| -|opensuse|latest|no| -|ubuntu|latest|no| +The minimum version of Ansible required is 2.8 but tests have been done to: -This role has been tested on these Ansible versions: +- The previous version, on version lower. +- The current version. +- The development version. -- ansible>=2.8, <2.9 -- ansible>=2.9 -- git+https://github.com/ansible/ansible.git@devel - -Exceptions ----------- +## [Exceptions](#exceptions) Some variarations of the build matrix do not work. These are the variations and reasons why the build won't work: | variation | reason | |---------------------------|------------------------| | amazonlinux:1 | Package: atom ... Requires: libsecret-1.so.0 ... and ... polkit | +| debian:bullseye | An error occurred during the test sequence action: 'idempotence'. Cleaning up. | -Testing -------- +## [Testing](#testing) -[Unit tests](https://travis-ci.org/robertdebock/ansible-role-atom) are done on every commit, pull request, release and periodically. +[Unit tests](https://travis-ci.com/robertdebock/ansible-role-atom) are done on every commit, pull request, release and periodically. If you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-atom/issues) @@ -136,27 +143,13 @@ image="centos" tox image="debian" tag="stable" tox ``` -Modules -------- - -This role uses the following modules: -```yaml ---- -- apt -- dnf -- get_url -- package -- yum -- zypper -``` - -License -------- +## [License](#license) Apache-2.0 -Author Information ------------------- +## [Author Information](#author-information) [Robert de Bock](https://robertdebock.nl/) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/atom/SECURITY.md b/roles/robertdebock.atom/SECURITY.md similarity index 76% rename from roles/atom/SECURITY.md rename to roles/robertdebock.atom/SECURITY.md index 256bb2e..abb8d40 100644 --- a/roles/atom/SECURITY.md +++ b/roles/robertdebock.atom/SECURITY.md @@ -1,8 +1,8 @@ -# Security Policy +# [Security Policy](#security-policy) This software implements other software, it's not very likely that this software introduces new vulnerabilities. -## Supported Versions +## [Supported Versions](#supported-versions) The current major version is supported. For example if the current version is 3.4.1: @@ -14,10 +14,12 @@ The current major version is supported. For example if the current version is 3. | 2.0.0 | :x: | | 1.0.0 | :x: | -## Reporting a Vulnerability +## [Reporting a Vulnerability](#reporting-a-vulnarability) Please [open an issue](https://github.com/robertdebock/ansible-role-atom/issues) describing the vulnerability. Tell them where to go, how often they can expect to get an update on a reported vulnerability, what to expect if the vulnerability is accepted or declined, etc. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.atom/defaults/main.yml b/roles/robertdebock.atom/defaults/main.yml new file mode 100644 index 0000000..7706029 --- /dev/null +++ b/roles/robertdebock.atom/defaults/main.yml @@ -0,0 +1,8 @@ +--- +# defaults file for atom + +# What apm packages (https://atom.io/packages) to install. +atom_apm_packages: + - linter + - platformio-ide-terminal + - teletype diff --git a/roles/robertdebock.atom/meta/.galaxy_install_info b/roles/robertdebock.atom/meta/.galaxy_install_info new file mode 100644 index 0000000..5532bcf --- /dev/null +++ b/roles/robertdebock.atom/meta/.galaxy_install_info @@ -0,0 +1,2 @@ +install_date: Mon Sep 28 09:36:32 2020 +version: 2.5.1 diff --git a/roles/robertdebock.atom/meta/exception.yml b/roles/robertdebock.atom/meta/exception.yml new file mode 100644 index 0000000..aaa4bb6 --- /dev/null +++ b/roles/robertdebock.atom/meta/exception.yml @@ -0,0 +1,6 @@ +--- +exceptions: + - variation: amazonlinux:1 + reason: "Package: atom ... Requires: libsecret-1.so.0 ... and ... polkit" + - variation: debian:bullseye + reason: "An error occurred during the test sequence action: 'idempotence'. Cleaning up." diff --git a/roles/atom/meta/main.yml b/roles/robertdebock.atom/meta/main.yml similarity index 66% rename from roles/atom/meta/main.yml rename to roles/robertdebock.atom/meta/main.yml index f97195c..4ef20dd 100644 --- a/roles/atom/meta/main.yml +++ b/roles/robertdebock.atom/meta/main.yml @@ -8,33 +8,28 @@ galaxy_info: min_ansible_version: 2.8 platforms: - - name: Amazon + - name: EL versions: - - Candidate - - name: Alpine - versions: - - all - - name: ArchLinux - versions: - - all + - 7 + - 8 - name: Debian versions: - - all + - buster - name: Fedora versions: - - all + - 31 + - 32 - name: OpenSUSE versions: - all - name: Ubuntu versions: - - artful + - focal - bionic + - xenial galaxy_tags: - atom - - archlinux - centos - - rhel dependencies: [] diff --git a/roles/robertdebock.atom/meta/preferences.yml b/roles/robertdebock.atom/meta/preferences.yml new file mode 100644 index 0000000..e7fdebf --- /dev/null +++ b/roles/robertdebock.atom/meta/preferences.yml @@ -0,0 +1,2 @@ +--- +tox_parallel: yes diff --git a/roles/buildtools/molecule/default/playbook.yml b/roles/robertdebock.atom/molecule/default/converge.yml similarity index 72% rename from roles/buildtools/molecule/default/playbook.yml rename to roles/robertdebock.atom/molecule/default/converge.yml index 4ddc089..0e76e11 100644 --- a/roles/buildtools/molecule/default/playbook.yml +++ b/roles/robertdebock.atom/molecule/default/converge.yml @@ -5,4 +5,4 @@ gather_facts: yes roles: - - ansible-role-buildtools + - role: ansible-role-atom diff --git a/roles/atom/molecule/default/molecule.yml b/roles/robertdebock.atom/molecule/default/molecule.yml similarity index 73% rename from roles/atom/molecule/default/molecule.yml rename to roles/robertdebock.atom/molecule/default/molecule.yml index bb9e5d7..5e39405 100644 --- a/roles/atom/molecule/default/molecule.yml +++ b/roles/robertdebock.atom/molecule/default/molecule.yml @@ -6,8 +6,9 @@ dependency: name: galaxy options: role-file: requirements.yml -lint: - name: yamllint +lint: | + set -e + yamllint . driver: name: docker platforms: @@ -20,5 +21,9 @@ platforms: pre_build_image: yes provisioner: name: ansible -scenario: - name: default + config_options: + defaults: + stdout_callback: yaml + bin_ansible_callbacks: yes +verifier: + name: ansible diff --git a/roles/atom/molecule/default/prepare.yml b/roles/robertdebock.atom/molecule/default/prepare.yml similarity index 100% rename from roles/atom/molecule/default/prepare.yml rename to roles/robertdebock.atom/molecule/default/prepare.yml diff --git a/roles/robertdebock.atom/molecule/default/verify.yml b/roles/robertdebock.atom/molecule/default/verify.yml new file mode 100644 index 0000000..303c2a7 --- /dev/null +++ b/roles/robertdebock.atom/molecule/default/verify.yml @@ -0,0 +1,9 @@ +--- +- name: Verify + hosts: all + become: yes + gather_facts: no + + tasks: + - name: check if atom exists works + command: file /usr/bin/atom diff --git a/roles/atom/requirements.yml b/roles/robertdebock.atom/requirements.yml similarity index 100% rename from roles/atom/requirements.yml rename to roles/robertdebock.atom/requirements.yml diff --git a/roles/robertdebock.atom/tasks/assert.yml b/roles/robertdebock.atom/tasks/assert.yml new file mode 100644 index 0000000..450df5d --- /dev/null +++ b/roles/robertdebock.atom/tasks/assert.yml @@ -0,0 +1,9 @@ +--- +- name: test if atom_apm_packages is set correctly + assert: + that: + - atom_apm_packages | length > 0 + - atom_apm_packages is iterable + quiet: yes + when: + - atom_apm_packages is defined diff --git a/roles/atom/tasks/main.yml b/roles/robertdebock.atom/tasks/main.yml similarity index 77% rename from roles/atom/tasks/main.yml rename to roles/robertdebock.atom/tasks/main.yml index b5497ee..03dbf21 100644 --- a/roles/atom/tasks/main.yml +++ b/roles/robertdebock.atom/tasks/main.yml @@ -1,5 +1,8 @@ --- # tasks file for atom +- name: include assert.yml + include_tasks: assert.yml + - name: install requirements package: name: "{{ atom_requirements }}" @@ -7,23 +10,18 @@ when: - atom_requirements is defined - ansible_pkg_mgr == "apt" - register: atom_install_requirements - until: atom_install_requirements is succeeded - retries: 3 - name: download atom get_url: url: "{{ atom_package_url }}" dest: "/tmp/{{ atom_package }}" + checksum: "{{ atom_checksum }}" validate_certs: no when: - ansible_pkg_mgr == "apt" or ansible_pkg_mgr == "dnf" or ansible_pkg_mgr == "yum" or ansible_pkg_mgr == "zypper" - register: atom_download_atom - until: atom_download_atom is succeeded - retries: 3 - name: install atom deb apt: @@ -36,6 +34,7 @@ dnf: name: "/tmp/{{ atom_package }}" state: present + disable_gpg_check: yes when: - ansible_pkg_mgr == "dnf" @@ -43,6 +42,7 @@ yum: name: "/tmp/{{ atom_package }}" state: present + disable_gpg_check: yes when: - ansible_pkg_mgr == "yum" @@ -53,3 +53,9 @@ disable_gpg_check: yes when: - ansible_pkg_mgr == "zypper" + +- name: install apm packages + command: apm install {{ item }} + args: + creates: /root/.atom/packages/linter + loop: "{{ atom_apm_packages }}" diff --git a/roles/ansible_lint/tox.ini b/roles/robertdebock.atom/tox.ini similarity index 54% rename from roles/ansible_lint/tox.ini rename to roles/robertdebock.atom/tox.ini index a902e16..c1bc1d4 100644 --- a/roles/ansible_lint/tox.ini +++ b/roles/robertdebock.atom/tox.ini @@ -3,7 +3,10 @@ # [tox] minversion = 3.7 -envlist = py{37}-ansible-{previous,current,next} +# Disabled "next" because of: +# https://github.com/ansible-community/molecule/issues/2626. +# envlist = py{38}-ansible-{previous,current,next} +envlist = py{38}-ansible-{previous,current} skipsdist = true [testenv] @@ -11,12 +14,13 @@ deps = previous: ansible>=2.8, <2.9 current: ansible>=2.9 next: git+https://github.com/ansible/ansible.git@devel - docker - molecule -commands = - molecule test + molecule[lint]>=3, <4 + docker>=4.2, <4.3 +commands = molecule test setenv = TOX_ENVNAME={envname} MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} + PY_COLORS=1 + ANSIBLE_FORCE_COLOR=1 passenv = namespace image tag diff --git a/roles/robertdebock.atom/vars/main.yml b/roles/robertdebock.atom/vars/main.yml new file mode 100644 index 0000000..1f06b5b --- /dev/null +++ b/roles/robertdebock.atom/vars/main.yml @@ -0,0 +1,32 @@ +--- +# vars file for atom + +_atom_requirements: + apt: + - apt-transport-https + +atom_requirements: "{{ _atom_requirements[ansible_pkg_mgr] | default(omit) }}" + +_atom_package: + apt: + url: 'https://atom.io/download/deb' + name: atom-amd64.deb + dnf: &rpmpackage + url: 'https://atom.io/download/rpm' + name: atom.x86_64.rpm + yum: *rpmpackage + zypper: *rpmpackage + +atom_package_url: '{{ _atom_package[ansible_pkg_mgr]["url"] }}' +atom_package: "{{ _atom_package[ansible_pkg_mgr]['name'] }}" + +# The checksum of the downloaded artifact, this speeds up the execution of the +# role on second runs as it calculates the (local) checksum and uses the results +# to see if the artifact would need to be downloaded again. +_atom_checksum: + dnf: &rpmchecksum "sha256:c281cbf02e0640b0cefc6232bd16ddfc8841a81ed1b6a9d7e5fc7d135ac7d831" + yum: *rpmchecksum + zypper: *rpmchecksum + apt: "sha256:ea1517f928916e09108fc1a0e6942304fcaa0dc9a920e0eb2de45d128dc1f331" + +atom_checksum: "{{ _atom_checksum[ansible_pkg_mgr] }}" diff --git a/roles/robertdebock.bootstrap/.ansible-lint b/roles/robertdebock.bootstrap/.ansible-lint new file mode 100644 index 0000000..cb2872e --- /dev/null +++ b/roles/robertdebock.bootstrap/.ansible-lint @@ -0,0 +1,7 @@ +# +# Ansible managed +# +exclude_paths: + - ./meta/preferences.yml + - ./molecule/default/verify.yml + - ./.tox diff --git a/roles/robertdebock.bootstrap/.github/FUNDING.yml b/roles/robertdebock.bootstrap/.github/FUNDING.yml new file mode 100644 index 0000000..67320f0 --- /dev/null +++ b/roles/robertdebock.bootstrap/.github/FUNDING.yml @@ -0,0 +1,2 @@ +--- +github: robertdebock diff --git a/roles/robertdebock.bootstrap/.github/ISSUE_TEMPLATE/bug_report.md b/roles/robertdebock.bootstrap/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..f39b5dc --- /dev/null +++ b/roles/robertdebock.bootstrap/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a report to help me improve + +--- + +## Describe the bug +A clear and concise description of what the bug is. + +## Playbook + +Please paste the playbook you are using. (Consider `requirements.yml` and +optionally the command you've invoked.) + + +```yaml +--- +YOUR PLAYBOOK HERE +``` + +## Output + +Show at least the error, possible related output, maybe just all the output. + +## Environment + +- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) +- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) +- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.bootstrap/.github/ISSUE_TEMPLATE/feature_request.md b/roles/robertdebock.bootstrap/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..55a93c4 --- /dev/null +++ b/roles/robertdebock.bootstrap/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +## Proposed feature + +A clear and concise description of what you want to happen. + +## Rationale + +Why is this feature required? + +## Additional context + +Add any other context about the feature request here. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/bootstrap/PULL_REQUEST_TEMPLATE.md b/roles/robertdebock.bootstrap/.github/pull_request_template.md similarity index 100% rename from roles/bootstrap/PULL_REQUEST_TEMPLATE.md rename to roles/robertdebock.bootstrap/.github/pull_request_template.md diff --git a/roles/bootstrap/.github/settings.yml b/roles/robertdebock.bootstrap/.github/settings.yml similarity index 100% rename from roles/bootstrap/.github/settings.yml rename to roles/robertdebock.bootstrap/.github/settings.yml diff --git a/roles/robertdebock.bootstrap/.github/workflows/galaxy.yml b/roles/robertdebock.bootstrap/.github/workflows/galaxy.yml new file mode 100644 index 0000000..7ff6f4b --- /dev/null +++ b/roles/robertdebock.bootstrap/.github/workflows/galaxy.yml @@ -0,0 +1,22 @@ +--- +# +# Ansible managed +# + +name: Release to Ansible Galaxy + +on: + push: + tags: + - '*' + schedule: + - cron: '2 2 2 * *' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: galaxy + uses: robertdebock/galaxy-action@1.0.1 + with: + galaxy_api_key: ${{ secrets.galaxy_api_key }} diff --git a/roles/robertdebock.bootstrap/.github/workflows/molecule.yml b/roles/robertdebock.bootstrap/.github/workflows/molecule.yml new file mode 100644 index 0000000..98b4d68 --- /dev/null +++ b/roles/robertdebock.bootstrap/.github/workflows/molecule.yml @@ -0,0 +1,78 @@ +--- +# +# Ansible managed +# + +name: Ansible Molecule + +on: + push: + tags_ignore: + - '*' + pull_request: + schedule: + - cron: '2 2 2 * *' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + command: lint + test: + needs: + - lint + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + config: + - image: "alpine" + tag: "latest" + - image: "alpine" + tag: "edge" + - image: "amazonlinux" + tag: "1" + - image: "centos" + tag: "7" + - image: "centos" + tag: "latest" + - image: "debian" + tag: "latest" + - image: "debian" + tag: "bullseye" + - image: "fedora" + tag: "31" + - image: "fedora" + tag: "latest" + - image: "opensuse" + tag: "latest" + - image: "ubuntu" + tag: "latest" + - image: "ubuntu" + tag: "bionic" + - image: "ubuntu" + tag: "xenial" + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: disable apparmor for mysql + run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + - name: parse apparmor for mysql + run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + image: ${{ matrix.config.image }} + tag: ${{ matrix.config.tag }} + options: "--parallel all" + env: + TOX_PARALLEL_NO_SPINNER: 1 diff --git a/roles/bootstrap/.gitignore b/roles/robertdebock.bootstrap/.gitignore similarity index 100% rename from roles/bootstrap/.gitignore rename to roles/robertdebock.bootstrap/.gitignore diff --git a/roles/robertdebock.bootstrap/.travis.yml b/roles/robertdebock.bootstrap/.travis.yml new file mode 100644 index 0000000..f2adf09 --- /dev/null +++ b/roles/robertdebock.bootstrap/.travis.yml @@ -0,0 +1,50 @@ +--- +# +# Ansible managed +# +language: python + +os: linux +dist: xenial + +python: + - "3.8" + +services: + - docker + +env: + global: + namespace="robertdebock" + jobs: + - image="alpine" tag="latest" + - image="alpine" tag="edge" + - image="amazonlinux" tag="1" + - image="centos" tag="7" + - image="centos" tag="latest" + - image="debian" tag="latest" + - image="debian" tag="bullseye" + - image="fedora" tag="31" + - image="fedora" tag="latest" + - image="opensuse" tag="latest" + - image="ubuntu" tag="latest" + - image="ubuntu" tag="bionic" + - image="ubuntu" tag="xenial" + +cache: + - pip + +install: + - pip install --upgrade pip + - pip install tox + +script: + - function retry { counter=0 ; until "$@" ; do exit=$? ; counter=$(($counter + 1)) ; if [ $counter -ge 3 ] ; then return $exit ; fi ; done ; return 0; } ; retry tox --parallel all + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ + slack: + secure: "c/7w29ATfGyTJDowxJ61F/a2KhWrqIS726AXFLlzhMMlMcdXpRem04GLDCKQeVeqxGhvsCHqjvYEvtEpjQE/j3l3vpkAT2yeqoztPUS6r7VJZ0ykhNKwqTv1cUvhGIj3inMVOb2gg05n0LwfjnKfJfWPsxGqnA3lxU1O/skLUdBYsM/fN92cqRwI26CIwCn1BsvMrueqZzwltxZcI0q4RFyR7Boe6KgalfzRq00EP2O2uGLPjmAkghWvXIJe7Kl9t6OO08+ITp3LbHZ6oLGPbBxd2YB4nW9GvJRRYw0Bz1jKMeLVNNsyyMFXqJep2Y2+gwaOLo/miK4hJhi19+p+ftiayae+58UMgw4s5huNIAoYga1AdPNUzE0LL82X6Ig/Gxt+fPEzkH5ivrP0LK46Ef65amhtHD117IugTdaXWM43GyQxPgx/DVb7CBP82OC8BOUJg5uiunGdld4UsyJ4BDfV21x5vN1IEund8poevz2/mq4h55cLI6DtiuQsupCI2fmQ3LQ593QPmXG2n8BhcuaJda8JXwwyx3OMuXqQaHQjvWMpnqgpV79MutwDZM9t0Ym5s83xMP6Ti7rCXGAn5EdUrsF9tjsJRPbi0EJFAkrIRsqpu/gHeLrIfnn1MkDJvmF1BsoaPzlQ0hrgPocBBJnvmrzye4m9N5sUA3uYSac=" + on_success: change + template: "%{result}: %{repository_slug}@%{branch}, build <%{build_url}|#%{build_number}> (<%{compare_url}|%{commit}>)" + email: false diff --git a/roles/robertdebock.bootstrap/.yamllint b/roles/robertdebock.bootstrap/.yamllint new file mode 100644 index 0000000..894450c --- /dev/null +++ b/roles/robertdebock.bootstrap/.yamllint @@ -0,0 +1,15 @@ +--- +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + line-length: disable + truthy: disable + +ignore: | + .tox/ diff --git a/roles/bootstrap/CODE_OF_CONDUCT.md b/roles/robertdebock.bootstrap/CODE_OF_CONDUCT.md similarity index 100% rename from roles/bootstrap/CODE_OF_CONDUCT.md rename to roles/robertdebock.bootstrap/CODE_OF_CONDUCT.md diff --git a/roles/robertdebock.bootstrap/CONTRIBUTING.md b/roles/robertdebock.bootstrap/CONTRIBUTING.md new file mode 100644 index 0000000..2ef8c23 --- /dev/null +++ b/roles/robertdebock.bootstrap/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# [Please contribute](#please-contribute) + +You can really make a difference by: + +- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) +- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. + +I'll try to help and take every contribution seriously. + +It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. + +## [Step by step](#step-by-step) + +Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. + +### [1. Make an issue.](#1-make-an-issue) + +When you spot an issue, [create an issue](https://github.com/robertdebock/ansible-role-bootstrap/issues). + +Making the issue help me and others to find similar problems in the future. + +### [2. Fork the project.](#2-fork-the-project) + +On the top right side of [the repository on GitHub](https://github.com/robertdebock/ansible-role-bootstrap), click `fork`. This copies everything to your GitHub namespace. + +### [3. Make the changes](#3-make-the-changes) + +In you own GitHub namespace, make the required changes. + +I typically do that by cloning the repository (in your namespace) locally: + +``` +git clone git@github.com:YOURNAMESPACE/ansible-role-bootstrap.git +``` + +Now you can start to edit on your laptop. + +### [4. Optionally: test your changes](#4-optionally-test-your-changes) + +Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): + +``` +pip install molecule tox ansible-lint docker +``` + +And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: + +``` +image=centos tag=7 molecule test +``` + +Once it start to work, you can test multiple version of Ansible: + +``` +image=centos tag=7 tox +``` + +### [5. Optionally: Regenerate all dynamic content](#5-optionally-regenerate-all-dynamic-content) + +You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. + +If you don't do it, I'll do it later for you. + +### [6. Make a pull request](#6-make-a-pull-request) + +[GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. + +In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. + +### [7. Wait](#7-wait) + +Now I'll get a message that you've added some code. Thank you, really. + +CI starts to test your changes. You can follow the progress on Travis. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.bootstrap/LICENSE b/roles/robertdebock.bootstrap/LICENSE new file mode 100644 index 0000000..bd15893 --- /dev/null +++ b/roles/robertdebock.bootstrap/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Robert de Bock (robert@meinit.nl) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/roles/bootstrap/README.md b/roles/robertdebock.bootstrap/README.md similarity index 58% rename from roles/bootstrap/README.md rename to roles/robertdebock.bootstrap/README.md index fcfa0d2..071dcd4 100644 --- a/roles/bootstrap/README.md +++ b/roles/robertdebock.bootstrap/README.md @@ -1,15 +1,14 @@ -bootstrap -========= - -Ansible logo - Build status +# [bootstrap](#bootstrap) Prepare your system to be managed by Ansible. -Example Playbook ----------------- +|Travis|GitHub|Quality|Downloads|Version| +|------|------|-------|---------|-------| +|[![travis](https://travis-ci.com/robertdebock/ansible-role-bootstrap.svg?branch=master)](https://travis-ci.com/robertdebock/ansible-role-bootstrap)|[![github](https://github.com/robertdebock/ansible-role-bootstrap/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-bootstrap/actions)|[![quality](https://img.shields.io/ansible/quality/21642)](https://galaxy.ansible.com/robertdebock/bootstrap)|[![downloads](https://img.shields.io/ansible/role/d/21642)](https://galaxy.ansible.com/robertdebock/bootstrap)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-bootstrap.svg)](https://github.com/robertdebock/ansible-role-bootstrap/releases/)| -This example is taken from `molecule/resources/playbook.yml` and is tested on each push, pull request and release. +## [Example Playbook](#example-playbook) + +This example is taken from `molecule/resources/converge.yml` and is tested on each push, pull request and release. ```yaml --- - name: Converge @@ -18,21 +17,21 @@ This example is taken from `molecule/resources/playbook.yml` and is tested on ea gather_facts: no roles: - - robertdebock.bootstrap + - role: robertdebock.bootstrap ``` -The machine you are running this on, may need to be prepared, I use this playbook to ensure everything is in place to let the role work. +The machine may need to be prepared using `molecule/resources/prepare.yml`: ```yaml No preparation required. ``` -After running this role, this playbook runs to verify that everything works, this may be a good example how you can use this role. +For verification `molecule/resources/verify.yml` runs after the role has been applied. ```yaml --- - name: Verify hosts: all become: no - gather_facts: yes + gather_facts: no tasks: - name: test connection @@ -41,8 +40,7 @@ After running this role, this playbook runs to verify that everything works, thi Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles. -Role Variables --------------- +## [Role Variables](#role-variables) These variables are set in `defaults/main.yml`: ```yaml @@ -62,8 +60,7 @@ bootstrap_timeout: 3 bootstrap_retries: 3 ``` -Requirements ------------- +## [Requirements](#requirements) - Access to a repository containing packages, likely on the internet. - A recent version of Ansible. (Tests run on the current, previous and next release of Ansible.) @@ -74,31 +71,26 @@ The following roles can be installed to ensure all requirements are met, using ` - none ``` -Context -------- +## [Context](#context) This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information. Here is an overview of related roles: ![dependencies](https://raw.githubusercontent.com/robertdebock/drawings/artifacts/bootstrap.png "Dependency") +## [Compatibility](#compatibility) -Compatibility -------------- - -This role has been tested on these [container images](https://hub.docker.com/): +This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): |container|tags| |---------|----| -|amazon|all| |alpine|all| -|archlinux|all| -|debian|all| +|amazon|2018.03| |el|7, 8| -|fedora|all| +|debian|buster, bullseye| +|fedora|31, 32| |opensuse|all| -|sles|all| -|ubuntu|artful, bionic| +|ubuntu|focal, bionic, xenial| The minimum version of Ansible required is 2.8 but tests have been done to: @@ -108,10 +100,9 @@ The minimum version of Ansible required is 2.8 but tests have been done to: -Testing -------- +## [Testing](#testing) -[Unit tests](https://travis-ci.org/robertdebock/ansible-role-bootstrap) are done on every commit, pull request, release and periodically. +[Unit tests](https://travis-ci.com/robertdebock/ansible-role-bootstrap) are done on every commit, pull request, release and periodically. If you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-bootstrap/issues) @@ -143,13 +134,23 @@ image="centos" tox image="debian" tag="stable" tox ``` -License -------- +## [License](#license) Apache-2.0 +## [Contributors](#contributors) -Author Information ------------------- +I'd like to thank everybody that made contributions to this repository. It motivates me, improves the code and is just fun to collaborate. + +- [rembik](https://github.com/rembik) +- [jellevandehaterd](https://github.com/jellevandehaterd) +- [fzarifian](https://github.com/fzarifian) +- [kmonticolo](https://github.com/kmonticolo) +- [CrystalStiletto](https://github.com/CrystalStiletto) +- [infothrill](https://github.com/infothrill) + +## [Author Information](#author-information) [Robert de Bock](https://robertdebock.nl/) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/bootstrap/SECURITY.md b/roles/robertdebock.bootstrap/SECURITY.md similarity index 76% rename from roles/bootstrap/SECURITY.md rename to roles/robertdebock.bootstrap/SECURITY.md index 0b5af68..cdbc662 100644 --- a/roles/bootstrap/SECURITY.md +++ b/roles/robertdebock.bootstrap/SECURITY.md @@ -1,8 +1,8 @@ -# Security Policy +# [Security Policy](#security-policy) This software implements other software, it's not very likely that this software introduces new vulnerabilities. -## Supported Versions +## [Supported Versions](#supported-versions) The current major version is supported. For example if the current version is 3.4.1: @@ -14,10 +14,12 @@ The current major version is supported. For example if the current version is 3. | 2.0.0 | :x: | | 1.0.0 | :x: | -## Reporting a Vulnerability +## [Reporting a Vulnerability](#reporting-a-vulnarability) Please [open an issue](https://github.com/robertdebock/ansible-role-bootstrap/issues) describing the vulnerability. Tell them where to go, how often they can expect to get an update on a reported vulnerability, what to expect if the vulnerability is accepted or declined, etc. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/bootstrap/defaults/main.yml b/roles/robertdebock.bootstrap/defaults/main.yml similarity index 100% rename from roles/bootstrap/defaults/main.yml rename to roles/robertdebock.bootstrap/defaults/main.yml diff --git a/roles/robertdebock.bootstrap/meta/.galaxy_install_info b/roles/robertdebock.bootstrap/meta/.galaxy_install_info new file mode 100644 index 0000000..3aecda9 --- /dev/null +++ b/roles/robertdebock.bootstrap/meta/.galaxy_install_info @@ -0,0 +1,2 @@ +install_date: Mon Sep 28 09:36:35 2020 +version: 4.2.7 diff --git a/roles/bootstrap/meta/main.yml b/roles/robertdebock.bootstrap/meta/main.yml similarity index 80% rename from roles/bootstrap/meta/main.yml rename to roles/robertdebock.bootstrap/meta/main.yml index b776686..3710070 100644 --- a/roles/bootstrap/meta/main.yml +++ b/roles/robertdebock.bootstrap/meta/main.yml @@ -8,35 +8,32 @@ galaxy_info: min_ansible_version: 2.8 platforms: - - name: Amazon - versions: - - all - name: Alpine versions: - all - - name: ArchLinux + - name: Amazon versions: - - all - - name: Debian - versions: - - all + - 2018.03 - name: EL versions: - 7 - 8 + - name: Debian + versions: + - buster + - bullseye - name: Fedora versions: - - all + - 31 + - 32 - name: OpenSUSE versions: - all - - name: SLES - versions: - - all - name: Ubuntu versions: - - artful + - focal - bionic + - xenial galaxy_tags: - bootstrap diff --git a/roles/robertdebock.bootstrap/meta/preferences.yml b/roles/robertdebock.bootstrap/meta/preferences.yml new file mode 100644 index 0000000..e7fdebf --- /dev/null +++ b/roles/robertdebock.bootstrap/meta/preferences.yml @@ -0,0 +1,2 @@ +--- +tox_parallel: yes diff --git a/roles/bootstrap/molecule/default/playbook.yml b/roles/robertdebock.bootstrap/molecule/default/converge.yml similarity index 68% rename from roles/bootstrap/molecule/default/playbook.yml rename to roles/robertdebock.bootstrap/molecule/default/converge.yml index f74ea59..3cd3d54 100644 --- a/roles/bootstrap/molecule/default/playbook.yml +++ b/roles/robertdebock.bootstrap/molecule/default/converge.yml @@ -5,4 +5,4 @@ gather_facts: no roles: - - ansible-role-bootstrap + - role: ansible-role-bootstrap diff --git a/roles/bootstrap/molecule/default/molecule.yml b/roles/robertdebock.bootstrap/molecule/default/molecule.yml similarity index 78% rename from roles/bootstrap/molecule/default/molecule.yml rename to roles/robertdebock.bootstrap/molecule/default/molecule.yml index fe7eb98..142890e 100644 --- a/roles/bootstrap/molecule/default/molecule.yml +++ b/roles/robertdebock.bootstrap/molecule/default/molecule.yml @@ -6,8 +6,9 @@ dependency: name: galaxy options: role-file: requirements.yml -lint: - name: yamllint +lint: | + set -e + yamllint . driver: name: docker platforms: @@ -20,10 +21,9 @@ platforms: pre_build_image: yes provisioner: name: ansible + config_options: + defaults: + stdout_callback: yaml + bin_ansible_callbacks: yes verifier: name: ansible - lint: - name: ansible-lint - enabled: no -scenario: - name: default diff --git a/roles/bootstrap/molecule/default/verify.yml b/roles/robertdebock.bootstrap/molecule/default/verify.yml similarity index 82% rename from roles/bootstrap/molecule/default/verify.yml rename to roles/robertdebock.bootstrap/molecule/default/verify.yml index e7ef038..3bb4ea3 100644 --- a/roles/bootstrap/molecule/default/verify.yml +++ b/roles/robertdebock.bootstrap/molecule/default/verify.yml @@ -2,7 +2,7 @@ - name: Verify hosts: all become: no - gather_facts: yes + gather_facts: no tasks: - name: test connection diff --git a/roles/robertdebock.bootstrap/tasks/assert.yml b/roles/robertdebock.bootstrap/tasks/assert.yml new file mode 100644 index 0000000..a8ababe --- /dev/null +++ b/roles/robertdebock.bootstrap/tasks/assert.yml @@ -0,0 +1,28 @@ +--- +- name: test if bootstrap_user is set correctly + assert: + that: + - bootstrap_user is defined + - bootstrap_user | length > 0 + quiet: yes + +- name: test if bootstrap_wait_for_host is set correctly + assert: + that: + - bootstrap_wait_for_host is defined + - bootstrap_wait_for_host | type_debug == "bool" + quiet: yes + +- name: test if bootstrap_timeout is set correctly + assert: + that: + - bootstrap_timeout is defined + - bootstrap_timeout | int >= 0 + quiet: yes + +- name: test if bootstrap_retries is set correctly + assert: + that: + - bootstrap_retries is defined + - bootstrap_retries | int >= 0 + quiet: yes diff --git a/roles/bootstrap/tasks/gather_facts.yml b/roles/robertdebock.bootstrap/tasks/gather_facts.yml similarity index 88% rename from roles/bootstrap/tasks/gather_facts.yml rename to roles/robertdebock.bootstrap/tasks/gather_facts.yml index c2f35c7..3985d5b 100644 --- a/roles/bootstrap/tasks/gather_facts.yml +++ b/roles/robertdebock.bootstrap/tasks/gather_facts.yml @@ -1,13 +1,14 @@ --- -- name: Lookup bootstrap facts +- name: lookup bootstrap facts become: no raw: "cat /etc/os-release" + check_mode: no register: bootstrap_facts changed_when: no vars: ansible_user: "{{ bootstrap_user }}" -- name: Set bootstrap facts (I) +- name: set bootstrap facts (I) set_fact: bootstrap_distribution: "{{ item }}" bootstrap_distribution_major_version: "{{ bootstrap_facts.stdout_lines | join(',') | regex_replace( @@ -18,7 +19,7 @@ - bootstrap_distribution is not defined - bootstrap_facts.stdout is regex('PRETTY_NAME=.'~ bootstrap_search[item] | default(item) ~'.*') -- name: Set bootstrap facts (II) +- name: set bootstrap facts (II) set_fact: bootstrap_os_family: "{{ item.key }}" loop: "{{ bootstrap_os_family_map | dict2items }}" diff --git a/roles/bootstrap/tasks/main.yml b/roles/robertdebock.bootstrap/tasks/main.yml similarity index 72% rename from roles/bootstrap/tasks/main.yml rename to roles/robertdebock.bootstrap/tasks/main.yml index 8408a16..b1a165e 100644 --- a/roles/bootstrap/tasks/main.yml +++ b/roles/robertdebock.bootstrap/tasks/main.yml @@ -1,6 +1,9 @@ --- # tasks file for bootstrap -- name: Wait for host +- name: include assert.yml + include_tasks: assert.yml + +- name: wait for host wait_for: port: "{{ ansible_port | default('22') }}" host: "{{ (ansible_ssh_host | default(ansible_host) | default(inventory_hostname)) }}" @@ -9,48 +12,44 @@ when: - ansible_connection is defined - ansible_connection != "docker" + - ansible_connection != "container" - bootstrap_wait_for_host | bool -- name: Prepare system +- name: prepare system block: - - name: Test connection + - name: test connection wait_for_connection: timeout: "{{ bootstrap_timeout }}" register: bootstrap_connect changed_when: no rescue: - - name: Gather bootstrap facts + - name: gather bootstrap facts include_tasks: "gather_facts.yml" - - name: Install bootstrap packages + - name: install bootstrap packages raw: "{{ bootstrap_install.raw }}" register: bootstrap_install_packages changed_when: (bootstrap_install.stdout_regex in bootstrap_install_packages.stdout and bootstrap_os_family in ['Alpine', 'Archlinux', 'Gentoo']) or ( bootstrap_install.stdout_regex not in bootstrap_install_packages.stdout and bootstrap_os_family in ['Debian', 'RedHat', 'Suse']) - until: bootstrap_install_packages is succeeded - retries: "{{ bootstrap_retries }}" vars: ansible_user: "{{ bootstrap_user }}" always: - - name: Set bootstrap ansible_user + - name: set bootstrap ansible_user set_fact: bootstrap_ansible_user: "{{ ansible_user | default(omit) if bootstrap_connect is succeeded else bootstrap_user }}" changed_when: no -- name: Ensure system is prepared +- name: ensure system is prepared block: - - name: Gather ansible facts + - name: gather ansible facts setup: - - name: Install bootstrap packages + - name: install bootstrap packages package: name: "{{ item }}" state: present loop: "{{ bootstrap_facts_packages.split() }}" - register: bootstrap_install_facts_packages - until: bootstrap_install_facts_packages is succeeded - retries: "{{ bootstrap_retries }}" vars: ansible_user: "{{ bootstrap_ansible_user | default(omit) }}" diff --git a/roles/robertdebock.bootstrap/tox.ini b/roles/robertdebock.bootstrap/tox.ini new file mode 100644 index 0000000..c1bc1d4 --- /dev/null +++ b/roles/robertdebock.bootstrap/tox.ini @@ -0,0 +1,26 @@ +# +# Ansible managed +# +[tox] +minversion = 3.7 +# Disabled "next" because of: +# https://github.com/ansible-community/molecule/issues/2626. +# envlist = py{38}-ansible-{previous,current,next} +envlist = py{38}-ansible-{previous,current} +skipsdist = true + +[testenv] +deps = + previous: ansible>=2.8, <2.9 + current: ansible>=2.9 + next: git+https://github.com/ansible/ansible.git@devel + molecule[lint]>=3, <4 + docker>=4.2, <4.3 +commands = molecule test +setenv = + TOX_ENVNAME={envname} + MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} + PY_COLORS=1 + ANSIBLE_FORCE_COLOR=1 + +passenv = namespace image tag diff --git a/roles/bootstrap/vars/main.yml b/roles/robertdebock.bootstrap/vars/main.yml similarity index 99% rename from roles/bootstrap/vars/main.yml rename to roles/robertdebock.bootstrap/vars/main.yml index 874becf..1636f76 100644 --- a/roles/bootstrap/vars/main.yml +++ b/roles/robertdebock.bootstrap/vars/main.yml @@ -1,5 +1,6 @@ --- # vars file for bootstrap + _bootstrap_packages: Alpine: python3 sudo Archlinux: python sudo diff --git a/roles/robertdebock.buildtools/.ansible-lint b/roles/robertdebock.buildtools/.ansible-lint new file mode 100644 index 0000000..eba57d1 --- /dev/null +++ b/roles/robertdebock.buildtools/.ansible-lint @@ -0,0 +1,8 @@ +# +# Ansible managed +# +exclude_paths: + - ./meta/exception.yml + - ./meta/preferences.yml + - ./molecule/default/verify.yml + - ./.tox diff --git a/roles/robertdebock.buildtools/.github/FUNDING.yml b/roles/robertdebock.buildtools/.github/FUNDING.yml new file mode 100644 index 0000000..67320f0 --- /dev/null +++ b/roles/robertdebock.buildtools/.github/FUNDING.yml @@ -0,0 +1,2 @@ +--- +github: robertdebock diff --git a/roles/robertdebock.buildtools/.github/ISSUE_TEMPLATE/bug_report.md b/roles/robertdebock.buildtools/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..f39b5dc --- /dev/null +++ b/roles/robertdebock.buildtools/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a report to help me improve + +--- + +## Describe the bug +A clear and concise description of what the bug is. + +## Playbook + +Please paste the playbook you are using. (Consider `requirements.yml` and +optionally the command you've invoked.) + + +```yaml +--- +YOUR PLAYBOOK HERE +``` + +## Output + +Show at least the error, possible related output, maybe just all the output. + +## Environment + +- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) +- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) +- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.buildtools/.github/ISSUE_TEMPLATE/feature_request.md b/roles/robertdebock.buildtools/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..55a93c4 --- /dev/null +++ b/roles/robertdebock.buildtools/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +## Proposed feature + +A clear and concise description of what you want to happen. + +## Rationale + +Why is this feature required? + +## Additional context + +Add any other context about the feature request here. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/buildtools/PULL_REQUEST_TEMPLATE.md b/roles/robertdebock.buildtools/.github/pull_request_template.md similarity index 100% rename from roles/buildtools/PULL_REQUEST_TEMPLATE.md rename to roles/robertdebock.buildtools/.github/pull_request_template.md diff --git a/roles/buildtools/.github/settings.yml b/roles/robertdebock.buildtools/.github/settings.yml similarity index 100% rename from roles/buildtools/.github/settings.yml rename to roles/robertdebock.buildtools/.github/settings.yml diff --git a/roles/robertdebock.buildtools/.github/workflows/galaxy.yml b/roles/robertdebock.buildtools/.github/workflows/galaxy.yml new file mode 100644 index 0000000..7ff6f4b --- /dev/null +++ b/roles/robertdebock.buildtools/.github/workflows/galaxy.yml @@ -0,0 +1,22 @@ +--- +# +# Ansible managed +# + +name: Release to Ansible Galaxy + +on: + push: + tags: + - '*' + schedule: + - cron: '2 2 2 * *' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: galaxy + uses: robertdebock/galaxy-action@1.0.1 + with: + galaxy_api_key: ${{ secrets.galaxy_api_key }} diff --git a/roles/robertdebock.buildtools/.github/workflows/molecule.yml b/roles/robertdebock.buildtools/.github/workflows/molecule.yml new file mode 100644 index 0000000..98b4d68 --- /dev/null +++ b/roles/robertdebock.buildtools/.github/workflows/molecule.yml @@ -0,0 +1,78 @@ +--- +# +# Ansible managed +# + +name: Ansible Molecule + +on: + push: + tags_ignore: + - '*' + pull_request: + schedule: + - cron: '2 2 2 * *' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + command: lint + test: + needs: + - lint + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + config: + - image: "alpine" + tag: "latest" + - image: "alpine" + tag: "edge" + - image: "amazonlinux" + tag: "1" + - image: "centos" + tag: "7" + - image: "centos" + tag: "latest" + - image: "debian" + tag: "latest" + - image: "debian" + tag: "bullseye" + - image: "fedora" + tag: "31" + - image: "fedora" + tag: "latest" + - image: "opensuse" + tag: "latest" + - image: "ubuntu" + tag: "latest" + - image: "ubuntu" + tag: "bionic" + - image: "ubuntu" + tag: "xenial" + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: disable apparmor for mysql + run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + - name: parse apparmor for mysql + run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + image: ${{ matrix.config.image }} + tag: ${{ matrix.config.tag }} + options: "--parallel all" + env: + TOX_PARALLEL_NO_SPINNER: 1 diff --git a/roles/buildtools/.gitignore b/roles/robertdebock.buildtools/.gitignore similarity index 100% rename from roles/buildtools/.gitignore rename to roles/robertdebock.buildtools/.gitignore diff --git a/roles/robertdebock.buildtools/.travis.yml b/roles/robertdebock.buildtools/.travis.yml new file mode 100644 index 0000000..8be381a --- /dev/null +++ b/roles/robertdebock.buildtools/.travis.yml @@ -0,0 +1,50 @@ +--- +# +# Ansible managed +# +language: python + +os: linux +dist: xenial + +python: + - "3.8" + +services: + - docker + +env: + global: + namespace="robertdebock" + jobs: + - image="alpine" tag="latest" + - image="alpine" tag="edge" + - image="amazonlinux" tag="1" + - image="centos" tag="7" + - image="centos" tag="latest" + - image="debian" tag="latest" + - image="debian" tag="bullseye" + - image="fedora" tag="31" + - image="fedora" tag="latest" + - image="opensuse" tag="latest" + - image="ubuntu" tag="latest" + - image="ubuntu" tag="bionic" + - image="ubuntu" tag="xenial" + +cache: + - pip + +install: + - pip install --upgrade pip + - pip install tox + +script: + - function retry { counter=0 ; until "$@" ; do exit=$? ; counter=$(($counter + 1)) ; if [ $counter -ge 3 ] ; then return $exit ; fi ; done ; return 0; } ; retry tox --parallel all + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ + slack: + secure: "p8PSvlX2yGAqG49VMv//0YiHJOIwS22hGqXdfwKU0iu0yF82+ZmtaQqxzk2v5YTw4J7X5kl4qXsplZ7fpl2MI76DTL9hQbV4CHzSdhMpccZnwTeAzVy6YJBKHFiGaMQ+ty6IzUe3k4/XGidXxWencmuXgVZm4BA4MKhaq7UoRpGamgzaZm6n1j9RIHBQZa7Todvm5QbsXYzq9I+tt2lHjYYiOZsxAcUcB+E6hTHA7ONF9X7JjtRjCjy5sfE/MFgBIkL0xNDiGMSyOfqprJS9jV6Sg3jpYis4cYupaqzKGzyZc2ESmbziSmLxRgJ2CvwH8DL67V8hJ7HrMLMFVl++dH3LMTPGZExXywMJ3nc50AefvKAtOGs8mP3H6HXMy7QlBVFOi6X6Isz2AZpCw/RK2noQBSzwSCy3zdSwvrTPEFUTRU6W0vWJR784/kfSaD5lPoOvj5R9yKvkmKM28ti6EtJ5NVnbdIXK+oHS7L4RCeLq0POt1yGJK+FtiQLz0JYutIoXthkrrK6w9i50G2tNnLqMTz4igm+OOr5ibDt8ULbW2BBRQFhb+dKGwTGjTuy+whwmwhnAvMc1EI5txaPA8oJjgj+azYiSKNu6pPtkDDkiP4ALcn7R81cXq5kIxrZQPi59WR2ThIi6wQQSokQRXKATIBPxHQ5Y6Y4ZOkXZQC4=" + on_success: change + template: "%{result}: %{repository_slug}@%{branch}, build <%{build_url}|#%{build_number}> (<%{compare_url}|%{commit}>)" + email: false diff --git a/roles/robertdebock.buildtools/.yamllint b/roles/robertdebock.buildtools/.yamllint new file mode 100644 index 0000000..894450c --- /dev/null +++ b/roles/robertdebock.buildtools/.yamllint @@ -0,0 +1,15 @@ +--- +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + line-length: disable + truthy: disable + +ignore: | + .tox/ diff --git a/roles/buildtools/CODE_OF_CONDUCT.md b/roles/robertdebock.buildtools/CODE_OF_CONDUCT.md similarity index 100% rename from roles/buildtools/CODE_OF_CONDUCT.md rename to roles/robertdebock.buildtools/CODE_OF_CONDUCT.md diff --git a/roles/robertdebock.buildtools/CONTRIBUTING.md b/roles/robertdebock.buildtools/CONTRIBUTING.md new file mode 100644 index 0000000..92b44a7 --- /dev/null +++ b/roles/robertdebock.buildtools/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# [Please contribute](#please-contribute) + +You can really make a difference by: + +- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) +- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. + +I'll try to help and take every contribution seriously. + +It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. + +## [Step by step](#step-by-step) + +Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. + +### [1. Make an issue.](#1-make-an-issue) + +When you spot an issue, [create an issue](https://github.com/robertdebock/ansible-role-buildtools/issues). + +Making the issue help me and others to find similar problems in the future. + +### [2. Fork the project.](#2-fork-the-project) + +On the top right side of [the repository on GitHub](https://github.com/robertdebock/ansible-role-buildtools), click `fork`. This copies everything to your GitHub namespace. + +### [3. Make the changes](#3-make-the-changes) + +In you own GitHub namespace, make the required changes. + +I typically do that by cloning the repository (in your namespace) locally: + +``` +git clone git@github.com:YOURNAMESPACE/ansible-role-buildtools.git +``` + +Now you can start to edit on your laptop. + +### [4. Optionally: test your changes](#4-optionally-test-your-changes) + +Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): + +``` +pip install molecule tox ansible-lint docker +``` + +And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: + +``` +image=centos tag=7 molecule test +``` + +Once it start to work, you can test multiple version of Ansible: + +``` +image=centos tag=7 tox +``` + +### [5. Optionally: Regenerate all dynamic content](#5-optionally-regenerate-all-dynamic-content) + +You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. + +If you don't do it, I'll do it later for you. + +### [6. Make a pull request](#6-make-a-pull-request) + +[GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. + +In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. + +### [7. Wait](#7-wait) + +Now I'll get a message that you've added some code. Thank you, really. + +CI starts to test your changes. You can follow the progress on Travis. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.buildtools/LICENSE b/roles/robertdebock.buildtools/LICENSE new file mode 100644 index 0000000..bd15893 --- /dev/null +++ b/roles/robertdebock.buildtools/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Robert de Bock (robert@meinit.nl) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/roles/buildtools/README.md b/roles/robertdebock.buildtools/README.md similarity index 67% rename from roles/buildtools/README.md rename to roles/robertdebock.buildtools/README.md index b2b09ce..248e1ca 100644 --- a/roles/buildtools/README.md +++ b/roles/robertdebock.buildtools/README.md @@ -1,15 +1,14 @@ -buildtools -========= - -Ansible logo - Build status +# [buildtools](#buildtools) Install buildtools on your system. -Example Playbook ----------------- +|Travis|GitHub|Quality|Downloads|Version| +|------|------|-------|---------|-------| +|[![travis](https://travis-ci.com/robertdebock/ansible-role-buildtools.svg?branch=master)](https://travis-ci.com/robertdebock/ansible-role-buildtools)|[![github](https://github.com/robertdebock/ansible-role-buildtools/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-buildtools/actions)|[![quality](https://img.shields.io/ansible/quality/22111)](https://galaxy.ansible.com/robertdebock/buildtools)|[![downloads](https://img.shields.io/ansible/role/d/22111)](https://galaxy.ansible.com/robertdebock/buildtools)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-buildtools.svg)](https://github.com/robertdebock/ansible-role-buildtools/releases/)| -This example is taken from `molecule/resources/playbook.yml` and is tested on each push, pull request and release. +## [Example Playbook](#example-playbook) + +This example is taken from `molecule/resources/converge.yml` and is tested on each push, pull request and release. ```yaml --- - name: Converge @@ -18,10 +17,10 @@ This example is taken from `molecule/resources/playbook.yml` and is tested on ea gather_facts: yes roles: - - robertdebock.buildtools + - role: robertdebock.buildtools ``` -The machine you are running this on, may need to be prepared, I use this playbook to ensure everything is in place to let the role work. +The machine may need to be prepared using `molecule/resources/prepare.yml`: ```yaml --- - name: Prepare @@ -30,10 +29,10 @@ The machine you are running this on, may need to be prepared, I use this playboo become: yes roles: - - robertdebock.bootstrap + - role: robertdebock.bootstrap ``` -After running this role, this playbook runs to verify that everything works, this may be a good example how you can use this role. +For verification `molecule/resources/verify.yml` runs after the role has been applied. ```yaml --- - name: Verify @@ -66,21 +65,11 @@ After running this role, this playbook runs to verify that everything works, thi - buildtools_find_libelf.matched >= 0 msg: could not find libelf.so.1 in /usr ``` -``` Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles. -Role Variables --------------- -These variables are set in `defaults/main.yml`: -```yaml ---- -# defaults file for buildtools -``` - -Requirements ------------- +## [Requirements](#requirements) - Access to a repository containing packages, likely on the internet. - A recent version of Ansible. (Tests run on the current, previous and next release of Ansible.) @@ -93,30 +82,26 @@ The following roles can be installed to ensure all requirements are met, using ` ``` -Context -------- +## [Context](#context) This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information. Here is an overview of related roles: ![dependencies](https://raw.githubusercontent.com/robertdebock/drawings/artifacts/buildtools.png "Dependency") +## [Compatibility](#compatibility) -Compatibility -------------- - -This role has been tested on these [container images](https://hub.docker.com/): +This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): |container|tags| |---------|----| -|amazon|all| |alpine|all| -|archlinux|all| -|debian|all| +|amazon|2018.03| |el|7, 8| -|fedora|all| +|debian|buster, bullseye| +|fedora|31, 32| |opensuse|all| -|ubuntu|artful, bionic| +|ubuntu|focal, bionic, xenial| The minimum version of Ansible required is 2.8 but tests have been done to: @@ -124,8 +109,7 @@ The minimum version of Ansible required is 2.8 but tests have been done to: - The current version. - The development version. -Exceptions ----------- +## [Exceptions](#exceptions) Some variarations of the build matrix do not work. These are the variations and reasons why the build won't work: @@ -134,10 +118,9 @@ Some variarations of the build matrix do not work. These are the variations and | EL | No package matching 'bison' found available, installed or updated | -Testing -------- +## [Testing](#testing) -[Unit tests](https://travis-ci.org/robertdebock/ansible-role-buildtools) are done on every commit, pull request, release and periodically. +[Unit tests](https://travis-ci.com/robertdebock/ansible-role-buildtools) are done on every commit, pull request, release and periodically. If you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-buildtools/issues) @@ -169,13 +152,13 @@ image="centos" tox image="debian" tag="stable" tox ``` -License -------- +## [License](#license) Apache-2.0 -Author Information ------------------- +## [Author Information](#author-information) [Robert de Bock](https://robertdebock.nl/) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/buildtools/SECURITY.md b/roles/robertdebock.buildtools/SECURITY.md similarity index 76% rename from roles/buildtools/SECURITY.md rename to roles/robertdebock.buildtools/SECURITY.md index d4e3aa9..c065117 100644 --- a/roles/buildtools/SECURITY.md +++ b/roles/robertdebock.buildtools/SECURITY.md @@ -1,8 +1,8 @@ -# Security Policy +# [Security Policy](#security-policy) This software implements other software, it's not very likely that this software introduces new vulnerabilities. -## Supported Versions +## [Supported Versions](#supported-versions) The current major version is supported. For example if the current version is 3.4.1: @@ -14,10 +14,12 @@ The current major version is supported. For example if the current version is 3. | 2.0.0 | :x: | | 1.0.0 | :x: | -## Reporting a Vulnerability +## [Reporting a Vulnerability](#reporting-a-vulnarability) Please [open an issue](https://github.com/robertdebock/ansible-role-buildtools/issues) describing the vulnerability. Tell them where to go, how often they can expect to get an update on a reported vulnerability, what to expect if the vulnerability is accepted or declined, etc. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.buildtools/meta/.galaxy_install_info b/roles/robertdebock.buildtools/meta/.galaxy_install_info new file mode 100644 index 0000000..89542e7 --- /dev/null +++ b/roles/robertdebock.buildtools/meta/.galaxy_install_info @@ -0,0 +1,2 @@ +install_date: Mon Sep 28 09:36:38 2020 +version: 2.4.15 diff --git a/roles/buildtools/meta/exception.yml b/roles/robertdebock.buildtools/meta/exception.yml similarity index 100% rename from roles/buildtools/meta/exception.yml rename to roles/robertdebock.buildtools/meta/exception.yml diff --git a/roles/buildtools/meta/main.yml b/roles/robertdebock.buildtools/meta/main.yml similarity index 84% rename from roles/buildtools/meta/main.yml rename to roles/robertdebock.buildtools/meta/main.yml index 665023a..7a44347 100644 --- a/roles/buildtools/meta/main.yml +++ b/roles/robertdebock.buildtools/meta/main.yml @@ -8,32 +8,32 @@ galaxy_info: min_ansible_version: 2.8 platforms: - - name: Amazon - versions: - - all - name: Alpine versions: - all - - name: ArchLinux + - name: Amazon versions: - - all - - name: Debian - versions: - - all + - 2018.03 - name: EL versions: - 7 - 8 + - name: Debian + versions: + - buster + - bullseye - name: Fedora versions: - - all + - 31 + - 32 - name: OpenSUSE versions: - all - name: Ubuntu versions: - - artful + - focal - bionic + - xenial galaxy_tags: - centos diff --git a/roles/robertdebock.buildtools/meta/preferences.yml b/roles/robertdebock.buildtools/meta/preferences.yml new file mode 100644 index 0000000..e7fdebf --- /dev/null +++ b/roles/robertdebock.buildtools/meta/preferences.yml @@ -0,0 +1,2 @@ +--- +tox_parallel: yes diff --git a/roles/robertdebock.buildtools/molecule/default/converge.yml b/roles/robertdebock.buildtools/molecule/default/converge.yml new file mode 100644 index 0000000..88675b2 --- /dev/null +++ b/roles/robertdebock.buildtools/molecule/default/converge.yml @@ -0,0 +1,8 @@ +--- +- name: Converge + hosts: all + become: yes + gather_facts: yes + + roles: + - role: ansible-role-buildtools diff --git a/roles/buildtools/molecule/default/molecule.yml b/roles/robertdebock.buildtools/molecule/default/molecule.yml similarity index 78% rename from roles/buildtools/molecule/default/molecule.yml rename to roles/robertdebock.buildtools/molecule/default/molecule.yml index ebe4a40..ca80f6c 100644 --- a/roles/buildtools/molecule/default/molecule.yml +++ b/roles/robertdebock.buildtools/molecule/default/molecule.yml @@ -6,8 +6,9 @@ dependency: name: galaxy options: role-file: requirements.yml -lint: - name: yamllint +lint: | + set -e + yamllint . driver: name: docker platforms: @@ -20,10 +21,9 @@ platforms: pre_build_image: yes provisioner: name: ansible + config_options: + defaults: + stdout_callback: yaml + bin_ansible_callbacks: yes verifier: name: ansible - lint: - name: ansible-lint - enabled: no -scenario: - name: default diff --git a/roles/reboot/molecule/default/prepare.yml b/roles/robertdebock.buildtools/molecule/default/prepare.yml similarity index 68% rename from roles/reboot/molecule/default/prepare.yml rename to roles/robertdebock.buildtools/molecule/default/prepare.yml index 1cda60c..feb7d81 100644 --- a/roles/reboot/molecule/default/prepare.yml +++ b/roles/robertdebock.buildtools/molecule/default/prepare.yml @@ -5,4 +5,4 @@ become: yes roles: - - robertdebock.bootstrap + - role: robertdebock.bootstrap diff --git a/roles/buildtools/molecule/default/verify.yml b/roles/robertdebock.buildtools/molecule/default/verify.yml similarity index 100% rename from roles/buildtools/molecule/default/verify.yml rename to roles/robertdebock.buildtools/molecule/default/verify.yml diff --git a/roles/buildtools/requirements.yml b/roles/robertdebock.buildtools/requirements.yml similarity index 100% rename from roles/buildtools/requirements.yml rename to roles/robertdebock.buildtools/requirements.yml diff --git a/roles/buildtools/tasks/main.yml b/roles/robertdebock.buildtools/tasks/main.yml similarity index 54% rename from roles/buildtools/tasks/main.yml rename to roles/robertdebock.buildtools/tasks/main.yml index bd6115c..52b2715 100644 --- a/roles/buildtools/tasks/main.yml +++ b/roles/robertdebock.buildtools/tasks/main.yml @@ -4,6 +4,3 @@ package: name: "{{ buildtools_packages }}" state: present - register: buildtools_install_buildtools - until: buildtools_install_buildtools is succeeded - retries: 3 diff --git a/roles/robertdebock.buildtools/tox.ini b/roles/robertdebock.buildtools/tox.ini new file mode 100644 index 0000000..c1bc1d4 --- /dev/null +++ b/roles/robertdebock.buildtools/tox.ini @@ -0,0 +1,26 @@ +# +# Ansible managed +# +[tox] +minversion = 3.7 +# Disabled "next" because of: +# https://github.com/ansible-community/molecule/issues/2626. +# envlist = py{38}-ansible-{previous,current,next} +envlist = py{38}-ansible-{previous,current} +skipsdist = true + +[testenv] +deps = + previous: ansible>=2.8, <2.9 + current: ansible>=2.9 + next: git+https://github.com/ansible/ansible.git@devel + molecule[lint]>=3, <4 + docker>=4.2, <4.3 +commands = molecule test +setenv = + TOX_ENVNAME={envname} + MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} + PY_COLORS=1 + ANSIBLE_FORCE_COLOR=1 + +passenv = namespace image tag diff --git a/roles/buildtools/vars/main.yml b/roles/robertdebock.buildtools/vars/main.yml similarity index 78% rename from roles/buildtools/vars/main.yml rename to roles/robertdebock.buildtools/vars/main.yml index 3f9961e..192b0ef 100644 --- a/roles/buildtools/vars/main.yml +++ b/roles/robertdebock.buildtools/vars/main.yml @@ -1,5 +1,6 @@ --- # vars file for buildroot + _buildtools_packages: default: - build-essential @@ -11,9 +12,14 @@ _buildtools_packages: - openssl-dev - perl-utils - python3-dev - Archlinux: - - base-devel - - libelf + Amazon: + - bison + - elfutils-libelf-devel + - gcc + - make + - perl-Digest-SHA + - python2-devel + - libffi-devel Debian: - bison - build-essential @@ -21,11 +27,15 @@ _buildtools_packages: CentOS-7: - "@Development Tools" - elfutils-libelf-devel + - libffi-devel + - openssl-devel - perl-Digest-SHA - python-devel CentOS: - "@Development Tools" - elfutils-libelf-devel + - libffi-devel + - openssl-devel - perl-Digest-SHA - python3-devel RedHat: @@ -34,6 +44,8 @@ _buildtools_packages: - gcc - make - perl-Digest-SHA + - python3-devel + - libffi-devel Suse: - bison - gcc diff --git a/roles/robertdebock.common/.ansible-lint b/roles/robertdebock.common/.ansible-lint new file mode 100644 index 0000000..eba57d1 --- /dev/null +++ b/roles/robertdebock.common/.ansible-lint @@ -0,0 +1,8 @@ +# +# Ansible managed +# +exclude_paths: + - ./meta/exception.yml + - ./meta/preferences.yml + - ./molecule/default/verify.yml + - ./.tox diff --git a/roles/robertdebock.common/.github/FUNDING.yml b/roles/robertdebock.common/.github/FUNDING.yml new file mode 100644 index 0000000..67320f0 --- /dev/null +++ b/roles/robertdebock.common/.github/FUNDING.yml @@ -0,0 +1,2 @@ +--- +github: robertdebock diff --git a/roles/robertdebock.common/.github/ISSUE_TEMPLATE/bug_report.md b/roles/robertdebock.common/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..f39b5dc --- /dev/null +++ b/roles/robertdebock.common/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a report to help me improve + +--- + +## Describe the bug +A clear and concise description of what the bug is. + +## Playbook + +Please paste the playbook you are using. (Consider `requirements.yml` and +optionally the command you've invoked.) + + +```yaml +--- +YOUR PLAYBOOK HERE +``` + +## Output + +Show at least the error, possible related output, maybe just all the output. + +## Environment + +- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) +- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) +- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.common/.github/ISSUE_TEMPLATE/feature_request.md b/roles/robertdebock.common/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..55a93c4 --- /dev/null +++ b/roles/robertdebock.common/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +## Proposed feature + +A clear and concise description of what you want to happen. + +## Rationale + +Why is this feature required? + +## Additional context + +Add any other context about the feature request here. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/common/PULL_REQUEST_TEMPLATE.md b/roles/robertdebock.common/.github/pull_request_template.md similarity index 100% rename from roles/common/PULL_REQUEST_TEMPLATE.md rename to roles/robertdebock.common/.github/pull_request_template.md diff --git a/roles/common/.github/settings.yml b/roles/robertdebock.common/.github/settings.yml similarity index 100% rename from roles/common/.github/settings.yml rename to roles/robertdebock.common/.github/settings.yml diff --git a/roles/robertdebock.common/.github/workflows/galaxy.yml b/roles/robertdebock.common/.github/workflows/galaxy.yml new file mode 100644 index 0000000..85aaa46 --- /dev/null +++ b/roles/robertdebock.common/.github/workflows/galaxy.yml @@ -0,0 +1,22 @@ +--- +# +# Ansible managed +# + +name: Release to Ansible Galaxy + +on: + push: + tags: + - '*' + schedule: + - cron: '3 3 3 * *' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: galaxy + uses: robertdebock/galaxy-action@1.0.1 + with: + galaxy_api_key: ${{ secrets.galaxy_api_key }} diff --git a/roles/robertdebock.common/.github/workflows/molecule.yml b/roles/robertdebock.common/.github/workflows/molecule.yml new file mode 100644 index 0000000..949c452 --- /dev/null +++ b/roles/robertdebock.common/.github/workflows/molecule.yml @@ -0,0 +1,78 @@ +--- +# +# Ansible managed +# + +name: Ansible Molecule + +on: + push: + tags_ignore: + - '*' + pull_request: + schedule: + - cron: '3 3 3 * *' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + command: lint + test: + needs: + - lint + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + config: + - image: "alpine" + tag: "latest" + - image: "alpine" + tag: "edge" + - image: "amazonlinux" + tag: "1" + - image: "centos" + tag: "7" + - image: "centos" + tag: "latest" + - image: "debian" + tag: "latest" + - image: "debian" + tag: "bullseye" + - image: "fedora" + tag: "31" + - image: "fedora" + tag: "latest" + - image: "opensuse" + tag: "latest" + - image: "ubuntu" + tag: "latest" + - image: "ubuntu" + tag: "bionic" + - image: "ubuntu" + tag: "xenial" + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: disable apparmor for mysql + run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + - name: parse apparmor for mysql + run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + image: ${{ matrix.config.image }} + tag: ${{ matrix.config.tag }} + options: "--parallel all" + env: + TOX_PARALLEL_NO_SPINNER: 1 diff --git a/roles/common/.gitignore b/roles/robertdebock.common/.gitignore similarity index 100% rename from roles/common/.gitignore rename to roles/robertdebock.common/.gitignore diff --git a/roles/robertdebock.common/.travis.yml b/roles/robertdebock.common/.travis.yml new file mode 100644 index 0000000..54285e7 --- /dev/null +++ b/roles/robertdebock.common/.travis.yml @@ -0,0 +1,50 @@ +--- +# +# Ansible managed +# +language: python + +os: linux +dist: xenial + +python: + - "3.8" + +services: + - docker + +env: + global: + namespace="robertdebock" + jobs: + - image="alpine" tag="latest" + - image="alpine" tag="edge" + - image="amazonlinux" tag="1" + - image="centos" tag="7" + - image="centos" tag="latest" + - image="debian" tag="latest" + - image="debian" tag="bullseye" + - image="fedora" tag="31" + - image="fedora" tag="latest" + - image="opensuse" tag="latest" + - image="ubuntu" tag="latest" + - image="ubuntu" tag="bionic" + - image="ubuntu" tag="xenial" + +cache: + - pip + +install: + - pip install --upgrade pip + - pip install tox + +script: + - function retry { counter=0 ; until "$@" ; do exit=$? ; counter=$(($counter + 1)) ; if [ $counter -ge 3 ] ; then return $exit ; fi ; done ; return 0; } ; retry tox --parallel all + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ + slack: + secure: "gMfzU7MPw5PwgzC9++WDG3D7Fa1EDw6BzbHAkixE1rYHtU2aH5nlFILqzm2rBL2s7+Rcn+c6QIzQ2P2HQSGfdxtKFu/79RWtxawRM0lpM3EZ5lBzu4VDre+9xmAcp92WW7CqdiAit2VxvOBkZJEQNht7N4CbMOhTACXEU9r6BvyDTJu+cBXdo3Wm5vr0znoVdsAy96uxRH/Kg3pJKXw+dlaUrkdaKDGR2uqEGx3kYhqGu/P0DpCd5q8EPzRyaxXCA3IQl9HBMg9wnGFmRYQO3xCGLVMQ6Aw/4ab7sgWVfBYpxx7gV82xE+w2NqpzLg4lvkl9YfA0Ywlqf4ptGWTM1vHwKObqdnesFcpDOdHnonY5xS9Ql1FBVAqQI8Ff6JESEZCaHYSO8dLJ6722bBo0Ns6cYuj5aPCirg+9Fhbbxof2tSWKMGpBhkOJVFgS59giJMovlzevmNcRPvsNNOmzmLi3nm/ZMbmQ85i0uGRLob3Kos52VeMBod4iNAYnwzZnqCyM7Qsd/Z6BrlVgCiaxH9phbXUNoY1aa7D1uBDORdDyzJ5Sek6KsDiqLrIS9hJY17BF5zrAL/eFbD4T6RoM5/tf/gGHc7W0JDCNN0oEIOwvwwPrfXfn+cFcrigBcQu+spI1EdoleBD4zZJUTj7uzbcHQ4LGbuw4KoAPMO2RuOk=" + on_success: change + template: "%{result}: %{repository_slug}@%{branch}, build <%{build_url}|#%{build_number}> (<%{compare_url}|%{commit}>)" + email: false diff --git a/roles/robertdebock.common/.yamllint b/roles/robertdebock.common/.yamllint new file mode 100644 index 0000000..894450c --- /dev/null +++ b/roles/robertdebock.common/.yamllint @@ -0,0 +1,15 @@ +--- +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + line-length: disable + truthy: disable + +ignore: | + .tox/ diff --git a/roles/common/CODE_OF_CONDUCT.md b/roles/robertdebock.common/CODE_OF_CONDUCT.md similarity index 100% rename from roles/common/CODE_OF_CONDUCT.md rename to roles/robertdebock.common/CODE_OF_CONDUCT.md diff --git a/roles/robertdebock.common/CONTRIBUTING.md b/roles/robertdebock.common/CONTRIBUTING.md new file mode 100644 index 0000000..5405c00 --- /dev/null +++ b/roles/robertdebock.common/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# [Please contribute](#please-contribute) + +You can really make a difference by: + +- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) +- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. + +I'll try to help and take every contribution seriously. + +It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. + +## [Step by step](#step-by-step) + +Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. + +### [1. Make an issue.](#1-make-an-issue) + +When you spot an issue, [create an issue](https://github.com/robertdebock/ansible-role-common/issues). + +Making the issue help me and others to find similar problems in the future. + +### [2. Fork the project.](#2-fork-the-project) + +On the top right side of [the repository on GitHub](https://github.com/robertdebock/ansible-role-common), click `fork`. This copies everything to your GitHub namespace. + +### [3. Make the changes](#3-make-the-changes) + +In you own GitHub namespace, make the required changes. + +I typically do that by cloning the repository (in your namespace) locally: + +``` +git clone git@github.com:YOURNAMESPACE/ansible-role-common.git +``` + +Now you can start to edit on your laptop. + +### [4. Optionally: test your changes](#4-optionally-test-your-changes) + +Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): + +``` +pip install molecule tox ansible-lint docker +``` + +And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: + +``` +image=centos tag=7 molecule test +``` + +Once it start to work, you can test multiple version of Ansible: + +``` +image=centos tag=7 tox +``` + +### [5. Optionally: Regenerate all dynamic content](#5-optionally-regenerate-all-dynamic-content) + +You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. + +If you don't do it, I'll do it later for you. + +### [6. Make a pull request](#6-make-a-pull-request) + +[GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. + +In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. + +### [7. Wait](#7-wait) + +Now I'll get a message that you've added some code. Thank you, really. + +CI starts to test your changes. You can follow the progress on Travis. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/common/INSTALL.md b/roles/robertdebock.common/INSTALL.md similarity index 100% rename from roles/common/INSTALL.md rename to roles/robertdebock.common/INSTALL.md diff --git a/roles/robertdebock.common/LICENSE b/roles/robertdebock.common/LICENSE new file mode 100644 index 0000000..bd15893 --- /dev/null +++ b/roles/robertdebock.common/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Robert de Bock (robert@meinit.nl) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/roles/common/README.md b/roles/robertdebock.common/README.md similarity index 55% rename from roles/common/README.md rename to roles/robertdebock.common/README.md index 8fb6625..27c9e4b 100644 --- a/roles/common/README.md +++ b/roles/robertdebock.common/README.md @@ -1,15 +1,14 @@ -common -========= - -Ansible logo - Build status +# [common](#common) The purpose of this role is to configure common things on your system. -Example Playbook ----------------- +|Travis|GitHub|Quality|Downloads|Version| +|------|------|-------|---------|-------| +|[![travis](https://travis-ci.com/robertdebock/ansible-role-common.svg?branch=master)](https://travis-ci.com/robertdebock/ansible-role-common)|[![github](https://github.com/robertdebock/ansible-role-common/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-common/actions)|[![quality](https://img.shields.io/ansible/quality/29224)](https://galaxy.ansible.com/robertdebock/common)|[![downloads](https://img.shields.io/ansible/role/d/29224)](https://galaxy.ansible.com/robertdebock/common)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-common.svg)](https://github.com/robertdebock/ansible-role-common/releases/)| -This example is taken from `molecule/resources/playbook.yml` and is tested on each push, pull request and release. +## [Example Playbook](#example-playbook) + +This example is taken from `molecule/resources/converge.yml` and is tested on each push, pull request and release. ```yaml --- - name: Converge @@ -18,10 +17,10 @@ This example is taken from `molecule/resources/playbook.yml` and is tested on ea gather_facts: yes roles: - - robertdebock.common + - role: robertdebock.common ``` -The machine you are running this on, may need to be prepared, I use this playbook to ensure everything is in place to let the role work. +The machine may need to be prepared using `molecule/resources/prepare.yml`: ```yaml --- - name: Prepare @@ -30,14 +29,25 @@ The machine you are running this on, may need to be prepared, I use this playboo become: yes roles: - - robertdebock.bootstrap + - role: robertdebock.bootstrap ``` +For verification `molecule/resources/verify.yml` runs after the role has been applied. +```yaml +--- +- name: Verify + hosts: all + become: yes + gather_facts: no + + tasks: + - name: check if connection still works + ping: +``` Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles. -Role Variables --------------- +## [Role Variables](#role-variables) These variables are set in `defaults/main.yml`: ```yaml @@ -48,9 +58,9 @@ These variables are set in `defaults/main.yml`: common_hostname: "{{ inventory_hostname }}" # A list of nameservers to configure. -common_nameservers: - - 1.1.1.1 - - 1.0.0.1 +# common_nameservers: +# - 1.1.1.1 +# - 1.0.0.1 # Fill /etc/hosts with all hosts in the play. common_hosts: "{{ groups.all }}" @@ -59,8 +69,7 @@ common_hosts: "{{ groups.all }}" common_reboot: yes ``` -Requirements ------------- +## [Requirements](#requirements) - Access to a repository containing packages, likely on the internet. - A recent version of Ansible. (Tests run on the current, previous and next release of Ansible.) @@ -70,61 +79,48 @@ The following roles can be installed to ensure all requirements are met, using ` ```yaml --- - robertdebock.bootstrap -- robertdebock.reboot ``` -Context -------- +## [Context](#context) This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information. Here is an overview of related roles: ![dependencies](https://raw.githubusercontent.com/robertdebock/drawings/artifacts/common.png "Dependency") +## [Compatibility](#compatibility) -Compatibility -------------- +This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): -This role has been tested on these [container images](https://hub.docker.com/): +|container|tags| +|---------|----| +|alpine|all| +|amazon|2018.03| +|el|7, 8| +|debian|buster, bullseye| +|fedora|31, 32| +|opensuse|all| +|ubuntu|focal, bionic, xenial| -|container|tag|allow_failures| -|---------|---|--------------| -|amazonlinux|1|no| -|amazonlinux|latest|no| -|alpine|latest|no| -|alpine|edge|yes| -|debian|unstable|yes| -|debian|latest|no| -|centos|7|no| -|redhat|7|no| -|centos|latest|no| -|redhat|latest|no| -|fedora|latest|no| -|fedora|rawhide|yes| -|opensuse|latest|no| -|ubuntu|latest|no| +The minimum version of Ansible required is 2.8 but tests have been done to: -This role has been tested on these Ansible versions: +- The previous version, on version lower. +- The current version. +- The development version. -- ansible>=2.8, <2.9 -- ansible>=2.9 -- git+https://github.com/ansible/ansible.git@devel - -Exceptions ----------- +## [Exceptions](#exceptions) Some variarations of the build matrix do not work. These are the variations and reasons why the build won't work: | variation | reason | |---------------------------|------------------------| -| Archlinux & Ansible 2.7 | New-style module did not handle its own exit | +| amazonlinux | set hostname: [Errno 2] No such file or directory: '/etc/sysconfig/network' | -Testing -------- +## [Testing](#testing) -[Unit tests](https://travis-ci.org/robertdebock/ansible-role-common) are done on every commit, pull request, release and periodically. +[Unit tests](https://travis-ci.com/robertdebock/ansible-role-common) are done on every commit, pull request, release and periodically. If you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-common/issues) @@ -156,31 +152,18 @@ image="centos" tox image="debian" tag="stable" tox ``` -Modules -------- - -This role uses the following modules: -```yaml ---- -- hostname -- include_role -- ini_file -- lineinfile -- meta -- package -- service -- setup -- stat -- template -``` - -License -------- +## [License](#license) Apache-2.0 +## [Contributors](#contributors) -Author Information ------------------- +I'd like to thank everybody that made contributions to this repository. It motivates me, improves the code and is just fun to collaborate. + +- [dmrub](https://github.com/dmrub) + +## [Author Information](#author-information) [Robert de Bock](https://robertdebock.nl/) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/common/SECURITY.md b/roles/robertdebock.common/SECURITY.md similarity index 76% rename from roles/common/SECURITY.md rename to roles/robertdebock.common/SECURITY.md index 0741b0b..5176402 100644 --- a/roles/common/SECURITY.md +++ b/roles/robertdebock.common/SECURITY.md @@ -1,8 +1,8 @@ -# Security Policy +# [Security Policy](#security-policy) This software implements other software, it's not very likely that this software introduces new vulnerabilities. -## Supported Versions +## [Supported Versions](#supported-versions) The current major version is supported. For example if the current version is 3.4.1: @@ -14,10 +14,12 @@ The current major version is supported. For example if the current version is 3. | 2.0.0 | :x: | | 1.0.0 | :x: | -## Reporting a Vulnerability +## [Reporting a Vulnerability](#reporting-a-vulnarability) Please [open an issue](https://github.com/robertdebock/ansible-role-common/issues) describing the vulnerability. Tell them where to go, how often they can expect to get an update on a reported vulnerability, what to expect if the vulnerability is accepted or declined, etc. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/common/defaults/main.yml b/roles/robertdebock.common/defaults/main.yml similarity index 85% rename from roles/common/defaults/main.yml rename to roles/robertdebock.common/defaults/main.yml index 8ddd57d..7df9a70 100644 --- a/roles/common/defaults/main.yml +++ b/roles/robertdebock.common/defaults/main.yml @@ -5,9 +5,9 @@ common_hostname: "{{ inventory_hostname }}" # A list of nameservers to configure. -common_nameservers: - - 1.1.1.1 - - 1.0.0.1 +# common_nameservers: +# - 1.1.1.1 +# - 1.0.0.1 # Fill /etc/hosts with all hosts in the play. common_hosts: "{{ groups.all }}" diff --git a/roles/common/handlers/main.yml b/roles/robertdebock.common/handlers/main.yml similarity index 72% rename from roles/common/handlers/main.yml rename to roles/robertdebock.common/handlers/main.yml index 57e99f7..f7751e2 100644 --- a/roles/common/handlers/main.yml +++ b/roles/robertdebock.common/handlers/main.yml @@ -8,3 +8,8 @@ service: name: NetworkManager state: reloaded + +- name: reboot + reboot: + when: + - common_reboot | bool diff --git a/roles/robertdebock.common/meta/.galaxy_install_info b/roles/robertdebock.common/meta/.galaxy_install_info new file mode 100644 index 0000000..a15c927 --- /dev/null +++ b/roles/robertdebock.common/meta/.galaxy_install_info @@ -0,0 +1,2 @@ +install_date: Mon Sep 28 09:36:41 2020 +version: 3.3.4 diff --git a/roles/robertdebock.common/meta/exception.yml b/roles/robertdebock.common/meta/exception.yml new file mode 100644 index 0000000..1c78591 --- /dev/null +++ b/roles/robertdebock.common/meta/exception.yml @@ -0,0 +1,4 @@ +--- +exceptions: + - variation: amazonlinux + reason: "set hostname: [Errno 2] No such file or directory: '/etc/sysconfig/network'" diff --git a/roles/common/meta/main.yml b/roles/robertdebock.common/meta/main.yml similarity index 80% rename from roles/common/meta/main.yml rename to roles/robertdebock.common/meta/main.yml index 70c3410..defac81 100644 --- a/roles/common/meta/main.yml +++ b/roles/robertdebock.common/meta/main.yml @@ -8,32 +8,32 @@ galaxy_info: min_ansible_version: 2.8 platforms: - - name: Amazon - versions: - - all - name: Alpine versions: - all - - name: ArchLinux + - name: Amazon versions: - - all - - name: Debian - versions: - - all + - 2018.03 - name: EL versions: - 7 - 8 + - name: Debian + versions: + - buster + - bullseye - name: Fedora versions: - - all + - 31 + - 32 - name: OpenSUSE versions: - all - name: Ubuntu versions: - - artful + - focal - bionic + - xenial galaxy_tags: - common @@ -42,5 +42,4 @@ galaxy_info: - server - system -dependencies: - - robertdebock.reboot +dependencies: [] diff --git a/roles/robertdebock.common/meta/preferences.yml b/roles/robertdebock.common/meta/preferences.yml new file mode 100644 index 0000000..e7fdebf --- /dev/null +++ b/roles/robertdebock.common/meta/preferences.yml @@ -0,0 +1,2 @@ +--- +tox_parallel: yes diff --git a/roles/ansible_lint/molecule/default/playbook.yml b/roles/robertdebock.common/molecule/default/converge.yml similarity index 70% rename from roles/ansible_lint/molecule/default/playbook.yml rename to roles/robertdebock.common/molecule/default/converge.yml index 11079b0..b309e96 100644 --- a/roles/ansible_lint/molecule/default/playbook.yml +++ b/roles/robertdebock.common/molecule/default/converge.yml @@ -5,4 +5,4 @@ gather_facts: yes roles: - - ansible-role-ansible_lint + - role: ansible-role-common diff --git a/roles/common/molecule/default/molecule.yml b/roles/robertdebock.common/molecule/default/molecule.yml similarity index 73% rename from roles/common/molecule/default/molecule.yml rename to roles/robertdebock.common/molecule/default/molecule.yml index 4d303b7..e506938 100644 --- a/roles/common/molecule/default/molecule.yml +++ b/roles/robertdebock.common/molecule/default/molecule.yml @@ -6,8 +6,9 @@ dependency: name: galaxy options: role-file: requirements.yml -lint: - name: yamllint +lint: | + set -e + yamllint . driver: name: docker platforms: @@ -20,5 +21,9 @@ platforms: pre_build_image: yes provisioner: name: ansible -scenario: - name: default + config_options: + defaults: + stdout_callback: yaml + bin_ansible_callbacks: yes +verifier: + name: ansible diff --git a/roles/buildtools/molecule/default/prepare.yml b/roles/robertdebock.common/molecule/default/prepare.yml similarity index 68% rename from roles/buildtools/molecule/default/prepare.yml rename to roles/robertdebock.common/molecule/default/prepare.yml index 1cda60c..feb7d81 100644 --- a/roles/buildtools/molecule/default/prepare.yml +++ b/roles/robertdebock.common/molecule/default/prepare.yml @@ -5,4 +5,4 @@ become: yes roles: - - robertdebock.bootstrap + - role: robertdebock.bootstrap diff --git a/roles/robertdebock.common/molecule/default/verify.yml b/roles/robertdebock.common/molecule/default/verify.yml new file mode 100644 index 0000000..b9dc6f8 --- /dev/null +++ b/roles/robertdebock.common/molecule/default/verify.yml @@ -0,0 +1,9 @@ +--- +- name: Verify + hosts: all + become: yes + gather_facts: no + + tasks: + - name: check if connection still works + ping: diff --git a/roles/epel/requirements.yml b/roles/robertdebock.common/requirements.yml similarity index 100% rename from roles/epel/requirements.yml rename to roles/robertdebock.common/requirements.yml diff --git a/roles/robertdebock.common/tasks/assert.yml b/roles/robertdebock.common/tasks/assert.yml new file mode 100644 index 0000000..5d29aa1 --- /dev/null +++ b/roles/robertdebock.common/tasks/assert.yml @@ -0,0 +1,31 @@ +--- +- name: test if common_hostname is set correctly + assert: + that: + - common_hostname is defined + - common_hostname | length > 0 + quiet: yes + +- name: test if common_nameservers is set correctly + assert: + that: + - common_nameservers | length >= 0 + - common_nameservers is iterable + quiet: yes + when: + - common_nameservers is defined + +- name: test if common_hosts is set correctly + assert: + that: + - common_hosts is defined + - common_hosts | length > 0 + - common_hosts is iterable + quiet: yes + +- name: test if common_reboot is set correctly + assert: + that: + - common_reboot is defined + - common_reboot | type_debug == "bool" + quiet: yes diff --git a/roles/robertdebock.common/tasks/main.yml b/roles/robertdebock.common/tasks/main.yml new file mode 100644 index 0000000..f16c478 --- /dev/null +++ b/roles/robertdebock.common/tasks/main.yml @@ -0,0 +1,76 @@ +--- +# tasks file for common +- name: include assert.yml + include_tasks: assert.yml + +- name: install requirements + package: + name: "{{ common_requirements }}" + state: present + +- name: check for network manager + stat: + path: /etc/NetworkManager/NetworkManager.conf + register: common_check_for_network_manager + +- name: set nameserver in resolv.conf + block: + - name: set nameserver in resolv.conf + lineinfile: + path: /etc/resolv.conf + line: "nameserver {{ item }}" + mode: "0644" + loop: "{{ common_nameservers }}" + notify: + - gather facts + when: + - common_nameservers is defined + - not common_check_for_network_manager.stat.exists + - ansible_connection != "docker" + rescue: + - name: comfort users + debug: + msg: + - "The file /etc/resolve.conf could not be modified." + - "This is likely because it is mapped from the Docker host to the Docker container." + +- name: set nameservers in network manager + ini_file: + path: /etc/NetworkManager/conf.d/dnsservers.conf + section: global-dns-domain-* + option: servers + value: "{{ common_nameservers | join(',') }}" + mode: "0644" + when: + - common_check_for_network_manager.stat.exists + - common_nameservers is defined + notify: + - reload network manager + - gather facts + +- name: flush handlers + meta: flush_handlers + +- name: set hostname + hostname: + name: "{{ common_hostname }}" + when: + - ansible_connection != "docker" + notify: + - reboot + +- name: fill /etc/hosts + block: + - name: fill /etc/hosts + template: + src: hosts.j2 + dest: /etc/hosts + mode: "0644" + when: + - ansible_connection != "docker" + rescue: + - name: comfort users + debug: + msg: + - "The file /etc/hosts could not be modified." + - "This is likely because it is mapped from the Docker host to the Docker container." diff --git a/roles/common/templates/.gitkeep b/roles/robertdebock.common/templates/.gitkeep similarity index 100% rename from roles/common/templates/.gitkeep rename to roles/robertdebock.common/templates/.gitkeep diff --git a/roles/common/templates/hosts.j2 b/roles/robertdebock.common/templates/hosts.j2 similarity index 85% rename from roles/common/templates/hosts.j2 rename to roles/robertdebock.common/templates/hosts.j2 index ca80233..6505dfa 100644 --- a/roles/common/templates/hosts.j2 +++ b/roles/robertdebock.common/templates/hosts.j2 @@ -3,6 +3,8 @@ ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 {% for host in common_hosts | sort %} {% if host != "localhost" %} +{% if hostvars[host]['ansible_default_ipv4'] is defined %} {{ hostvars[host]['ansible_default_ipv4']['address'] }} {{ hostvars[host]['ansible_hostname'] }} {{ hostvars[host]['ansible_fqdn'] }} {% endif %} +{% endif %} {% endfor %} diff --git a/roles/robertdebock.common/tox.ini b/roles/robertdebock.common/tox.ini new file mode 100644 index 0000000..c1bc1d4 --- /dev/null +++ b/roles/robertdebock.common/tox.ini @@ -0,0 +1,26 @@ +# +# Ansible managed +# +[tox] +minversion = 3.7 +# Disabled "next" because of: +# https://github.com/ansible-community/molecule/issues/2626. +# envlist = py{38}-ansible-{previous,current,next} +envlist = py{38}-ansible-{previous,current} +skipsdist = true + +[testenv] +deps = + previous: ansible>=2.8, <2.9 + current: ansible>=2.9 + next: git+https://github.com/ansible/ansible.git@devel + molecule[lint]>=3, <4 + docker>=4.2, <4.3 +commands = molecule test +setenv = + TOX_ENVNAME={envname} + MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} + PY_COLORS=1 + ANSIBLE_FORCE_COLOR=1 + +passenv = namespace image tag diff --git a/roles/common/vars/main.yml b/roles/robertdebock.common/vars/main.yml similarity index 92% rename from roles/common/vars/main.yml rename to roles/robertdebock.common/vars/main.yml index 3323bfd..411c4c5 100644 --- a/roles/common/vars/main.yml +++ b/roles/robertdebock.common/vars/main.yml @@ -1,5 +1,6 @@ --- # vars file for common + _common_requirements: default: - hostname @@ -7,8 +8,6 @@ _common_requirements: - net-tools Alpine: - net-tools - Archlinux: - - net-tools CentOS: - dbus diff --git a/roles/robertdebock.docker/.ansible-lint b/roles/robertdebock.docker/.ansible-lint new file mode 100644 index 0000000..eba57d1 --- /dev/null +++ b/roles/robertdebock.docker/.ansible-lint @@ -0,0 +1,8 @@ +# +# Ansible managed +# +exclude_paths: + - ./meta/exception.yml + - ./meta/preferences.yml + - ./molecule/default/verify.yml + - ./.tox diff --git a/roles/robertdebock.docker/.github/FUNDING.yml b/roles/robertdebock.docker/.github/FUNDING.yml new file mode 100644 index 0000000..67320f0 --- /dev/null +++ b/roles/robertdebock.docker/.github/FUNDING.yml @@ -0,0 +1,2 @@ +--- +github: robertdebock diff --git a/roles/robertdebock.docker/.github/ISSUE_TEMPLATE/bug_report.md b/roles/robertdebock.docker/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..f39b5dc --- /dev/null +++ b/roles/robertdebock.docker/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a report to help me improve + +--- + +## Describe the bug +A clear and concise description of what the bug is. + +## Playbook + +Please paste the playbook you are using. (Consider `requirements.yml` and +optionally the command you've invoked.) + + +```yaml +--- +YOUR PLAYBOOK HERE +``` + +## Output + +Show at least the error, possible related output, maybe just all the output. + +## Environment + +- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) +- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) +- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.docker/.github/ISSUE_TEMPLATE/feature_request.md b/roles/robertdebock.docker/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..55a93c4 --- /dev/null +++ b/roles/robertdebock.docker/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +## Proposed feature + +A clear and concise description of what you want to happen. + +## Rationale + +Why is this feature required? + +## Additional context + +Add any other context about the feature request here. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/docker/PULL_REQUEST_TEMPLATE.md b/roles/robertdebock.docker/.github/pull_request_template.md similarity index 100% rename from roles/docker/PULL_REQUEST_TEMPLATE.md rename to roles/robertdebock.docker/.github/pull_request_template.md diff --git a/roles/docker/.github/settings.yml b/roles/robertdebock.docker/.github/settings.yml similarity index 100% rename from roles/docker/.github/settings.yml rename to roles/robertdebock.docker/.github/settings.yml diff --git a/roles/robertdebock.docker/.github/workflows/galaxy.yml b/roles/robertdebock.docker/.github/workflows/galaxy.yml new file mode 100644 index 0000000..b95a2fb --- /dev/null +++ b/roles/robertdebock.docker/.github/workflows/galaxy.yml @@ -0,0 +1,22 @@ +--- +# +# Ansible managed +# + +name: Release to Ansible Galaxy + +on: + push: + tags: + - '*' + schedule: + - cron: '4 4 4 * *' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: galaxy + uses: robertdebock/galaxy-action@1.0.1 + with: + galaxy_api_key: ${{ secrets.galaxy_api_key }} diff --git a/roles/robertdebock.docker/.github/workflows/molecule.yml b/roles/robertdebock.docker/.github/workflows/molecule.yml new file mode 100644 index 0000000..32409db --- /dev/null +++ b/roles/robertdebock.docker/.github/workflows/molecule.yml @@ -0,0 +1,76 @@ +--- +# +# Ansible managed +# + +name: Ansible Molecule + +on: + push: + tags_ignore: + - '*' + pull_request: + schedule: + - cron: '4 4 4 * *' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + command: lint + test: + needs: + - lint + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + config: + - image: "alpine" + tag: "latest" + - image: "alpine" + tag: "edge" + - image: "centos" + tag: "7" + - image: "centos" + tag: "latest" + - image: "debian" + tag: "latest" + - image: "debian" + tag: "bullseye" + - image: "fedora" + tag: "31" + - image: "fedora" + tag: "latest" + - image: "opensuse" + tag: "latest" + - image: "ubuntu" + tag: "latest" + - image: "ubuntu" + tag: "bionic" + - image: "ubuntu" + tag: "xenial" + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: disable apparmor for mysql + run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + - name: parse apparmor for mysql + run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + image: ${{ matrix.config.image }} + tag: ${{ matrix.config.tag }} + options: "--parallel all" + env: + TOX_PARALLEL_NO_SPINNER: 1 diff --git a/roles/docker/.gitignore b/roles/robertdebock.docker/.gitignore similarity index 100% rename from roles/docker/.gitignore rename to roles/robertdebock.docker/.gitignore diff --git a/roles/robertdebock.docker/.travis.yml b/roles/robertdebock.docker/.travis.yml new file mode 100644 index 0000000..17d4196 --- /dev/null +++ b/roles/robertdebock.docker/.travis.yml @@ -0,0 +1,49 @@ +--- +# +# Ansible managed +# +language: python + +os: linux +dist: xenial + +python: + - "3.8" + +services: + - docker + +env: + global: + namespace="robertdebock" + jobs: + - image="alpine" tag="latest" + - image="alpine" tag="edge" + - image="centos" tag="7" + - image="centos" tag="latest" + - image="debian" tag="latest" + - image="debian" tag="bullseye" + - image="fedora" tag="31" + - image="fedora" tag="latest" + - image="opensuse" tag="latest" + - image="ubuntu" tag="latest" + - image="ubuntu" tag="bionic" + - image="ubuntu" tag="xenial" + +cache: + - pip + +install: + - pip install --upgrade pip + - pip install tox + +script: + - function retry { counter=0 ; until "$@" ; do exit=$? ; counter=$(($counter + 1)) ; if [ $counter -ge 3 ] ; then return $exit ; fi ; done ; return 0; } ; retry tox --parallel all + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ + slack: + secure: "J0lFSDeOWC/tyF/+b/kVMS9bXzo1C/77RY+SuuGB4FDv000yobXXsvdusbmco1YChfEy8LHOEij8W6/B9Z4myMENjZnIAWVKVr4Ddg8MNtgj3a56S7ajAu12YWse020LvJGZva5dOXT/9680+P/Ybar0YfHeuRNPp5+9WMIstjF9z/6kQk3epqMzusu4tdFKRtOV+f0HrgJ0H2BnZhXyZMdxFHH8QxuJ2hr4l5vac1iebsI7O+oV/Q0ZI+5/XXJ35G+EK6EKbF3o2oW6nZjGlZESDbd+n4itDbIOzhIEfBekk0GsbLCnUlGd/fgfVF8uaq2Ho7UPzG7qlBeLkdeClpfF1kGay2e+jy/pTr+Br+BEHkGzSfJB8sR92yCCK5xzgEjPrzIwgr6bFCu74lvuGOffmNeAm/rCpdzuXpH7lehrFT6qHPpt4J8IGQxe9WaKlOA5/Vspd+iK7n7Wt54d72sN3Oq1ARcdbpDf4oLHRw/9f/t1HLiJeQf30aAMKZ/7T5U5hNjFKN7O5JoNw45hpOo06KT0pgDQxt5ZhVNchX9rwwPXFUmfsRdcIaOp92LXMrmgQa87l1aUQ+V9xKHg3/kMgmUUCxozOzmkMawSNYT3pj+fF7kqZM4OUaMFukfGjcgcUF5WREhs/KrGAHqbb5UbDefF9LDcZK/1qEiuRl4=" + on_success: change + template: "%{result}: %{repository_slug}@%{branch}, build <%{build_url}|#%{build_number}> (<%{compare_url}|%{commit}>)" + email: false diff --git a/roles/robertdebock.docker/.yamllint b/roles/robertdebock.docker/.yamllint new file mode 100644 index 0000000..894450c --- /dev/null +++ b/roles/robertdebock.docker/.yamllint @@ -0,0 +1,15 @@ +--- +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + line-length: disable + truthy: disable + +ignore: | + .tox/ diff --git a/roles/docker/CODE_OF_CONDUCT.md b/roles/robertdebock.docker/CODE_OF_CONDUCT.md similarity index 100% rename from roles/docker/CODE_OF_CONDUCT.md rename to roles/robertdebock.docker/CODE_OF_CONDUCT.md diff --git a/roles/robertdebock.docker/CONTRIBUTING.md b/roles/robertdebock.docker/CONTRIBUTING.md new file mode 100644 index 0000000..aa9b104 --- /dev/null +++ b/roles/robertdebock.docker/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# [Please contribute](#please-contribute) + +You can really make a difference by: + +- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) +- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. + +I'll try to help and take every contribution seriously. + +It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. + +## [Step by step](#step-by-step) + +Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. + +### [1. Make an issue.](#1-make-an-issue) + +When you spot an issue, [create an issue](https://github.com/robertdebock/ansible-role-docker/issues). + +Making the issue help me and others to find similar problems in the future. + +### [2. Fork the project.](#2-fork-the-project) + +On the top right side of [the repository on GitHub](https://github.com/robertdebock/ansible-role-docker), click `fork`. This copies everything to your GitHub namespace. + +### [3. Make the changes](#3-make-the-changes) + +In you own GitHub namespace, make the required changes. + +I typically do that by cloning the repository (in your namespace) locally: + +``` +git clone git@github.com:YOURNAMESPACE/ansible-role-docker.git +``` + +Now you can start to edit on your laptop. + +### [4. Optionally: test your changes](#4-optionally-test-your-changes) + +Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): + +``` +pip install molecule tox ansible-lint docker +``` + +And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: + +``` +image=centos tag=7 molecule test +``` + +Once it start to work, you can test multiple version of Ansible: + +``` +image=centos tag=7 tox +``` + +### [5. Optionally: Regenerate all dynamic content](#5-optionally-regenerate-all-dynamic-content) + +You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. + +If you don't do it, I'll do it later for you. + +### [6. Make a pull request](#6-make-a-pull-request) + +[GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. + +In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. + +### [7. Wait](#7-wait) + +Now I'll get a message that you've added some code. Thank you, really. + +CI starts to test your changes. You can follow the progress on Travis. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.docker/LICENSE b/roles/robertdebock.docker/LICENSE new file mode 100644 index 0000000..bd15893 --- /dev/null +++ b/roles/robertdebock.docker/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Robert de Bock (robert@meinit.nl) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/roles/docker/README.md b/roles/robertdebock.docker/README.md similarity index 58% rename from roles/docker/README.md rename to roles/robertdebock.docker/README.md index fb3dad1..c152f48 100644 --- a/roles/docker/README.md +++ b/roles/robertdebock.docker/README.md @@ -1,15 +1,14 @@ -docker -========= - -Ansible logo - Build status +# [docker](#docker) Install and configure Docker (non-CE) on your system. -Example Playbook ----------------- +|Travis|GitHub|Quality|Downloads|Version| +|------|------|-------|---------|-------| +|[![travis](https://travis-ci.com/robertdebock/ansible-role-docker.svg?branch=master)](https://travis-ci.com/robertdebock/ansible-role-docker)|[![github](https://github.com/robertdebock/ansible-role-docker/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-docker/actions)|[![quality](https://img.shields.io/ansible/quality/21647)](https://galaxy.ansible.com/robertdebock/docker)|[![downloads](https://img.shields.io/ansible/role/d/21647)](https://galaxy.ansible.com/robertdebock/docker)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-docker.svg)](https://github.com/robertdebock/ansible-role-docker/releases/)| -This example is taken from `molecule/resources/playbook.yml` and is tested on each push, pull request and release. +## [Example Playbook](#example-playbook) + +This example is taken from `molecule/resources/converge.yml` and is tested on each push, pull request and release. ```yaml --- - name: Converge @@ -18,7 +17,32 @@ This example is taken from `molecule/resources/playbook.yml` and is tested on ea gather_facts: yes roles: - - robertdebock.docker + - role: robertdebock.docker +``` + +The machine may need to be prepared using `molecule/resources/prepare.yml`: +```yaml +--- +- name: Prepare + hosts: all + gather_facts: no + become: yes + + roles: + - role: robertdebock.bootstrap + - role: robertdebock.core_dependencies + - role: robertdebock.buildtools + - role: robertdebock.epel + - role: robertdebock.python_pip +``` + +For verification `molecule/resources/verify.yml` runs after the role has been applied. +```yaml +--- +- name: Verify + hosts: all + become: yes + gather_facts: no tasks: - name: Create a container @@ -28,39 +52,13 @@ This example is taken from `molecule/resources/playbook.yml` and is tested on ea ports: - "2222:22" when: - - ansible_virtualization_type != "docker" + - ansible_connection != "docker" ``` -The machine you are running this on, may need to be prepared, I use this playbook to ensure everything is in place to let the role work. -```yaml ---- -- name: Prepare - hosts: all - gather_facts: no - become: yes - - roles: - - robertdebock.bootstrap - - robertdebock.core_dependencies - - robertdebock.buildtools - - robertdebock.epel - - robertdebock.python_pip -``` - - Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles. -Role Variables --------------- -These variables are set in `defaults/main.yml`: -```yaml ---- -# defaults file for docker -``` - -Requirements ------------- +## [Requirements](#requirements) - Access to a repository containing packages, likely on the internet. - A recent version of Ansible. (Tests run on the current, previous and next release of Ansible.) @@ -77,40 +75,33 @@ The following roles can be installed to ensure all requirements are met, using ` ``` -Context -------- +## [Context](#context) This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information. Here is an overview of related roles: ![dependencies](https://raw.githubusercontent.com/robertdebock/drawings/artifacts/docker.png "Dependency") +## [Compatibility](#compatibility) -Compatibility -------------- +This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): -This role has been tested on these [container images](https://hub.docker.com/): +|container|tags| +|---------|----| +|alpine|all| +|el|7, 8| +|debian|buster, bullseye| +|fedora|31, 32| +|opensuse|all| +|ubuntu|focal, bionic, xenial| -|container|tag|allow_failures| -|---------|---|--------------| -|alpine|latest|no| -|alpine|edge|yes| -|debian|unstable|yes| -|debian|latest|no| -|centos|7|no| -|centos|latest|no| -|fedora|latest|no| -|fedora|rawhide|yes| -|opensuse|latest|no| +The minimum version of Ansible required is 2.8 but tests have been done to: -This role has been tested on these Ansible versions: +- The previous version, on version lower. +- The current version. +- The development version. -- ansible>=2.8, <2.9 -- ansible>=2.9 -- git+https://github.com/ansible/ansible.git@devel - -Exceptions ----------- +## [Exceptions](#exceptions) Some variarations of the build matrix do not work. These are the variations and reasons why the build won't work: @@ -120,10 +111,9 @@ Some variarations of the build matrix do not work. These are the variations and | amazonlinux | Required dependency (python_pip) does not work on amazonlinux. | -Testing -------- +## [Testing](#testing) -[Unit tests](https://travis-ci.org/robertdebock/ansible-role-docker) are done on every commit, pull request, release and periodically. +[Unit tests](https://travis-ci.com/robertdebock/ansible-role-docker) are done on every commit, pull request, release and periodically. If you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-docker/issues) @@ -155,26 +145,13 @@ image="centos" tox image="debian" tag="stable" tox ``` -Modules -------- - -This role uses the following modules: -```yaml ---- -- file -- group -- package -- pip -- service -``` - -License -------- +## [License](#license) Apache-2.0 -Author Information ------------------- +## [Author Information](#author-information) [Robert de Bock](https://robertdebock.nl/) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/docker/SECURITY.md b/roles/robertdebock.docker/SECURITY.md similarity index 76% rename from roles/docker/SECURITY.md rename to roles/robertdebock.docker/SECURITY.md index 8aa20c5..924fa06 100644 --- a/roles/docker/SECURITY.md +++ b/roles/robertdebock.docker/SECURITY.md @@ -1,8 +1,8 @@ -# Security Policy +# [Security Policy](#security-policy) This software implements other software, it's not very likely that this software introduces new vulnerabilities. -## Supported Versions +## [Supported Versions](#supported-versions) The current major version is supported. For example if the current version is 3.4.1: @@ -14,10 +14,12 @@ The current major version is supported. For example if the current version is 3. | 2.0.0 | :x: | | 1.0.0 | :x: | -## Reporting a Vulnerability +## [Reporting a Vulnerability](#reporting-a-vulnarability) Please [open an issue](https://github.com/robertdebock/ansible-role-docker/issues) describing the vulnerability. Tell them where to go, how often they can expect to get an update on a reported vulnerability, what to expect if the vulnerability is accepted or declined, etc. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.docker/handlers/main.yml b/roles/robertdebock.docker/handlers/main.yml new file mode 100644 index 0000000..eb6b2d7 --- /dev/null +++ b/roles/robertdebock.docker/handlers/main.yml @@ -0,0 +1,7 @@ +--- +# handlers file for docker +- name: change group for docker socket + file: + path: "{{ docker_socket }}" + group: docker + mode: "0640" diff --git a/roles/robertdebock.docker/meta/.galaxy_install_info b/roles/robertdebock.docker/meta/.galaxy_install_info new file mode 100644 index 0000000..8af909d --- /dev/null +++ b/roles/robertdebock.docker/meta/.galaxy_install_info @@ -0,0 +1,2 @@ +install_date: Mon Sep 28 09:36:43 2020 +version: 2.4.3 diff --git a/roles/docker/meta/exception.yml b/roles/robertdebock.docker/meta/exception.yml similarity index 100% rename from roles/docker/meta/exception.yml rename to roles/robertdebock.docker/meta/exception.yml diff --git a/roles/docker/meta/main.yml b/roles/robertdebock.docker/meta/main.yml similarity index 79% rename from roles/docker/meta/main.yml rename to roles/robertdebock.docker/meta/main.yml index c7b2ff6..a91dc7f 100644 --- a/roles/docker/meta/main.yml +++ b/roles/robertdebock.docker/meta/main.yml @@ -11,26 +11,29 @@ galaxy_info: - name: Alpine versions: - all - - name: ArchLinux - versions: - - all - - name: Debian - versions: - - all - name: EL versions: - 7 - 8 + - name: Debian + versions: + - buster + - bullseye - name: Fedora versions: - - all + - 31 + - 32 - name: OpenSUSE versions: - all + - name: Ubuntu + versions: + - focal + - bionic + - xenial galaxy_tags: - docker - centos - - rhel dependencies: [] diff --git a/roles/robertdebock.docker/meta/preferences.yml b/roles/robertdebock.docker/meta/preferences.yml new file mode 100644 index 0000000..e7fdebf --- /dev/null +++ b/roles/robertdebock.docker/meta/preferences.yml @@ -0,0 +1,2 @@ +--- +tox_parallel: yes diff --git a/roles/atom/molecule/default/playbook.yml b/roles/robertdebock.docker/molecule/default/converge.yml similarity index 70% rename from roles/atom/molecule/default/playbook.yml rename to roles/robertdebock.docker/molecule/default/converge.yml index 409511e..bdbb251 100644 --- a/roles/atom/molecule/default/playbook.yml +++ b/roles/robertdebock.docker/molecule/default/converge.yml @@ -5,4 +5,4 @@ gather_facts: yes roles: - - ansible-role-atom + - role: ansible-role-docker diff --git a/roles/docker/molecule/default/molecule.yml b/roles/robertdebock.docker/molecule/default/molecule.yml similarity index 73% rename from roles/docker/molecule/default/molecule.yml rename to roles/robertdebock.docker/molecule/default/molecule.yml index 1fe77d6..f2e484a 100644 --- a/roles/docker/molecule/default/molecule.yml +++ b/roles/robertdebock.docker/molecule/default/molecule.yml @@ -6,8 +6,9 @@ dependency: name: galaxy options: role-file: requirements.yml -lint: - name: yamllint +lint: | + set -e + yamllint . driver: name: docker platforms: @@ -20,5 +21,9 @@ platforms: pre_build_image: yes provisioner: name: ansible -scenario: - name: default + config_options: + defaults: + stdout_callback: yaml + bin_ansible_callbacks: yes +verifier: + name: ansible diff --git a/roles/vagrant/molecule/default/prepare.yml b/roles/robertdebock.docker/molecule/default/prepare.yml similarity index 100% rename from roles/vagrant/molecule/default/prepare.yml rename to roles/robertdebock.docker/molecule/default/prepare.yml diff --git a/roles/docker/molecule/default/playbook.yml b/roles/robertdebock.docker/molecule/default/verify.yml similarity index 63% rename from roles/docker/molecule/default/playbook.yml rename to roles/robertdebock.docker/molecule/default/verify.yml index 2de9a4e..091a21e 100644 --- a/roles/docker/molecule/default/playbook.yml +++ b/roles/robertdebock.docker/molecule/default/verify.yml @@ -1,11 +1,8 @@ --- -- name: Converge +- name: Verify hosts: all become: yes - gather_facts: yes - - roles: - - ansible-role-docker + gather_facts: no tasks: - name: Create a container @@ -15,4 +12,4 @@ ports: - "2222:22" when: - - ansible_virtualization_type != "docker" + - ansible_connection != "docker" diff --git a/roles/docker/requirements.yml b/roles/robertdebock.docker/requirements.yml similarity index 100% rename from roles/docker/requirements.yml rename to roles/robertdebock.docker/requirements.yml diff --git a/roles/docker/tasks/main.yml b/roles/robertdebock.docker/tasks/main.yml similarity index 58% rename from roles/docker/tasks/main.yml rename to roles/robertdebock.docker/tasks/main.yml index 887bebd..6eeda9e 100644 --- a/roles/docker/tasks/main.yml +++ b/roles/robertdebock.docker/tasks/main.yml @@ -4,17 +4,11 @@ package: name: "{{ docker_packages }}" state: present - register: docker_install_docker - until: docker_install_docker is succeeded - retries: 3 - name: install docker pip packages pip: name: "{{ docker_pip_packages }}" state: present - register: docker_install_docker_pip_packages - until: docker_install_docker_pip_packages is succeeded - retries: 3 - name: add docker group group: @@ -27,6 +21,6 @@ state: started enabled: yes notify: - - change owner for docker socket + - change group for docker socket when: - - ansible_virtualization_type != "docker" + - ansible_connection != "docker" diff --git a/roles/robertdebock.docker/tox.ini b/roles/robertdebock.docker/tox.ini new file mode 100644 index 0000000..c1bc1d4 --- /dev/null +++ b/roles/robertdebock.docker/tox.ini @@ -0,0 +1,26 @@ +# +# Ansible managed +# +[tox] +minversion = 3.7 +# Disabled "next" because of: +# https://github.com/ansible-community/molecule/issues/2626. +# envlist = py{38}-ansible-{previous,current,next} +envlist = py{38}-ansible-{previous,current} +skipsdist = true + +[testenv] +deps = + previous: ansible>=2.8, <2.9 + current: ansible>=2.9 + next: git+https://github.com/ansible/ansible.git@devel + molecule[lint]>=3, <4 + docker>=4.2, <4.3 +commands = molecule test +setenv = + TOX_ENVNAME={envname} + MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} + PY_COLORS=1 + ANSIBLE_FORCE_COLOR=1 + +passenv = namespace image tag diff --git a/roles/docker/vars/main.yml b/roles/robertdebock.docker/vars/main.yml similarity index 75% rename from roles/docker/vars/main.yml rename to roles/robertdebock.docker/vars/main.yml index dfdd674..13429c9 100644 --- a/roles/docker/vars/main.yml +++ b/roles/robertdebock.docker/vars/main.yml @@ -1,5 +1,6 @@ --- # vars file for docker + _docker_packages: default: - docker @@ -26,3 +27,9 @@ _docker_service: RedHat-8: io.podman docker_service: "{{ _docker_service[ansible_os_family ~ '-' ~ ansible_distribution_major_version] | default(_docker_service['default']) }}" + +_docker_socket: + default: /var/run/docker.sock + RedHat-8: /var/run/podman/io.podman + +docker_socket: "{{ _docker_socket[ansible_os_family ~ '-' ~ ansible_distribution_major_version] | default(_docker_socket['default']) }}" diff --git a/roles/robertdebock.epel/.ansible-lint b/roles/robertdebock.epel/.ansible-lint new file mode 100644 index 0000000..cb2872e --- /dev/null +++ b/roles/robertdebock.epel/.ansible-lint @@ -0,0 +1,7 @@ +# +# Ansible managed +# +exclude_paths: + - ./meta/preferences.yml + - ./molecule/default/verify.yml + - ./.tox diff --git a/roles/robertdebock.epel/.github/FUNDING.yml b/roles/robertdebock.epel/.github/FUNDING.yml new file mode 100644 index 0000000..67320f0 --- /dev/null +++ b/roles/robertdebock.epel/.github/FUNDING.yml @@ -0,0 +1,2 @@ +--- +github: robertdebock diff --git a/roles/robertdebock.epel/.github/ISSUE_TEMPLATE/bug_report.md b/roles/robertdebock.epel/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..f39b5dc --- /dev/null +++ b/roles/robertdebock.epel/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a report to help me improve + +--- + +## Describe the bug +A clear and concise description of what the bug is. + +## Playbook + +Please paste the playbook you are using. (Consider `requirements.yml` and +optionally the command you've invoked.) + + +```yaml +--- +YOUR PLAYBOOK HERE +``` + +## Output + +Show at least the error, possible related output, maybe just all the output. + +## Environment + +- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) +- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) +- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.epel/.github/ISSUE_TEMPLATE/feature_request.md b/roles/robertdebock.epel/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..55a93c4 --- /dev/null +++ b/roles/robertdebock.epel/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +## Proposed feature + +A clear and concise description of what you want to happen. + +## Rationale + +Why is this feature required? + +## Additional context + +Add any other context about the feature request here. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/epel/PULL_REQUEST_TEMPLATE.md b/roles/robertdebock.epel/.github/pull_request_template.md similarity index 100% rename from roles/epel/PULL_REQUEST_TEMPLATE.md rename to roles/robertdebock.epel/.github/pull_request_template.md diff --git a/roles/epel/.github/settings.yml b/roles/robertdebock.epel/.github/settings.yml similarity index 100% rename from roles/epel/.github/settings.yml rename to roles/robertdebock.epel/.github/settings.yml diff --git a/roles/robertdebock.epel/.github/workflows/galaxy.yml b/roles/robertdebock.epel/.github/workflows/galaxy.yml new file mode 100644 index 0000000..aec2b62 --- /dev/null +++ b/roles/robertdebock.epel/.github/workflows/galaxy.yml @@ -0,0 +1,22 @@ +--- +# +# Ansible managed +# + +name: Release to Ansible Galaxy + +on: + push: + tags: + - '*' + schedule: + - cron: '5 5 5 * *' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: galaxy + uses: robertdebock/galaxy-action@1.0.1 + with: + galaxy_api_key: ${{ secrets.galaxy_api_key }} diff --git a/roles/robertdebock.epel/.github/workflows/molecule.yml b/roles/robertdebock.epel/.github/workflows/molecule.yml new file mode 100644 index 0000000..11750fd --- /dev/null +++ b/roles/robertdebock.epel/.github/workflows/molecule.yml @@ -0,0 +1,60 @@ +--- +# +# Ansible managed +# + +name: Ansible Molecule + +on: + push: + tags_ignore: + - '*' + pull_request: + schedule: + - cron: '5 5 5 * *' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + command: lint + test: + needs: + - lint + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + config: + - image: "amazonlinux" + tag: "1" + - image: "amazonlinux" + tag: "latest" + - image: "centos" + tag: "7" + - image: "centos" + tag: "latest" + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: disable apparmor for mysql + run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + - name: parse apparmor for mysql + run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + image: ${{ matrix.config.image }} + tag: ${{ matrix.config.tag }} + options: "--parallel all" + env: + TOX_PARALLEL_NO_SPINNER: 1 diff --git a/roles/epel/.gitignore b/roles/robertdebock.epel/.gitignore similarity index 100% rename from roles/epel/.gitignore rename to roles/robertdebock.epel/.gitignore diff --git a/roles/robertdebock.epel/.travis.yml b/roles/robertdebock.epel/.travis.yml new file mode 100644 index 0000000..8d56355 --- /dev/null +++ b/roles/robertdebock.epel/.travis.yml @@ -0,0 +1,41 @@ +--- +# +# Ansible managed +# +language: python + +os: linux +dist: xenial + +python: + - "3.8" + +services: + - docker + +env: + global: + namespace="robertdebock" + jobs: + - image="amazonlinux" tag="1" + - image="amazonlinux" tag="latest" + - image="centos" tag="7" + - image="centos" tag="latest" + +cache: + - pip + +install: + - pip install --upgrade pip + - pip install tox + +script: + - function retry { counter=0 ; until "$@" ; do exit=$? ; counter=$(($counter + 1)) ; if [ $counter -ge 3 ] ; then return $exit ; fi ; done ; return 0; } ; retry tox --parallel all + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ + slack: + secure: "dS+2v+ZGVgs1j2d+QgqDOYdZcQDzzgyTb+sq2SrbstMOQoiHpgrhb5KsORoSHyABI/fNXfRwfaF+DR/V4fqetyqDYzJLi2oyrUnyKRyb3uL93tTo8ng14VAqxbZmosNkwLRtfDuIcwYA0nLZiBg0gBz2Vcik0SykIWqsXOrGEhDkAgNfyTg8hIOM8nwAf0eNoJQT0XgxzvTu5ZxsuNcPcSNh0lMqTu8EM1w6ZQM25MsnLbKgzyTAMq1VXmK/L7+LSqoJUpeXw4RZ6ffHShyK9UVZa23Yv2ypAM/b+cFiF9VsymVq7dc+BIxkLpxEc++ALmmGvFcClm7P4qEMREniBfWoEihUqPBk0pv5AGR1r1JTJtqgxbCTNasI4i2q3RQUW8uT4rrR3l7X09poZbQnHzJeTlSnPgX+ItvRifYxa7RWrwFtUMBL7elPGMi6tsD4/b2m7+MZHu9Irzi5eL0D44LiIpJgN6C467DI9dqfwOJz9HYuU3m9jm9YeqxelupqVJHQQCBF2G6z5/3zKnlsijGqYrxApKlFxgPHm169X83D3Vf4zWRYHTfZuWcqRzWevL6XOd6gRTnYLnVFmzx2PehD0JSZZByJjcl1RuGqOe7JiJ7xJRJoo0wu8QfmZIs796816Ssd71hDNvowwlmc7OUSX9syu1+zlgymR9L8DrM=" + on_success: change + template: "%{result}: %{repository_slug}@%{branch}, build <%{build_url}|#%{build_number}> (<%{compare_url}|%{commit}>)" + email: false diff --git a/roles/robertdebock.epel/.yamllint b/roles/robertdebock.epel/.yamllint new file mode 100644 index 0000000..894450c --- /dev/null +++ b/roles/robertdebock.epel/.yamllint @@ -0,0 +1,15 @@ +--- +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + line-length: disable + truthy: disable + +ignore: | + .tox/ diff --git a/roles/epel/CODE_OF_CONDUCT.md b/roles/robertdebock.epel/CODE_OF_CONDUCT.md similarity index 100% rename from roles/epel/CODE_OF_CONDUCT.md rename to roles/robertdebock.epel/CODE_OF_CONDUCT.md diff --git a/roles/epel/CONTRIBUTING.md b/roles/robertdebock.epel/CONTRIBUTING.md similarity index 72% rename from roles/epel/CONTRIBUTING.md rename to roles/robertdebock.epel/CONTRIBUTING.md index cd7db35..8e97819 100644 --- a/roles/epel/CONTRIBUTING.md +++ b/roles/robertdebock.epel/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Please contribute +# [Please contribute](#please-contribute) You can really make a difference by: @@ -9,38 +9,38 @@ I'll try to help and take every contribution seriously. It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. -## Step by step +## [Step by step](#step-by-step) Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. -### 1. Make an issue. +### [1. Make an issue.](#1-make-an-issue) -When you spot an issue, [create an issue](https://github.com/robertdebock/epel/issues). +When you spot an issue, [create an issue](https://github.com/robertdebock/ansible-role-epel/issues). Making the issue help me and others to find similar problems in the future. -### 2. Fork the project. +### [2. Fork the project.](#2-fork-the-project) -On the top right side of [the repository on GitHub](https://github.com/robertdebock/epel), click `fork`. This copies everything to your GitHub namespace. +On the top right side of [the repository on GitHub](https://github.com/robertdebock/ansible-role-epel), click `fork`. This copies everything to your GitHub namespace. -### 3. Make the changes +### [3. Make the changes](#3-make-the-changes) In you own GitHub namespace, make the required changes. I typically do that by cloning the repository (in your namespace) locally: ``` -git clone git@github.com:YOURNAMESPACE/epel.git +git clone git@github.com:YOURNAMESPACE/ansible-role-epel.git ``` Now you can start to edit on your laptop. -### 4. Optionally: test your changes +### [4. Optionally: test your changes](#4-optionally-test-your-changes) Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): ``` -pip install molecule tox +pip install molecule tox ansible-lint docker ``` And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: @@ -55,20 +55,22 @@ Once it start to work, you can test multiple version of Ansible: image=centos tag=7 tox ``` -### 6. Optionally: Regenerate all dynamic content +### [5. Optionally: Regenerate all dynamic content](#5-optionally-regenerate-all-dynamic-content) You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. If you don't do it, I'll do it later for you. -### 7. Make a pull request +### [6. Make a pull request](#6-make-a-pull-request) [GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. -### 8. Wait +### [7. Wait](#7-wait) Now I'll get a message that you've added some code. Thank you, really. CI starts to test your changes. You can follow the progress on Travis. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.epel/LICENSE b/roles/robertdebock.epel/LICENSE new file mode 100644 index 0000000..bd15893 --- /dev/null +++ b/roles/robertdebock.epel/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Robert de Bock (robert@meinit.nl) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/roles/epel/README.md b/roles/robertdebock.epel/README.md similarity index 58% rename from roles/epel/README.md rename to roles/robertdebock.epel/README.md index 9fc0ea4..001c0c3 100644 --- a/roles/epel/README.md +++ b/roles/robertdebock.epel/README.md @@ -1,15 +1,14 @@ -epel -========= - -Ansible logo - Build status +# [epel](#epel) Install epel on your system. -Example Playbook ----------------- +|Travis|GitHub|Quality|Downloads|Version| +|------|------|-------|---------|-------| +|[![travis](https://travis-ci.com/robertdebock/ansible-role-epel.svg?branch=master)](https://travis-ci.com/robertdebock/ansible-role-epel)|[![github](https://github.com/robertdebock/ansible-role-epel/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-epel/actions)|[![quality](https://img.shields.io/ansible/quality/21643)](https://galaxy.ansible.com/robertdebock/epel)|[![downloads](https://img.shields.io/ansible/role/d/21643)](https://galaxy.ansible.com/robertdebock/epel)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-epel.svg)](https://github.com/robertdebock/ansible-role-epel/releases/)| -This example is taken from `molecule/resources/playbook.yml` and is tested on each push, pull request and release. +## [Example Playbook](#example-playbook) + +This example is taken from `molecule/resources/converge.yml` and is tested on each push, pull request and release. ```yaml --- - name: Converge @@ -18,10 +17,10 @@ This example is taken from `molecule/resources/playbook.yml` and is tested on ea gather_facts: yes roles: - - robertdebock.epel + - role: robertdebock.epel ``` -The machine you are running this on, may need to be prepared, I use this playbook to ensure everything is in place to let the role work. +The machine may need to be prepared using `molecule/resources/prepare.yml`: ```yaml --- - name: Prepare @@ -30,38 +29,28 @@ The machine you are running this on, may need to be prepared, I use this playboo become: yes roles: - - robertdebock.bootstrap + - role: robertdebock.bootstrap ``` -After running this role, this playbook runs to verify that everything works, this may be a good example how you can use this role. +For verification `molecule/resources/verify.yml` runs after the role has been applied. ```yaml --- - name: Verify hosts: all become: yes - gather_facts: yes + gather_facts: no tasks: - name: install a package from epel package: - name: zstd + name: aalib state: present - ``` Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles. -Role Variables --------------- -These variables are set in `defaults/main.yml`: -```yaml ---- -# defaults file for epel -``` - -Requirements ------------- +## [Requirements](#requirements) - Access to a repository containing packages, likely on the internet. - A recent version of Ansible. (Tests run on the current, previous and next release of Ansible.) @@ -74,41 +63,33 @@ The following roles can be installed to ensure all requirements are met, using ` ``` -Context -------- +## [Context](#context) This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information. Here is an overview of related roles: ![dependencies](https://raw.githubusercontent.com/robertdebock/drawings/artifacts/epel.png "Dependency") +## [Compatibility](#compatibility) -Compatibility -------------- +This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): -This role has been tested on these [container images](https://hub.docker.com/): +|container|tags| +|---------|----| +|amazon|all| +|el|7, 8| -|container|tag|allow_failures| -|---------|---|--------------| -|amazonlinux|1|no| -|amazonlinux|latest|no| -|centos|7|no| -|redhat|7|no| -|centos|latest|no| -|redhat|latest|no| +The minimum version of Ansible required is 2.8 but tests have been done to: -This role has been tested on these Ansible versions: - -- ansible>=2.8, <2.9 -- ansible>=2.9 -- git+https://github.com/ansible/ansible.git@devel +- The previous version, on version lower. +- The current version. +- The development version. -Testing -------- +## [Testing](#testing) -[Unit tests](https://travis-ci.org/robertdebock/ansible-role-epel) are done on every commit, pull request, release and periodically. +[Unit tests](https://travis-ci.com/robertdebock/ansible-role-epel) are done on every commit, pull request, release and periodically. If you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-epel/issues) @@ -140,22 +121,13 @@ image="centos" tox image="debian" tag="stable" tox ``` -Modules -------- - -This role uses the following modules: -```yaml ---- -- package -``` - -License -------- +## [License](#license) Apache-2.0 -Author Information ------------------- +## [Author Information](#author-information) [Robert de Bock](https://robertdebock.nl/) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/epel/SECURITY.md b/roles/robertdebock.epel/SECURITY.md similarity index 76% rename from roles/epel/SECURITY.md rename to roles/robertdebock.epel/SECURITY.md index 3c9b483..45375dc 100644 --- a/roles/epel/SECURITY.md +++ b/roles/robertdebock.epel/SECURITY.md @@ -1,8 +1,8 @@ -# Security Policy +# [Security Policy](#security-policy) This software implements other software, it's not very likely that this software introduces new vulnerabilities. -## Supported Versions +## [Supported Versions](#supported-versions) The current major version is supported. For example if the current version is 3.4.1: @@ -14,10 +14,12 @@ The current major version is supported. For example if the current version is 3. | 2.0.0 | :x: | | 1.0.0 | :x: | -## Reporting a Vulnerability +## [Reporting a Vulnerability](#reporting-a-vulnarability) Please [open an issue](https://github.com/robertdebock/ansible-role-epel/issues) describing the vulnerability. Tell them where to go, how often they can expect to get an update on a reported vulnerability, what to expect if the vulnerability is accepted or declined, etc. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.epel/handlers/main.yml b/roles/robertdebock.epel/handlers/main.yml new file mode 100644 index 0000000..a281a2c --- /dev/null +++ b/roles/robertdebock.epel/handlers/main.yml @@ -0,0 +1,5 @@ +--- +# handlers file for epel +- name: yum update cache + yum: + update_cache: yes diff --git a/roles/robertdebock.epel/meta/.galaxy_install_info b/roles/robertdebock.epel/meta/.galaxy_install_info new file mode 100644 index 0000000..baac4f7 --- /dev/null +++ b/roles/robertdebock.epel/meta/.galaxy_install_info @@ -0,0 +1,2 @@ +install_date: Mon Sep 28 09:36:46 2020 +version: 2.5.1 diff --git a/roles/epel/meta/main.yml b/roles/robertdebock.epel/meta/main.yml similarity index 100% rename from roles/epel/meta/main.yml rename to roles/robertdebock.epel/meta/main.yml diff --git a/roles/robertdebock.epel/meta/preferences.yml b/roles/robertdebock.epel/meta/preferences.yml new file mode 100644 index 0000000..e7fdebf --- /dev/null +++ b/roles/robertdebock.epel/meta/preferences.yml @@ -0,0 +1,2 @@ +--- +tox_parallel: yes diff --git a/roles/ansible/molecule/default/playbook.yml b/roles/robertdebock.epel/molecule/default/converge.yml similarity index 72% rename from roles/ansible/molecule/default/playbook.yml rename to roles/robertdebock.epel/molecule/default/converge.yml index 7b4245a..edaa8ef 100644 --- a/roles/ansible/molecule/default/playbook.yml +++ b/roles/robertdebock.epel/molecule/default/converge.yml @@ -5,4 +5,4 @@ gather_facts: yes roles: - - ansible-role-ansible + - role: ansible-role-epel diff --git a/roles/epel/molecule/default/molecule.yml b/roles/robertdebock.epel/molecule/default/molecule.yml similarity index 78% rename from roles/epel/molecule/default/molecule.yml rename to roles/robertdebock.epel/molecule/default/molecule.yml index 368b999..e7532a7 100644 --- a/roles/epel/molecule/default/molecule.yml +++ b/roles/robertdebock.epel/molecule/default/molecule.yml @@ -6,8 +6,9 @@ dependency: name: galaxy options: role-file: requirements.yml -lint: - name: yamllint +lint: | + set -e + yamllint . driver: name: docker platforms: @@ -20,10 +21,9 @@ platforms: pre_build_image: yes provisioner: name: ansible + config_options: + defaults: + stdout_callback: yaml + bin_ansible_callbacks: yes verifier: name: ansible - lint: - name: ansible-lint - enabled: no -scenario: - name: default diff --git a/roles/common/molecule/default/prepare.yml b/roles/robertdebock.epel/molecule/default/prepare.yml similarity index 68% rename from roles/common/molecule/default/prepare.yml rename to roles/robertdebock.epel/molecule/default/prepare.yml index 1cda60c..feb7d81 100644 --- a/roles/common/molecule/default/prepare.yml +++ b/roles/robertdebock.epel/molecule/default/prepare.yml @@ -5,4 +5,4 @@ become: yes roles: - - robertdebock.bootstrap + - role: robertdebock.bootstrap diff --git a/roles/epel/molecule/default/verify.yml b/roles/robertdebock.epel/molecule/default/verify.yml similarity index 77% rename from roles/epel/molecule/default/verify.yml rename to roles/robertdebock.epel/molecule/default/verify.yml index a959086..8a418ca 100644 --- a/roles/epel/molecule/default/verify.yml +++ b/roles/robertdebock.epel/molecule/default/verify.yml @@ -2,10 +2,10 @@ - name: Verify hosts: all become: yes - gather_facts: yes + gather_facts: no tasks: - name: install a package from epel package: - name: zstd + name: aalib state: present diff --git a/roles/git/requirements.yml b/roles/robertdebock.epel/requirements.yml similarity index 100% rename from roles/git/requirements.yml rename to roles/robertdebock.epel/requirements.yml diff --git a/roles/robertdebock.epel/tasks/main.yml b/roles/robertdebock.epel/tasks/main.yml new file mode 100644 index 0000000..b2f595d --- /dev/null +++ b/roles/robertdebock.epel/tasks/main.yml @@ -0,0 +1,17 @@ +--- +# tasks file for epel +- name: install epel gpg key + rpm_key: + key: "{{ epel_gpg_key }}" + state: present + when: + - ansible_distribution in [ "Amazon", "CentOS", "RedHat" ] + +- name: install epel-release + package: + name: "{{ epel_url }}" + state: present + notify: + - yum update cache + when: + - ansible_distribution in [ "Amazon", "CentOS", "RedHat" ] diff --git a/roles/robertdebock.epel/tox.ini b/roles/robertdebock.epel/tox.ini new file mode 100644 index 0000000..c1bc1d4 --- /dev/null +++ b/roles/robertdebock.epel/tox.ini @@ -0,0 +1,26 @@ +# +# Ansible managed +# +[tox] +minversion = 3.7 +# Disabled "next" because of: +# https://github.com/ansible-community/molecule/issues/2626. +# envlist = py{38}-ansible-{previous,current,next} +envlist = py{38}-ansible-{previous,current} +skipsdist = true + +[testenv] +deps = + previous: ansible>=2.8, <2.9 + current: ansible>=2.9 + next: git+https://github.com/ansible/ansible.git@devel + molecule[lint]>=3, <4 + docker>=4.2, <4.3 +commands = molecule test +setenv = + TOX_ENVNAME={envname} + MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} + PY_COLORS=1 + ANSIBLE_FORCE_COLOR=1 + +passenv = namespace image tag diff --git a/roles/epel/vars/main.yml b/roles/robertdebock.epel/vars/main.yml similarity index 79% rename from roles/epel/vars/main.yml rename to roles/robertdebock.epel/vars/main.yml index 31f59c9..1b61542 100644 --- a/roles/epel/vars/main.yml +++ b/roles/robertdebock.epel/vars/main.yml @@ -1,5 +1,6 @@ --- # vars file for epel + _epel_version: default: "{{ ansible_distribution_major_version }}" Amazon-2018: 6 @@ -8,3 +9,5 @@ _epel_version: epel_version: "{{ _epel_version[ansible_distribution ~ '-' ~ ansible_distribution_major_version] | default(_epel_version['default']) }}" epel_url: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ epel_version }}.noarch.rpm" + +epel_gpg_key: "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ epel_version }}" diff --git a/roles/robertdebock.fail2ban/.ansible-lint b/roles/robertdebock.fail2ban/.ansible-lint new file mode 100644 index 0000000..eba57d1 --- /dev/null +++ b/roles/robertdebock.fail2ban/.ansible-lint @@ -0,0 +1,8 @@ +# +# Ansible managed +# +exclude_paths: + - ./meta/exception.yml + - ./meta/preferences.yml + - ./molecule/default/verify.yml + - ./.tox diff --git a/roles/robertdebock.fail2ban/.github/FUNDING.yml b/roles/robertdebock.fail2ban/.github/FUNDING.yml new file mode 100644 index 0000000..67320f0 --- /dev/null +++ b/roles/robertdebock.fail2ban/.github/FUNDING.yml @@ -0,0 +1,2 @@ +--- +github: robertdebock diff --git a/roles/robertdebock.fail2ban/.github/ISSUE_TEMPLATE/bug_report.md b/roles/robertdebock.fail2ban/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..f39b5dc --- /dev/null +++ b/roles/robertdebock.fail2ban/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a report to help me improve + +--- + +## Describe the bug +A clear and concise description of what the bug is. + +## Playbook + +Please paste the playbook you are using. (Consider `requirements.yml` and +optionally the command you've invoked.) + + +```yaml +--- +YOUR PLAYBOOK HERE +``` + +## Output + +Show at least the error, possible related output, maybe just all the output. + +## Environment + +- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) +- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) +- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.fail2ban/.github/ISSUE_TEMPLATE/feature_request.md b/roles/robertdebock.fail2ban/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..55a93c4 --- /dev/null +++ b/roles/robertdebock.fail2ban/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +## Proposed feature + +A clear and concise description of what you want to happen. + +## Rationale + +Why is this feature required? + +## Additional context + +Add any other context about the feature request here. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/fail2ban/PULL_REQUEST_TEMPLATE.md b/roles/robertdebock.fail2ban/.github/pull_request_template.md similarity index 100% rename from roles/fail2ban/PULL_REQUEST_TEMPLATE.md rename to roles/robertdebock.fail2ban/.github/pull_request_template.md diff --git a/roles/fail2ban/.github/settings.yml b/roles/robertdebock.fail2ban/.github/settings.yml similarity index 100% rename from roles/fail2ban/.github/settings.yml rename to roles/robertdebock.fail2ban/.github/settings.yml diff --git a/roles/robertdebock.fail2ban/.github/workflows/galaxy.yml b/roles/robertdebock.fail2ban/.github/workflows/galaxy.yml new file mode 100644 index 0000000..b8478b7 --- /dev/null +++ b/roles/robertdebock.fail2ban/.github/workflows/galaxy.yml @@ -0,0 +1,22 @@ +--- +# +# Ansible managed +# + +name: Release to Ansible Galaxy + +on: + push: + tags: + - '*' + schedule: + - cron: '6 6 6 * *' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: galaxy + uses: robertdebock/galaxy-action@1.0.1 + with: + galaxy_api_key: ${{ secrets.galaxy_api_key }} diff --git a/roles/robertdebock.fail2ban/.github/workflows/molecule.yml b/roles/robertdebock.fail2ban/.github/workflows/molecule.yml new file mode 100644 index 0000000..ad2ebef --- /dev/null +++ b/roles/robertdebock.fail2ban/.github/workflows/molecule.yml @@ -0,0 +1,74 @@ +--- +# +# Ansible managed +# + +name: Ansible Molecule + +on: + push: + tags_ignore: + - '*' + pull_request: + schedule: + - cron: '6 6 6 * *' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + command: lint + test: + needs: + - lint + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + config: + - image: "amazonlinux" + tag: "1" + - image: "centos" + tag: "7" + - image: "centos" + tag: "latest" + - image: "debian" + tag: "latest" + - image: "debian" + tag: "bullseye" + - image: "fedora" + tag: "31" + - image: "fedora" + tag: "latest" + - image: "opensuse" + tag: "latest" + - image: "ubuntu" + tag: "latest" + - image: "ubuntu" + tag: "bionic" + - image: "ubuntu" + tag: "xenial" + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: disable apparmor for mysql + run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + - name: parse apparmor for mysql + run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + image: ${{ matrix.config.image }} + tag: ${{ matrix.config.tag }} + options: "--parallel all" + env: + TOX_PARALLEL_NO_SPINNER: 1 diff --git a/roles/fail2ban/.gitignore b/roles/robertdebock.fail2ban/.gitignore similarity index 100% rename from roles/fail2ban/.gitignore rename to roles/robertdebock.fail2ban/.gitignore diff --git a/roles/robertdebock.fail2ban/.travis.yml b/roles/robertdebock.fail2ban/.travis.yml new file mode 100644 index 0000000..1f902f9 --- /dev/null +++ b/roles/robertdebock.fail2ban/.travis.yml @@ -0,0 +1,48 @@ +--- +# +# Ansible managed +# +language: python + +os: linux +dist: xenial + +python: + - "3.8" + +services: + - docker + +env: + global: + namespace="robertdebock" + jobs: + - image="amazonlinux" tag="1" + - image="centos" tag="7" + - image="centos" tag="latest" + - image="debian" tag="latest" + - image="debian" tag="bullseye" + - image="fedora" tag="31" + - image="fedora" tag="latest" + - image="opensuse" tag="latest" + - image="ubuntu" tag="latest" + - image="ubuntu" tag="bionic" + - image="ubuntu" tag="xenial" + +cache: + - pip + +install: + - pip install --upgrade pip + - pip install tox + +script: + - function retry { counter=0 ; until "$@" ; do exit=$? ; counter=$(($counter + 1)) ; if [ $counter -ge 3 ] ; then return $exit ; fi ; done ; return 0; } ; retry tox --parallel all + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ + slack: + secure: "q9mLGSHcv5k7eG5IrRMAkC9OtcFb4/dsHdbXAnpcdV4KFfDdI49YULLu6RromXYeZsabESnWb73r1mo+qu+83Ky25UpHyY9OBl1IR6txSIzqMX/P+cA69pIh9TE3zmTXiEv6PFJhDM6Jrv47UOkktVWZwDISdn9P7cFxE7PM1GK4OD5Zn8ioCYI2d7jEUQZ9c/d564z+nJQVV8YDOh55Zw0tM/yK6ZiiHna0xv+HPUJsMhx0B1RZnggoDbcq27TcHb3Bys8+Sw0gQyHLJEnOIrPXNw8tNhUwTq9oJEPqxgXcEoaOTEJzH0Aw4mEw1FXwdKkxzeKNSQHruHpTqLO0QMyHvgHyTfEtWIufQd94dCtp6qLNpM56Ew61sIyWPQWlEy98B6FzYqz5IBlorrK+9BRygk47Gp2OZSBKZCYLbWdhp7kVT5e2D4HfJQV9r5U2rCm4I0geKaFfljUv5RrUI5HV1PiWMpCer++LiP9lD7S/GGPQ5Dkc+A5nEZ5Dd/T/E+dzOWznQuTVhWMs2Mx8a2iDv6XsXkeXPQrrYu0KY+KFCnAGSWRIOh3Ok0iOAd0OUEsrR5JhMiH8btBIXZ+jin3VE6sDkQPk+meXy+CsbS48ksPSPStJpenU2eKLbhQ0lUVvr12pR41f9+ZVia/4AVqSJTrljDMzt61BkyEzye8=" + on_success: change + template: "%{result}: %{repository_slug}@%{branch}, build <%{build_url}|#%{build_number}> (<%{compare_url}|%{commit}>)" + email: false diff --git a/roles/robertdebock.fail2ban/.yamllint b/roles/robertdebock.fail2ban/.yamllint new file mode 100644 index 0000000..894450c --- /dev/null +++ b/roles/robertdebock.fail2ban/.yamllint @@ -0,0 +1,15 @@ +--- +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + line-length: disable + truthy: disable + +ignore: | + .tox/ diff --git a/roles/fail2ban/CODE_OF_CONDUCT.md b/roles/robertdebock.fail2ban/CODE_OF_CONDUCT.md similarity index 100% rename from roles/fail2ban/CODE_OF_CONDUCT.md rename to roles/robertdebock.fail2ban/CODE_OF_CONDUCT.md diff --git a/roles/robertdebock.fail2ban/CONTRIBUTING.md b/roles/robertdebock.fail2ban/CONTRIBUTING.md new file mode 100644 index 0000000..7b82f8b --- /dev/null +++ b/roles/robertdebock.fail2ban/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# [Please contribute](#please-contribute) + +You can really make a difference by: + +- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) +- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. + +I'll try to help and take every contribution seriously. + +It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. + +## [Step by step](#step-by-step) + +Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. + +### [1. Make an issue.](#1-make-an-issue) + +When you spot an issue, [create an issue](https://github.com/robertdebock/ansible-role-fail2ban/issues). + +Making the issue help me and others to find similar problems in the future. + +### [2. Fork the project.](#2-fork-the-project) + +On the top right side of [the repository on GitHub](https://github.com/robertdebock/ansible-role-fail2ban), click `fork`. This copies everything to your GitHub namespace. + +### [3. Make the changes](#3-make-the-changes) + +In you own GitHub namespace, make the required changes. + +I typically do that by cloning the repository (in your namespace) locally: + +``` +git clone git@github.com:YOURNAMESPACE/ansible-role-fail2ban.git +``` + +Now you can start to edit on your laptop. + +### [4. Optionally: test your changes](#4-optionally-test-your-changes) + +Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): + +``` +pip install molecule tox ansible-lint docker +``` + +And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: + +``` +image=centos tag=7 molecule test +``` + +Once it start to work, you can test multiple version of Ansible: + +``` +image=centos tag=7 tox +``` + +### [5. Optionally: Regenerate all dynamic content](#5-optionally-regenerate-all-dynamic-content) + +You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. + +If you don't do it, I'll do it later for you. + +### [6. Make a pull request](#6-make-a-pull-request) + +[GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. + +In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. + +### [7. Wait](#7-wait) + +Now I'll get a message that you've added some code. Thank you, really. + +CI starts to test your changes. You can follow the progress on Travis. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.fail2ban/LICENSE b/roles/robertdebock.fail2ban/LICENSE new file mode 100644 index 0000000..bd15893 --- /dev/null +++ b/roles/robertdebock.fail2ban/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Robert de Bock (robert@meinit.nl) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/roles/fail2ban/README.md b/roles/robertdebock.fail2ban/README.md similarity index 55% rename from roles/fail2ban/README.md rename to roles/robertdebock.fail2ban/README.md index dbd5cf8..3d2b606 100644 --- a/roles/fail2ban/README.md +++ b/roles/robertdebock.fail2ban/README.md @@ -1,15 +1,14 @@ -fail2ban -========= - -Ansible logo - Build status +# [fail2ban](#fail2ban) Install and configure fail2ban on your system. -Example Playbook ----------------- +|Travis|GitHub|Quality|Downloads|Version| +|------|------|-------|---------|-------| +|[![travis](https://travis-ci.com/robertdebock/ansible-role-fail2ban.svg?branch=master)](https://travis-ci.com/robertdebock/ansible-role-fail2ban)|[![github](https://github.com/robertdebock/ansible-role-fail2ban/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-fail2ban/actions)|[![quality](https://img.shields.io/ansible/quality/22987)](https://galaxy.ansible.com/robertdebock/fail2ban)|[![downloads](https://img.shields.io/ansible/role/d/22987)](https://galaxy.ansible.com/robertdebock/fail2ban)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-fail2ban.svg)](https://github.com/robertdebock/ansible-role-fail2ban/releases/)| -This example is taken from `molecule/resources/playbook.yml` and is tested on each push, pull request and release. +## [Example Playbook](#example-playbook) + +This example is taken from `molecule/resources/converge.yml` and is tested on each push, pull request and release. ```yaml --- - name: Converge @@ -18,10 +17,10 @@ This example is taken from `molecule/resources/playbook.yml` and is tested on ea gather_facts: yes roles: - - robertdebock.fail2ban + - role: robertdebock.fail2ban ``` -The machine you are running this on, may need to be prepared, I use this playbook to ensure everything is in place to let the role work. +The machine may need to be prepared using `molecule/resources/prepare.yml`: ```yaml --- - name: Prepare @@ -30,15 +29,26 @@ The machine you are running this on, may need to be prepared, I use this playboo become: yes roles: - - robertdebock.bootstrap - - robertdebock.epel + - role: robertdebock.bootstrap + - role: robertdebock.epel ``` +For verification `molecule/resources/verify.yml` runs after the role has been applied. +```yaml +--- +- name: Verify + hosts: all + become: yes + gather_facts: no + + tasks: + - name: check if connection still works + ping: +``` Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles. -Role Variables --------------- +## [Role Variables](#role-variables) These variables are set in `defaults/main.yml`: ```yaml @@ -50,8 +60,11 @@ fail2ban_logtarget: /var/log/fail2ban.log fail2ban_ignoreself: "true" fail2ban_ignoreips: "127.0.0.1/8 ::1" -fail2ban_bantime: 10m -fail2ban_findtime: 10m + +# In seconds +fail2ban_bantime: 600 +fail2ban_findtime: 600 + fail2ban_maxretry: 5 fail2ban_destemail: root@localhost fail2ban_sender: root@{{ ansible_fqdn }} @@ -67,8 +80,7 @@ fail2ban_jail_configuration: [] # section: DEFAULT ``` -Requirements ------------- +## [Requirements](#requirements) - Access to a repository containing packages, likely on the internet. - A recent version of Ansible. (Tests run on the current, previous and next release of Ansible.) @@ -82,53 +94,45 @@ The following roles can be installed to ensure all requirements are met, using ` ``` -Context -------- +## [Context](#context) This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information. Here is an overview of related roles: ![dependencies](https://raw.githubusercontent.com/robertdebock/drawings/artifacts/fail2ban.png "Dependency") +## [Compatibility](#compatibility) -Compatibility -------------- +This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): -This role has been tested on these [container images](https://hub.docker.com/): +|container|tags| +|---------|----| +|amazon|2018.03| +|el|7, 8| +|debian|buster, bullseye| +|fedora|31, 32| +|opensuse|all| +|ubuntu|focal, bionic, xenial| -|container|tag|allow_failures| -|---------|---|--------------| -|amazonlinux|1|no| -|amazonlinux|latest|no| -|debian|unstable|yes| -|debian|latest|no| -|centos|7|no| -|centos|latest|no| -|fedora|latest|no| -|fedora|rawhide|yes| -|opensuse|latest|no| -|ubuntu|latest|no| +The minimum version of Ansible required is 2.8 but tests have been done to: -This role has been tested on these Ansible versions: +- The previous version, on version lower. +- The current version. +- The development version. -- ansible>=2.8, <2.9 -- ansible>=2.9 -- git+https://github.com/ansible/ansible.git@devel - -Exceptions ----------- +## [Exceptions](#exceptions) Some variarations of the build matrix do not work. These are the variations and reasons why the build won't work: | variation | reason | |---------------------------|------------------------| | alpine | Service `fail2ban' needs non existent service `logger' | +| amazonlinux:1 | file /etc/ethertypes conflicts between attempted installs of ebtables-2.0.10-16.amzn2.x86_64 and iptables-1.8.2-16.amzn2.0.1.x86_64 | -Testing -------- +## [Testing](#testing) -[Unit tests](https://travis-ci.org/robertdebock/ansible-role-fail2ban) are done on every commit, pull request, release and periodically. +[Unit tests](https://travis-ci.com/robertdebock/ansible-role-fail2ban) are done on every commit, pull request, release and periodically. If you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-fail2ban/issues) @@ -160,26 +164,19 @@ image="centos" tox image="debian" tag="stable" tox ``` -Modules -------- - -This role uses the following modules: -```yaml ---- -- file -- ini_file -- package -- service -- stat -``` - -License -------- +## [License](#license) Apache-2.0 +## [Contributors](#contributors) -Author Information ------------------- +I'd like to thank everybody that made contributions to this repository. It motivates me, improves the code and is just fun to collaborate. + +- [j8r](https://github.com/j8r) +- [rgevaert](https://github.com/rgevaert) + +## [Author Information](#author-information) [Robert de Bock](https://robertdebock.nl/) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/fail2ban/SECURITY.md b/roles/robertdebock.fail2ban/SECURITY.md similarity index 76% rename from roles/fail2ban/SECURITY.md rename to roles/robertdebock.fail2ban/SECURITY.md index 5c4cff5..df6334a 100644 --- a/roles/fail2ban/SECURITY.md +++ b/roles/robertdebock.fail2ban/SECURITY.md @@ -1,8 +1,8 @@ -# Security Policy +# [Security Policy](#security-policy) This software implements other software, it's not very likely that this software introduces new vulnerabilities. -## Supported Versions +## [Supported Versions](#supported-versions) The current major version is supported. For example if the current version is 3.4.1: @@ -14,10 +14,12 @@ The current major version is supported. For example if the current version is 3. | 2.0.0 | :x: | | 1.0.0 | :x: | -## Reporting a Vulnerability +## [Reporting a Vulnerability](#reporting-a-vulnarability) Please [open an issue](https://github.com/robertdebock/ansible-role-fail2ban/issues) describing the vulnerability. Tell them where to go, how often they can expect to get an update on a reported vulnerability, what to expect if the vulnerability is accepted or declined, etc. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/fail2ban/defaults/main.yml b/roles/robertdebock.fail2ban/defaults/main.yml similarity index 88% rename from roles/fail2ban/defaults/main.yml rename to roles/robertdebock.fail2ban/defaults/main.yml index c47b67a..4f68b47 100644 --- a/roles/fail2ban/defaults/main.yml +++ b/roles/robertdebock.fail2ban/defaults/main.yml @@ -6,8 +6,11 @@ fail2ban_logtarget: /var/log/fail2ban.log fail2ban_ignoreself: "true" fail2ban_ignoreips: "127.0.0.1/8 ::1" -fail2ban_bantime: 10m -fail2ban_findtime: 10m + +# In seconds +fail2ban_bantime: 600 +fail2ban_findtime: 600 + fail2ban_maxretry: 5 fail2ban_destemail: root@localhost fail2ban_sender: root@{{ ansible_fqdn }} diff --git a/roles/fail2ban/handlers/main.yml b/roles/robertdebock.fail2ban/handlers/main.yml similarity index 100% rename from roles/fail2ban/handlers/main.yml rename to roles/robertdebock.fail2ban/handlers/main.yml diff --git a/roles/robertdebock.fail2ban/meta/.galaxy_install_info b/roles/robertdebock.fail2ban/meta/.galaxy_install_info new file mode 100644 index 0000000..6a48ae9 --- /dev/null +++ b/roles/robertdebock.fail2ban/meta/.galaxy_install_info @@ -0,0 +1,2 @@ +install_date: Mon Sep 28 09:36:48 2020 +version: 3.1.4 diff --git a/roles/robertdebock.fail2ban/meta/exception.yml b/roles/robertdebock.fail2ban/meta/exception.yml new file mode 100644 index 0000000..c364baa --- /dev/null +++ b/roles/robertdebock.fail2ban/meta/exception.yml @@ -0,0 +1,6 @@ +--- +exceptions: + - variation: alpine + reason: "Service `fail2ban' needs non existent service `logger'" + - variation: amazonlinux:1 + reason: "file /etc/ethertypes conflicts between attempted installs of ebtables-2.0.10-16.amzn2.x86_64 and iptables-1.8.2-16.amzn2.0.1.x86_64" diff --git a/roles/fail2ban/meta/main.yml b/roles/robertdebock.fail2ban/meta/main.yml similarity index 82% rename from roles/fail2ban/meta/main.yml rename to roles/robertdebock.fail2ban/meta/main.yml index d1de857..816df35 100644 --- a/roles/fail2ban/meta/main.yml +++ b/roles/robertdebock.fail2ban/meta/main.yml @@ -10,33 +10,32 @@ galaxy_info: platforms: - name: Amazon versions: - - all - - name: ArchLinux - versions: - - all - - name: Debian - versions: - - all + - 2018.03 - name: EL versions: - 7 - 8 + - name: Debian + versions: + - buster + - bullseye - name: Fedora versions: - - all + - 31 + - 32 - name: OpenSUSE versions: - all - name: Ubuntu versions: - - artful + - focal - bionic + - xenial galaxy_tags: - fail2ban - installer - package - centos - - rhel dependencies: [] diff --git a/roles/robertdebock.fail2ban/meta/preferences.yml b/roles/robertdebock.fail2ban/meta/preferences.yml new file mode 100644 index 0000000..e7fdebf --- /dev/null +++ b/roles/robertdebock.fail2ban/meta/preferences.yml @@ -0,0 +1,2 @@ +--- +tox_parallel: yes diff --git a/roles/robertdebock.fail2ban/molecule/default/converge.yml b/roles/robertdebock.fail2ban/molecule/default/converge.yml new file mode 100644 index 0000000..3194da6 --- /dev/null +++ b/roles/robertdebock.fail2ban/molecule/default/converge.yml @@ -0,0 +1,8 @@ +--- +- name: Converge + hosts: all + become: yes + gather_facts: yes + + roles: + - role: ansible-role-fail2ban diff --git a/roles/fail2ban/molecule/default/molecule.yml b/roles/robertdebock.fail2ban/molecule/default/molecule.yml similarity index 73% rename from roles/fail2ban/molecule/default/molecule.yml rename to roles/robertdebock.fail2ban/molecule/default/molecule.yml index b20bc00..878e444 100644 --- a/roles/fail2ban/molecule/default/molecule.yml +++ b/roles/robertdebock.fail2ban/molecule/default/molecule.yml @@ -6,8 +6,9 @@ dependency: name: galaxy options: role-file: requirements.yml -lint: - name: yamllint +lint: | + set -e + yamllint . driver: name: docker platforms: @@ -20,5 +21,9 @@ platforms: pre_build_image: yes provisioner: name: ansible -scenario: - name: default + config_options: + defaults: + stdout_callback: yaml + bin_ansible_callbacks: yes +verifier: + name: ansible diff --git a/roles/investigate/molecule/default/prepare.yml b/roles/robertdebock.fail2ban/molecule/default/prepare.yml similarity index 100% rename from roles/investigate/molecule/default/prepare.yml rename to roles/robertdebock.fail2ban/molecule/default/prepare.yml diff --git a/roles/robertdebock.fail2ban/molecule/default/verify.yml b/roles/robertdebock.fail2ban/molecule/default/verify.yml new file mode 100644 index 0000000..b9dc6f8 --- /dev/null +++ b/roles/robertdebock.fail2ban/molecule/default/verify.yml @@ -0,0 +1,9 @@ +--- +- name: Verify + hosts: all + become: yes + gather_facts: no + + tasks: + - name: check if connection still works + ping: diff --git a/roles/fail2ban/requirements.yml b/roles/robertdebock.fail2ban/requirements.yml similarity index 100% rename from roles/fail2ban/requirements.yml rename to roles/robertdebock.fail2ban/requirements.yml diff --git a/roles/robertdebock.fail2ban/tasks/assert.yml b/roles/robertdebock.fail2ban/tasks/assert.yml new file mode 100644 index 0000000..961b418 --- /dev/null +++ b/roles/robertdebock.fail2ban/tasks/assert.yml @@ -0,0 +1,112 @@ +--- +- name: test if fail2ban_loglevel is set correctly + assert: + that: + - fail2ban_loglevel is defined + - fail2ban_loglevel | length > 0 + - fail2ban_loglevel in ["CRITICAL", "ERROR", "WARNING", "NOTICE", "INFO", "DEBUG"] + quiet: yes + +- name: test if fail2ban_logtarget is set correctly + assert: + that: + - fail2ban_logtarget is defined + - fail2ban_logtarget | length > 0 + quiet: yes + +- name: test if fail2ban_ignoreself is set correctly + assert: + that: + - fail2ban_ignoreself is defined + - fail2ban_ignoreself | length > 0 + - fail2ban_ignoreself in ["false", "true"] + quiet: yes + +- name: test if fail2ban_ignoreips is set correctly + assert: + that: + - fail2ban_ignoreips is defined + - fail2ban_ignoreips | length > 0 + quiet: yes + +- name: test if fail2ban_bantime is set correctly + assert: + that: + - fail2ban_bantime is defined + - fail2ban_bantime | int + - fail2ban_bantime | int > 0 + quiet: yes + +- name: test if fail2ban_findtime is set correctly + assert: + that: + - fail2ban_findtime is defined + - fail2ban_findtime | int + - fail2ban_findtime | int > 0 + quiet: yes + +- name: test if fail2ban_maxretry is set correctly + assert: + that: + - fail2ban_maxretry is defined + - fail2ban_maxretry | int + - fail2ban_maxretry | int > 0 + quiet: yes + +- name: test if fail2ban_destemail is set correctly + assert: + that: + - fail2ban_destemail is defined + - fail2ban_destemail | length > 0 + quiet: yes + +- name: test if fail2ban_sender is set correctly + assert: + that: + - fail2ban_sender is defined + - fail2ban_sender | length > 0 + quiet: yes + +- name: test if fail2ban_configuration is set correctly + assert: + that: + - fail2ban_configuration is iterable + quiet: yes + when: + - fail2ban_configuration is defined + +- name: test if item in fail2ban_configuration is set correctly + assert: + that: + - item.option is defined + - item.option | length > 0 + - item.value is defined + - item.value | length > 0 + - item.section is defined + - item.section | length > 0 + quiet: yes + loop: "{{ fail2ban_configuration }}" + loop_control: + label: "{{ item.option }}" + when: + - fail2ban_configuration is defined + - fail2ban_configuration | length > 0 + - fail2ban_configuration is iterable + +- name: test if fail2ban_jail_configuration is set correctly + assert: + that: + - item.option is defined + - item.option | length > 0 + - item.value is defined + - item.value | length > 0 + - item.section is defined + - item.section | length > 0 + quiet: yes + loop: "{{ fail2ban_jail_configuration }}" + loop_control: + label: "{{ item.option }}" + when: + - fail2ban_jail_configuration is defined + - fail2ban_jail_configuration | length > 0 + - fail2ban_jail_configuration is iterable diff --git a/roles/fail2ban/tasks/main.yml b/roles/robertdebock.fail2ban/tasks/main.yml similarity index 62% rename from roles/fail2ban/tasks/main.yml rename to roles/robertdebock.fail2ban/tasks/main.yml index 17b6621..b2db813 100644 --- a/roles/fail2ban/tasks/main.yml +++ b/roles/robertdebock.fail2ban/tasks/main.yml @@ -1,12 +1,12 @@ --- # tasks file for fail2ban +- name: include assert.yml + include_tasks: assert.yml + - name: install fail2ban package: name: "{{ fail2ban_packages }}" state: present - register: fail2ban_install_fail2ban - until: fail2ban_install_fail2ban is succeeded - retries: 3 - name: configure fail2ban.conf ini_file: @@ -14,21 +14,21 @@ section: "{{ item.section }}" option: "{{ item.option }}" value: "{{ item.value }}" - with_items: - - "{{ fail2ban_base_configuration + fail2ban_configuration }}" + mode: "0640" + loop: "{{ fail2ban_base_configuration + fail2ban_configuration }}" notify: - restart fail2ban loop_control: label: "{{ item.option }}" -- name: configure jail.conf +- name: configure jail.local ini_file: - path: /etc/fail2ban/jail.conf + path: /etc/fail2ban/jail.local section: "{{ item.section }}" option: "{{ item.option }}" value: "{{ item.value }}" - with_items: - - "{{ fail2ban_base_jail_configuration + fail2ban_jail_configuration }}" + mode: "0640" + loop: "{{ fail2ban_base_jail_configuration + fail2ban_jail_configuration }}" notify: - restart fail2ban loop_control: @@ -37,18 +37,19 @@ - name: stat auth log file stat: path: /var/log/auth.log - register: auth + register: fail2ban_auth - name: touch auth log file file: path: /var/log/auth.log state: touch - when: auth.stat.exists is defined and not auth.stat.exists + mode: "0640" + when: + - fail2ban_auth.stat.exists is defined + - not fail2ban_auth.stat.exists - name: start and enable fail2ban service: - name: "{{ item }}" + name: "{{ fail2ban_service }}" state: started enabled: yes - with_items: - - "{{ fail2ban_service }}" diff --git a/roles/robertdebock.fail2ban/tox.ini b/roles/robertdebock.fail2ban/tox.ini new file mode 100644 index 0000000..c1bc1d4 --- /dev/null +++ b/roles/robertdebock.fail2ban/tox.ini @@ -0,0 +1,26 @@ +# +# Ansible managed +# +[tox] +minversion = 3.7 +# Disabled "next" because of: +# https://github.com/ansible-community/molecule/issues/2626. +# envlist = py{38}-ansible-{previous,current,next} +envlist = py{38}-ansible-{previous,current} +skipsdist = true + +[testenv] +deps = + previous: ansible>=2.8, <2.9 + current: ansible>=2.9 + next: git+https://github.com/ansible/ansible.git@devel + molecule[lint]>=3, <4 + docker>=4.2, <4.3 +commands = molecule test +setenv = + TOX_ENVNAME={envname} + MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} + PY_COLORS=1 + ANSIBLE_FORCE_COLOR=1 + +passenv = namespace image tag diff --git a/roles/fail2ban/vars/main.yml b/roles/robertdebock.fail2ban/vars/main.yml similarity index 99% rename from roles/fail2ban/vars/main.yml rename to roles/robertdebock.fail2ban/vars/main.yml index fde306a..feaba74 100644 --- a/roles/fail2ban/vars/main.yml +++ b/roles/robertdebock.fail2ban/vars/main.yml @@ -1,5 +1,6 @@ --- # vars file for fail2ban + fail2ban_packages: - fail2ban diff --git a/roles/robertdebock.git/.ansible-lint b/roles/robertdebock.git/.ansible-lint new file mode 100644 index 0000000..cb2872e --- /dev/null +++ b/roles/robertdebock.git/.ansible-lint @@ -0,0 +1,7 @@ +# +# Ansible managed +# +exclude_paths: + - ./meta/preferences.yml + - ./molecule/default/verify.yml + - ./.tox diff --git a/roles/robertdebock.git/.github/FUNDING.yml b/roles/robertdebock.git/.github/FUNDING.yml new file mode 100644 index 0000000..67320f0 --- /dev/null +++ b/roles/robertdebock.git/.github/FUNDING.yml @@ -0,0 +1,2 @@ +--- +github: robertdebock diff --git a/roles/robertdebock.git/.github/ISSUE_TEMPLATE/bug_report.md b/roles/robertdebock.git/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..f39b5dc --- /dev/null +++ b/roles/robertdebock.git/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a report to help me improve + +--- + +## Describe the bug +A clear and concise description of what the bug is. + +## Playbook + +Please paste the playbook you are using. (Consider `requirements.yml` and +optionally the command you've invoked.) + + +```yaml +--- +YOUR PLAYBOOK HERE +``` + +## Output + +Show at least the error, possible related output, maybe just all the output. + +## Environment + +- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) +- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) +- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.git/.github/ISSUE_TEMPLATE/feature_request.md b/roles/robertdebock.git/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..55a93c4 --- /dev/null +++ b/roles/robertdebock.git/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +## Proposed feature + +A clear and concise description of what you want to happen. + +## Rationale + +Why is this feature required? + +## Additional context + +Add any other context about the feature request here. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/git/PULL_REQUEST_TEMPLATE.md b/roles/robertdebock.git/.github/pull_request_template.md similarity index 100% rename from roles/git/PULL_REQUEST_TEMPLATE.md rename to roles/robertdebock.git/.github/pull_request_template.md diff --git a/roles/git/.github/settings.yml b/roles/robertdebock.git/.github/settings.yml similarity index 100% rename from roles/git/.github/settings.yml rename to roles/robertdebock.git/.github/settings.yml diff --git a/roles/robertdebock.git/.github/workflows/galaxy.yml b/roles/robertdebock.git/.github/workflows/galaxy.yml new file mode 100644 index 0000000..bfb170a --- /dev/null +++ b/roles/robertdebock.git/.github/workflows/galaxy.yml @@ -0,0 +1,22 @@ +--- +# +# Ansible managed +# + +name: Release to Ansible Galaxy + +on: + push: + tags: + - '*' + schedule: + - cron: '7 7 7 * *' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: galaxy + uses: robertdebock/galaxy-action@1.0.1 + with: + galaxy_api_key: ${{ secrets.galaxy_api_key }} diff --git a/roles/robertdebock.git/.github/workflows/molecule.yml b/roles/robertdebock.git/.github/workflows/molecule.yml new file mode 100644 index 0000000..6da7e06 --- /dev/null +++ b/roles/robertdebock.git/.github/workflows/molecule.yml @@ -0,0 +1,78 @@ +--- +# +# Ansible managed +# + +name: Ansible Molecule + +on: + push: + tags_ignore: + - '*' + pull_request: + schedule: + - cron: '7 7 7 * *' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + command: lint + test: + needs: + - lint + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + config: + - image: "alpine" + tag: "latest" + - image: "alpine" + tag: "edge" + - image: "amazonlinux" + tag: "1" + - image: "centos" + tag: "7" + - image: "centos" + tag: "latest" + - image: "debian" + tag: "latest" + - image: "debian" + tag: "bullseye" + - image: "fedora" + tag: "31" + - image: "fedora" + tag: "latest" + - image: "opensuse" + tag: "latest" + - image: "ubuntu" + tag: "latest" + - image: "ubuntu" + tag: "bionic" + - image: "ubuntu" + tag: "xenial" + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: disable apparmor for mysql + run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + - name: parse apparmor for mysql + run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + image: ${{ matrix.config.image }} + tag: ${{ matrix.config.tag }} + options: "--parallel all" + env: + TOX_PARALLEL_NO_SPINNER: 1 diff --git a/roles/git/.gitignore b/roles/robertdebock.git/.gitignore similarity index 100% rename from roles/git/.gitignore rename to roles/robertdebock.git/.gitignore diff --git a/roles/robertdebock.git/.travis.yml b/roles/robertdebock.git/.travis.yml new file mode 100644 index 0000000..c2f575a --- /dev/null +++ b/roles/robertdebock.git/.travis.yml @@ -0,0 +1,50 @@ +--- +# +# Ansible managed +# +language: python + +os: linux +dist: xenial + +python: + - "3.8" + +services: + - docker + +env: + global: + namespace="robertdebock" + jobs: + - image="alpine" tag="latest" + - image="alpine" tag="edge" + - image="amazonlinux" tag="1" + - image="centos" tag="7" + - image="centos" tag="latest" + - image="debian" tag="latest" + - image="debian" tag="bullseye" + - image="fedora" tag="31" + - image="fedora" tag="latest" + - image="opensuse" tag="latest" + - image="ubuntu" tag="latest" + - image="ubuntu" tag="bionic" + - image="ubuntu" tag="xenial" + +cache: + - pip + +install: + - pip install --upgrade pip + - pip install tox + +script: + - function retry { counter=0 ; until "$@" ; do exit=$? ; counter=$(($counter + 1)) ; if [ $counter -ge 3 ] ; then return $exit ; fi ; done ; return 0; } ; retry tox --parallel all + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ + slack: + secure: "cfHT76XEmLF7IEz3QFesP5ZE/XPy9H1KtzUAqFuUVUryitRSeYIyXAgiy9u/zLiHkcNDIdrC/9ZiA/xz0gBuG/Cqy5PuH2STx9WNLEb4sOLofWV25go4FOz+EYB2PJtuyg/YOEadJh30cAjJaB2U+vkni8i/tW5Y3Hi3fA4BB3VTMUw08ItqmG8205udxz/9+stF7KQw2G355CGIn6ix2xk8LINTk4SDOWq2/ECk78TXnNO+c/j/vMJsn1tYkkVXaXJdJzI6ozB7FmBAD3At2C397plxECe4M2+kw00k0wmtynKG5XIBAIqDBi7+1mm9v4DB+ZiWPrqaLVM2So6AMEX0fbeUfmGHCQFN6uHBwAHwTXWNPIZOlWaWxT9CUdh+Qc5JIcHqfOYORYPxJfXCk0o1KCexBJ7rd1HObXZ0mvvPB8Ro48VUdzUCyyD8t1PtxJSlB1EHtw/9weZ6ClZ25Q6cIh9f8QQSmLjRdSc+YxI4MC7fpPAE+EEz39lAbo7xoGiXZfCwzItzPLuB8Ee2u4LtIqCaxwQ7AaAjvc65tYKJXoYvynwCrUCJsjja2jMxWmgiSe0h+hNUeTJp1AlhkcMYZlqdHxapL1jxUIXjOuaoGiXfozQHjziXikL2GUpF03aXwByRdqT9TaEoAchKm/tp4CSpbbsa6gddgc0OZZw=" + on_success: change + template: "%{result}: %{repository_slug}@%{branch}, build <%{build_url}|#%{build_number}> (<%{compare_url}|%{commit}>)" + email: false diff --git a/roles/robertdebock.git/.yamllint b/roles/robertdebock.git/.yamllint new file mode 100644 index 0000000..894450c --- /dev/null +++ b/roles/robertdebock.git/.yamllint @@ -0,0 +1,15 @@ +--- +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + line-length: disable + truthy: disable + +ignore: | + .tox/ diff --git a/roles/git/CODE_OF_CONDUCT.md b/roles/robertdebock.git/CODE_OF_CONDUCT.md similarity index 100% rename from roles/git/CODE_OF_CONDUCT.md rename to roles/robertdebock.git/CODE_OF_CONDUCT.md diff --git a/roles/common/CONTRIBUTING.md b/roles/robertdebock.git/CONTRIBUTING.md similarity index 72% rename from roles/common/CONTRIBUTING.md rename to roles/robertdebock.git/CONTRIBUTING.md index 7ce3b8d..c17e79d 100644 --- a/roles/common/CONTRIBUTING.md +++ b/roles/robertdebock.git/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Please contribute +# [Please contribute](#please-contribute) You can really make a difference by: @@ -9,38 +9,38 @@ I'll try to help and take every contribution seriously. It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. -## Step by step +## [Step by step](#step-by-step) Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. -### 1. Make an issue. +### [1. Make an issue.](#1-make-an-issue) -When you spot an issue, [create an issue](https://github.com/robertdebock/common/issues). +When you spot an issue, [create an issue](https://github.com/robertdebock/ansible-role-git/issues). Making the issue help me and others to find similar problems in the future. -### 2. Fork the project. +### [2. Fork the project.](#2-fork-the-project) -On the top right side of [the repository on GitHub](https://github.com/robertdebock/common), click `fork`. This copies everything to your GitHub namespace. +On the top right side of [the repository on GitHub](https://github.com/robertdebock/ansible-role-git), click `fork`. This copies everything to your GitHub namespace. -### 3. Make the changes +### [3. Make the changes](#3-make-the-changes) In you own GitHub namespace, make the required changes. I typically do that by cloning the repository (in your namespace) locally: ``` -git clone git@github.com:YOURNAMESPACE/common.git +git clone git@github.com:YOURNAMESPACE/ansible-role-git.git ``` Now you can start to edit on your laptop. -### 4. Optionally: test your changes +### [4. Optionally: test your changes](#4-optionally-test-your-changes) Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): ``` -pip install molecule tox +pip install molecule tox ansible-lint docker ``` And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: @@ -55,20 +55,22 @@ Once it start to work, you can test multiple version of Ansible: image=centos tag=7 tox ``` -### 6. Optionally: Regenerate all dynamic content +### [5. Optionally: Regenerate all dynamic content](#5-optionally-regenerate-all-dynamic-content) You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. If you don't do it, I'll do it later for you. -### 7. Make a pull request +### [6. Make a pull request](#6-make-a-pull-request) [GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. -### 8. Wait +### [7. Wait](#7-wait) Now I'll get a message that you've added some code. Thank you, really. CI starts to test your changes. You can follow the progress on Travis. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.git/LICENSE b/roles/robertdebock.git/LICENSE new file mode 100644 index 0000000..bd15893 --- /dev/null +++ b/roles/robertdebock.git/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Robert de Bock (robert@meinit.nl) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/roles/git/README.md b/roles/robertdebock.git/README.md similarity index 62% rename from roles/git/README.md rename to roles/robertdebock.git/README.md index 9a5e6f3..159dcf3 100644 --- a/roles/git/README.md +++ b/roles/robertdebock.git/README.md @@ -1,15 +1,14 @@ -git -========= - -Ansible logo - Build status +# [git](#git) Install and configure git on your system. -Example Playbook ----------------- +|Travis|GitHub|Quality|Downloads|Version| +|------|------|-------|---------|-------| +|[![travis](https://travis-ci.com/robertdebock/ansible-role-git.svg?branch=master)](https://travis-ci.com/robertdebock/ansible-role-git)|[![github](https://github.com/robertdebock/ansible-role-git/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-git/actions)|[![quality](https://img.shields.io/ansible/quality/34950)](https://galaxy.ansible.com/robertdebock/git)|[![downloads](https://img.shields.io/ansible/role/d/34950)](https://galaxy.ansible.com/robertdebock/git)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-git.svg)](https://github.com/robertdebock/ansible-role-git/releases/)| -This example is taken from `molecule/resources/playbook.yml` and is tested on each push, pull request and release. +## [Example Playbook](#example-playbook) + +This example is taken from `molecule/resources/converge.yml` and is tested on each push, pull request and release. ```yaml --- - name: Converge @@ -32,10 +31,10 @@ This example is taken from `molecule/resources/playbook.yml` and is tested on ea version: 2.11.1 roles: - - robertdebock.git + - role: robertdebock.git ``` -The machine you are running this on, may need to be prepared, I use this playbook to ensure everything is in place to let the role work. +The machine may need to be prepared using `molecule/resources/prepare.yml`: ```yaml --- - name: Prepare @@ -48,11 +47,22 @@ The machine you are running this on, may need to be prepared, I use this playboo - role: robertdebock.bootstrap ``` +For verification `molecule/resources/verify.yml` runs after the role has been applied. +```yaml +--- +- name: Verify + hosts: all + become: yes + gather_facts: no + + tasks: + - name: check if connection still works + ping: +``` Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles. -Role Variables --------------- +## [Role Variables](#role-variables) These variables are set in `defaults/main.yml`: ```yaml @@ -70,8 +80,7 @@ These variables are set in `defaults/main.yml`: # git_user_name: John Doe # Where to place the copies of the repositories. -git_repository_destination: /home/{{ git_username }}/Documents/github.com/{{ git_username }} - +git_repository_destination: /home/{{ git_username | default('unset') }}/Documents/github.com/{{ git_username | default('unset') }} # Should git force (overwrite locally changed) clone? (Can also be controlled # per repository, see below. @@ -89,8 +98,7 @@ git_force: no # force: yes ``` -Requirements ------------- +## [Requirements](#requirements) - Access to a repository containing packages, likely on the internet. - A recent version of Ansible. (Tests run on the current, previous and next release of Ansible.) @@ -103,49 +111,38 @@ The following roles can be installed to ensure all requirements are met, using ` ``` -Context -------- +## [Context](#context) This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information. Here is an overview of related roles: ![dependencies](https://raw.githubusercontent.com/robertdebock/drawings/artifacts/git.png "Dependency") +## [Compatibility](#compatibility) -Compatibility -------------- +This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): -This role has been tested on these [container images](https://hub.docker.com/): +|container|tags| +|---------|----| +|alpine|all| +|amazon|2018.03| +|el|7, 8| +|debian|buster, bullseye| +|fedora|31, 32| +|opensuse|all| +|ubuntu|focal, bionic, xenial| -|container|tag|allow_failures| -|---------|---|--------------| -|amazonlinux|1|no| -|amazonlinux|latest|no| -|alpine|latest|no| -|alpine|edge|yes| -|debian|unstable|yes| -|debian|latest|no| -|centos|7|no| -|redhat|7|no| -|centos|latest|no| -|redhat|latest|no| -|fedora|latest|no| -|fedora|rawhide|yes| -|opensuse|latest|no| -|ubuntu|latest|no| +The minimum version of Ansible required is 2.8 but tests have been done to: -This role has been tested on these Ansible versions: - -- ansible>=2.8, <2.9 -- ansible>=2.9 -- git+https://github.com/ansible/ansible.git@devel +- The previous version, on version lower. +- The current version. +- The development version. -Testing -------- +## [Testing](#testing) -[Unit tests](https://travis-ci.org/robertdebock/ansible-role-git) are done on every commit, pull request, release and periodically. +[Unit tests](https://travis-ci.com/robertdebock/ansible-role-git) are done on every commit, pull request, release and periodically. If you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-git/issues) @@ -177,26 +174,18 @@ image="centos" tox image="debian" tag="stable" tox ``` -Modules -------- - -This role uses the following modules: -```yaml ---- -- file -- getent -- git -- package -- template -``` - -License -------- +## [License](#license) Apache-2.0 +## [Contributors](#contributors) -Author Information ------------------- +I'd like to thank everybody that made contributions to this repository. It motivates me, improves the code and is just fun to collaborate. + +- [langouste](https://github.com/langouste) + +## [Author Information](#author-information) [Robert de Bock](https://robertdebock.nl/) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/git/SECURITY.md b/roles/robertdebock.git/SECURITY.md similarity index 76% rename from roles/git/SECURITY.md rename to roles/robertdebock.git/SECURITY.md index 914ed04..2549711 100644 --- a/roles/git/SECURITY.md +++ b/roles/robertdebock.git/SECURITY.md @@ -1,8 +1,8 @@ -# Security Policy +# [Security Policy](#security-policy) This software implements other software, it's not very likely that this software introduces new vulnerabilities. -## Supported Versions +## [Supported Versions](#supported-versions) The current major version is supported. For example if the current version is 3.4.1: @@ -14,10 +14,12 @@ The current major version is supported. For example if the current version is 3. | 2.0.0 | :x: | | 1.0.0 | :x: | -## Reporting a Vulnerability +## [Reporting a Vulnerability](#reporting-a-vulnarability) Please [open an issue](https://github.com/robertdebock/ansible-role-git/issues) describing the vulnerability. Tell them where to go, how often they can expect to get an update on a reported vulnerability, what to expect if the vulnerability is accepted or declined, etc. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/git/defaults/main.yml b/roles/robertdebock.git/defaults/main.yml similarity index 87% rename from roles/git/defaults/main.yml rename to roles/robertdebock.git/defaults/main.yml index 652c160..05092aa 100644 --- a/roles/git/defaults/main.yml +++ b/roles/robertdebock.git/defaults/main.yml @@ -12,8 +12,7 @@ # git_user_name: John Doe # Where to place the copies of the repositories. -git_repository_destination: /home/{{ git_username }}/Documents/github.com/{{ git_username }} - +git_repository_destination: /home/{{ git_username | default('unset') }}/Documents/github.com/{{ git_username | default('unset') }} # Should git force (overwrite locally changed) clone? (Can also be controlled # per repository, see below. diff --git a/roles/robertdebock.git/meta/.galaxy_install_info b/roles/robertdebock.git/meta/.galaxy_install_info new file mode 100644 index 0000000..f62f93c --- /dev/null +++ b/roles/robertdebock.git/meta/.galaxy_install_info @@ -0,0 +1,2 @@ +install_date: Mon Sep 28 09:36:51 2020 +version: 3.3.5 diff --git a/roles/git/meta/main.yml b/roles/robertdebock.git/meta/main.yml similarity index 81% rename from roles/git/meta/main.yml rename to roles/robertdebock.git/meta/main.yml index 219412a..940ebe5 100644 --- a/roles/git/meta/main.yml +++ b/roles/robertdebock.git/meta/main.yml @@ -8,36 +8,35 @@ galaxy_info: min_ansible_version: 2.8 platforms: - - name: Amazon - versions: - - all - name: Alpine versions: - all - - name: ArchLinux + - name: Amazon versions: - - all - - name: Debian - versions: - - all + - 2018.03 - name: EL versions: - 7 - 8 + - name: Debian + versions: + - buster + - bullseye - name: Fedora versions: - - all + - 31 + - 32 - name: OpenSUSE versions: - all - name: Ubuntu versions: - - artful + - focal - bionic + - xenial galaxy_tags: - git - - archlinux - centos - redhat diff --git a/roles/robertdebock.git/meta/preferences.yml b/roles/robertdebock.git/meta/preferences.yml new file mode 100644 index 0000000..e7fdebf --- /dev/null +++ b/roles/robertdebock.git/meta/preferences.yml @@ -0,0 +1,2 @@ +--- +tox_parallel: yes diff --git a/roles/git/molecule/default/playbook.yml b/roles/robertdebock.git/molecule/default/converge.yml similarity index 94% rename from roles/git/molecule/default/playbook.yml rename to roles/robertdebock.git/molecule/default/converge.yml index 3e39d91..f356762 100644 --- a/roles/git/molecule/default/playbook.yml +++ b/roles/robertdebock.git/molecule/default/converge.yml @@ -19,4 +19,4 @@ version: 2.11.1 roles: - - ansible-role-git + - role: ansible-role-git diff --git a/roles/git/molecule/default/molecule.yml b/roles/robertdebock.git/molecule/default/molecule.yml similarity index 73% rename from roles/git/molecule/default/molecule.yml rename to roles/robertdebock.git/molecule/default/molecule.yml index e30303f..a1d486d 100644 --- a/roles/git/molecule/default/molecule.yml +++ b/roles/robertdebock.git/molecule/default/molecule.yml @@ -6,8 +6,9 @@ dependency: name: galaxy options: role-file: requirements.yml -lint: - name: yamllint +lint: | + set -e + yamllint . driver: name: docker platforms: @@ -20,5 +21,9 @@ platforms: pre_build_image: yes provisioner: name: ansible -scenario: - name: default + config_options: + defaults: + stdout_callback: yaml + bin_ansible_callbacks: yes +verifier: + name: ansible diff --git a/roles/git/molecule/default/prepare.yml b/roles/robertdebock.git/molecule/default/prepare.yml similarity index 100% rename from roles/git/molecule/default/prepare.yml rename to roles/robertdebock.git/molecule/default/prepare.yml diff --git a/roles/robertdebock.git/molecule/default/verify.yml b/roles/robertdebock.git/molecule/default/verify.yml new file mode 100644 index 0000000..b9dc6f8 --- /dev/null +++ b/roles/robertdebock.git/molecule/default/verify.yml @@ -0,0 +1,9 @@ +--- +- name: Verify + hosts: all + become: yes + gather_facts: no + + tasks: + - name: check if connection still works + ping: diff --git a/roles/reboot/requirements.yml b/roles/robertdebock.git/requirements.yml similarity index 100% rename from roles/reboot/requirements.yml rename to roles/robertdebock.git/requirements.yml diff --git a/roles/robertdebock.git/tasks/assert.yml b/roles/robertdebock.git/tasks/assert.yml new file mode 100644 index 0000000..a14bbad --- /dev/null +++ b/roles/robertdebock.git/tasks/assert.yml @@ -0,0 +1,87 @@ +--- +- name: test if git_username is set correctly + assert: + that: + - git_username | length > 0 + quiet: yes + when: + - git_username is defined + +- name: test if git_groupname is set correctly + assert: + that: + - git_groupname | length > 0 + quiet: yes + when: + - git_groupname is defined + +- name: test if git_user_email is set correctly + assert: + that: + - git_user_email | length > 0 + quiet: yes + when: + - git_user_email is defined + +- name: test if git_user_name is set correctly + assert: + that: + - git_user_name | length > 0 + quiet: yes + when: + - git_user_name is defined + +- name: test if git_repository_destination is set correctly + assert: + that: + - git_repository_destination is defined + - git_repository_destination | length > 0 + quiet: yes + +- name: test if git_force is set correctly + assert: + that: + - git_force is defined + - git_force | type_debug == "bool" + quiet: yes + +- name: test if git_repositories is set correctly + assert: + that: + - git_repositories | length > 0 + - git_repositories is iterable + quiet: yes + when: + - git_repositories is defined + +- name: test if item in git_repositories is set correctly + assert: + that: + - item.repo is defined + - item.repo | length > 0 + - item.dest is defined + - item.dest | length > 0 + quiet: yes + loop: "{{ git_repositories }}" + loop_control: + label: "{{ item.repo }}" + when: + - git_repositories is defined + +- name: test if item in git_repositories with version is set correctly + assert: + that: + - item.version | length > 0 + quiet: yes + when: + - git_repositories is defined + - item.version is defined + +- name: test if item in git_repositories with force is set correctly + assert: + that: + - item.version | type_debug == "bool" + quiet: yes + when: + - git_repositories is defined + - item.force is defined diff --git a/roles/git/tasks/main.yml b/roles/robertdebock.git/tasks/main.yml similarity index 92% rename from roles/git/tasks/main.yml rename to roles/robertdebock.git/tasks/main.yml index 59766c7..0437340 100644 --- a/roles/git/tasks/main.yml +++ b/roles/robertdebock.git/tasks/main.yml @@ -1,12 +1,12 @@ --- # tasks file for git +- name: include assert.yml + include_tasks: assert.yml + - name: install git package: name: "{{ git_packages }}" state: present - register: git_install_git - until: git_install_git is succeeded - retries: 3 - name: see if the specified user exists getent: @@ -22,6 +22,7 @@ state: directory owner: "{{ git_username | default(omit) }}" group: "{{ git_groupname | default(omit) }}" + mode: "0755" when: - getent_passwd is defined - getent_passwd[git_username] != none @@ -30,6 +31,7 @@ template: src: gitconfig.j2 dest: /home/{{ git_username }}/.gitconfig + mode: "0644" when: - git_user_email is defined - git_user_name is defined @@ -42,6 +44,7 @@ state: directory owner: "{{ git_username | default(omit) }}" group: "{{ git_groupname | default(omit) }}" + mode: "0750" when: - git_username is defined - git_repository_destination is defined @@ -54,7 +57,7 @@ accept_hostkey: yes version: "{{ item.version | default('HEAD') }}" force: "{{ item.force | default(git_force) }}" - with_items: "{{ git_repositories }}" + loop: "{{ git_repositories }}" become: yes become_user: "{{ git_username }}" when: diff --git a/roles/git/templates/gitconfig.j2 b/roles/robertdebock.git/templates/gitconfig.j2 similarity index 100% rename from roles/git/templates/gitconfig.j2 rename to roles/robertdebock.git/templates/gitconfig.j2 diff --git a/roles/robertdebock.git/tox.ini b/roles/robertdebock.git/tox.ini new file mode 100644 index 0000000..c1bc1d4 --- /dev/null +++ b/roles/robertdebock.git/tox.ini @@ -0,0 +1,26 @@ +# +# Ansible managed +# +[tox] +minversion = 3.7 +# Disabled "next" because of: +# https://github.com/ansible-community/molecule/issues/2626. +# envlist = py{38}-ansible-{previous,current,next} +envlist = py{38}-ansible-{previous,current} +skipsdist = true + +[testenv] +deps = + previous: ansible>=2.8, <2.9 + current: ansible>=2.9 + next: git+https://github.com/ansible/ansible.git@devel + molecule[lint]>=3, <4 + docker>=4.2, <4.3 +commands = molecule test +setenv = + TOX_ENVNAME={envname} + MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} + PY_COLORS=1 + ANSIBLE_FORCE_COLOR=1 + +passenv = namespace image tag diff --git a/roles/git/vars/main.yml b/roles/robertdebock.git/vars/main.yml similarity index 97% rename from roles/git/vars/main.yml rename to roles/robertdebock.git/vars/main.yml index 68dafa3..fbc7f01 100644 --- a/roles/git/vars/main.yml +++ b/roles/robertdebock.git/vars/main.yml @@ -1,4 +1,5 @@ --- # vars file for git + git_packages: - git diff --git a/roles/robertdebock.investigate/.ansible-lint b/roles/robertdebock.investigate/.ansible-lint new file mode 100644 index 0000000..cb2872e --- /dev/null +++ b/roles/robertdebock.investigate/.ansible-lint @@ -0,0 +1,7 @@ +# +# Ansible managed +# +exclude_paths: + - ./meta/preferences.yml + - ./molecule/default/verify.yml + - ./.tox diff --git a/roles/robertdebock.investigate/.github/FUNDING.yml b/roles/robertdebock.investigate/.github/FUNDING.yml new file mode 100644 index 0000000..67320f0 --- /dev/null +++ b/roles/robertdebock.investigate/.github/FUNDING.yml @@ -0,0 +1,2 @@ +--- +github: robertdebock diff --git a/roles/robertdebock.investigate/.github/ISSUE_TEMPLATE/bug_report.md b/roles/robertdebock.investigate/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..f39b5dc --- /dev/null +++ b/roles/robertdebock.investigate/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a report to help me improve + +--- + +## Describe the bug +A clear and concise description of what the bug is. + +## Playbook + +Please paste the playbook you are using. (Consider `requirements.yml` and +optionally the command you've invoked.) + + +```yaml +--- +YOUR PLAYBOOK HERE +``` + +## Output + +Show at least the error, possible related output, maybe just all the output. + +## Environment + +- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) +- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) +- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.investigate/.github/ISSUE_TEMPLATE/feature_request.md b/roles/robertdebock.investigate/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..55a93c4 --- /dev/null +++ b/roles/robertdebock.investigate/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +## Proposed feature + +A clear and concise description of what you want to happen. + +## Rationale + +Why is this feature required? + +## Additional context + +Add any other context about the feature request here. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/investigate/PULL_REQUEST_TEMPLATE.md b/roles/robertdebock.investigate/.github/pull_request_template.md similarity index 100% rename from roles/investigate/PULL_REQUEST_TEMPLATE.md rename to roles/robertdebock.investigate/.github/pull_request_template.md diff --git a/roles/investigate/.github/settings.yml b/roles/robertdebock.investigate/.github/settings.yml similarity index 100% rename from roles/investigate/.github/settings.yml rename to roles/robertdebock.investigate/.github/settings.yml diff --git a/roles/robertdebock.investigate/.github/workflows/galaxy.yml b/roles/robertdebock.investigate/.github/workflows/galaxy.yml new file mode 100644 index 0000000..9b30d38 --- /dev/null +++ b/roles/robertdebock.investigate/.github/workflows/galaxy.yml @@ -0,0 +1,22 @@ +--- +# +# Ansible managed +# + +name: Release to Ansible Galaxy + +on: + push: + tags: + - '*' + schedule: + - cron: '9 9 9 * *' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: galaxy + uses: robertdebock/galaxy-action@1.0.1 + with: + galaxy_api_key: ${{ secrets.galaxy_api_key }} diff --git a/roles/robertdebock.investigate/.github/workflows/molecule.yml b/roles/robertdebock.investigate/.github/workflows/molecule.yml new file mode 100644 index 0000000..293ac94 --- /dev/null +++ b/roles/robertdebock.investigate/.github/workflows/molecule.yml @@ -0,0 +1,78 @@ +--- +# +# Ansible managed +# + +name: Ansible Molecule + +on: + push: + tags_ignore: + - '*' + pull_request: + schedule: + - cron: '9 9 9 * *' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + command: lint + test: + needs: + - lint + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + config: + - image: "alpine" + tag: "latest" + - image: "alpine" + tag: "edge" + - image: "amazonlinux" + tag: "1" + - image: "centos" + tag: "7" + - image: "centos" + tag: "latest" + - image: "debian" + tag: "latest" + - image: "debian" + tag: "bullseye" + - image: "fedora" + tag: "31" + - image: "fedora" + tag: "latest" + - image: "opensuse" + tag: "latest" + - image: "ubuntu" + tag: "latest" + - image: "ubuntu" + tag: "bionic" + - image: "ubuntu" + tag: "xenial" + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: disable apparmor for mysql + run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + - name: parse apparmor for mysql + run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + image: ${{ matrix.config.image }} + tag: ${{ matrix.config.tag }} + options: "--parallel all" + env: + TOX_PARALLEL_NO_SPINNER: 1 diff --git a/roles/investigate/.gitignore b/roles/robertdebock.investigate/.gitignore similarity index 100% rename from roles/investigate/.gitignore rename to roles/robertdebock.investigate/.gitignore diff --git a/roles/robertdebock.investigate/.travis.yml b/roles/robertdebock.investigate/.travis.yml new file mode 100644 index 0000000..6554c75 --- /dev/null +++ b/roles/robertdebock.investigate/.travis.yml @@ -0,0 +1,50 @@ +--- +# +# Ansible managed +# +language: python + +os: linux +dist: xenial + +python: + - "3.8" + +services: + - docker + +env: + global: + namespace="robertdebock" + jobs: + - image="alpine" tag="latest" + - image="alpine" tag="edge" + - image="amazonlinux" tag="1" + - image="centos" tag="7" + - image="centos" tag="latest" + - image="debian" tag="latest" + - image="debian" tag="bullseye" + - image="fedora" tag="31" + - image="fedora" tag="latest" + - image="opensuse" tag="latest" + - image="ubuntu" tag="latest" + - image="ubuntu" tag="bionic" + - image="ubuntu" tag="xenial" + +cache: + - pip + +install: + - pip install --upgrade pip + - pip install tox + +script: + - function retry { counter=0 ; until "$@" ; do exit=$? ; counter=$(($counter + 1)) ; if [ $counter -ge 3 ] ; then return $exit ; fi ; done ; return 0; } ; retry tox --parallel all + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ + slack: + secure: "O+jAXGCoFcm3dX+w+Pydzo7kw6dg/o0P7kUoApUQ/QS7rskGXfkvrLaMV1TC1AWsct/OwDIwk2Fsm4BptgsYosJHrDNThhkgJGMcenEEsjpx4wUV8YC8AtI/m0h2THLtEtKL2SUAmGelbwWk6AV/3q+EZf8kTgZLBiD+SStFnMX/7mutEVLjDCuqbI4/lM2VHyUMeXdWg6Ymo0XsXXmGVpbnD7iBOj0e4ttaMGDC0omWx21uNwIgdx761I7KmPET35TM+kmlEYGVqLhF4P66HteHZxynFudmAbDBK6NJeYhiBL3lHn9tp3mB/vtyd2Nk2hXsdFW0ntKc1f5MBkahaXVltmI/NhTAtNkgi4DQm7DNlDhZBwBfWq9onON8SMjVkIAulf4ApQmAGKJramjsYUvL1atmq7AQQsZVlAcVUsB/XkAzigx7E7py3kXYF8iO7Pi0d62bMhOxdu9K6TNVQzx8m5S+ye0HlldSffdyleBRjWUhNy1hNaf40TDrBBash0RS3wWr0EBVtzzLJlryoaJCmqQbdt2YBreQ6HE6mCeEDR8wQRcBbDeFogYUnyIoO/iViiz4wSPIghyTKATOssI8+8IgtR3wERfz9v+dIaUQpFeBjqN0m1ThKB9gVTGztLKXY9CpzqZVq2Mnbz77fUuNI8fwGi9ijbyN6YCogOo=" + on_success: change + template: "%{result}: %{repository_slug}@%{branch}, build <%{build_url}|#%{build_number}> (<%{compare_url}|%{commit}>)" + email: false diff --git a/roles/robertdebock.investigate/.yamllint b/roles/robertdebock.investigate/.yamllint new file mode 100644 index 0000000..894450c --- /dev/null +++ b/roles/robertdebock.investigate/.yamllint @@ -0,0 +1,15 @@ +--- +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + line-length: disable + truthy: disable + +ignore: | + .tox/ diff --git a/roles/investigate/CODE_OF_CONDUCT.md b/roles/robertdebock.investigate/CODE_OF_CONDUCT.md similarity index 100% rename from roles/investigate/CODE_OF_CONDUCT.md rename to roles/robertdebock.investigate/CODE_OF_CONDUCT.md diff --git a/roles/robertdebock.investigate/CONTRIBUTING.md b/roles/robertdebock.investigate/CONTRIBUTING.md new file mode 100644 index 0000000..25b9bd9 --- /dev/null +++ b/roles/robertdebock.investigate/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# [Please contribute](#please-contribute) + +You can really make a difference by: + +- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) +- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. + +I'll try to help and take every contribution seriously. + +It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. + +## [Step by step](#step-by-step) + +Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. + +### [1. Make an issue.](#1-make-an-issue) + +When you spot an issue, [create an issue](https://github.com/robertdebock/ansible-role-investigate/issues). + +Making the issue help me and others to find similar problems in the future. + +### [2. Fork the project.](#2-fork-the-project) + +On the top right side of [the repository on GitHub](https://github.com/robertdebock/ansible-role-investigate), click `fork`. This copies everything to your GitHub namespace. + +### [3. Make the changes](#3-make-the-changes) + +In you own GitHub namespace, make the required changes. + +I typically do that by cloning the repository (in your namespace) locally: + +``` +git clone git@github.com:YOURNAMESPACE/ansible-role-investigate.git +``` + +Now you can start to edit on your laptop. + +### [4. Optionally: test your changes](#4-optionally-test-your-changes) + +Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): + +``` +pip install molecule tox ansible-lint docker +``` + +And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: + +``` +image=centos tag=7 molecule test +``` + +Once it start to work, you can test multiple version of Ansible: + +``` +image=centos tag=7 tox +``` + +### [5. Optionally: Regenerate all dynamic content](#5-optionally-regenerate-all-dynamic-content) + +You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. + +If you don't do it, I'll do it later for you. + +### [6. Make a pull request](#6-make-a-pull-request) + +[GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. + +In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. + +### [7. Wait](#7-wait) + +Now I'll get a message that you've added some code. Thank you, really. + +CI starts to test your changes. You can follow the progress on Travis. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.investigate/LICENSE b/roles/robertdebock.investigate/LICENSE new file mode 100644 index 0000000..bd15893 --- /dev/null +++ b/roles/robertdebock.investigate/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Robert de Bock (robert@meinit.nl) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/roles/investigate/README.md b/roles/robertdebock.investigate/README.md similarity index 55% rename from roles/investigate/README.md rename to roles/robertdebock.investigate/README.md index 6cf8dbc..c2205a2 100644 --- a/roles/investigate/README.md +++ b/roles/robertdebock.investigate/README.md @@ -1,15 +1,14 @@ -investigate -========= - -Ansible logo - Build status +# [investigate](#investigate) Install and configure investigation tools on your system. -Example Playbook ----------------- +|Travis|GitHub|Quality|Downloads|Version| +|------|------|-------|---------|-------| +|[![travis](https://travis-ci.com/robertdebock/ansible-role-investigate.svg?branch=master)](https://travis-ci.com/robertdebock/ansible-role-investigate)|[![github](https://github.com/robertdebock/ansible-role-investigate/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-investigate/actions)|[![quality](https://img.shields.io/ansible/quality/35590)](https://galaxy.ansible.com/robertdebock/investigate)|[![downloads](https://img.shields.io/ansible/role/d/35590)](https://galaxy.ansible.com/robertdebock/investigate)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-investigate.svg)](https://github.com/robertdebock/ansible-role-investigate/releases/)| -This example is taken from `molecule/resources/playbook.yml` and is tested on each push, pull request and release. +## [Example Playbook](#example-playbook) + +This example is taken from `molecule/resources/converge.yml` and is tested on each push, pull request and release. ```yaml --- - name: Converge @@ -18,10 +17,10 @@ This example is taken from `molecule/resources/playbook.yml` and is tested on ea gather_facts: yes roles: - - robertdebock.investigate + - role: robertdebock.investigate ``` -The machine you are running this on, may need to be prepared, I use this playbook to ensure everything is in place to let the role work. +The machine may need to be prepared using `molecule/resources/prepare.yml`: ```yaml --- - name: Prepare @@ -34,12 +33,23 @@ The machine you are running this on, may need to be prepared, I use this playboo - role: robertdebock.epel ``` +For verification `molecule/resources/verify.yml` runs after the role has been applied. +```yaml +--- +- name: Verify + hosts: all + become: yes + gather_facts: no + + tasks: + - name: check if connection still works + ping: +``` Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles. -Requirements ------------- +## [Requirements](#requirements) - Access to a repository containing packages, likely on the internet. - A recent version of Ansible. (Tests run on the current, previous and next release of Ansible.) @@ -53,47 +63,38 @@ The following roles can be installed to ensure all requirements are met, using ` ``` -Context -------- +## [Context](#context) This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information. Here is an overview of related roles: ![dependencies](https://raw.githubusercontent.com/robertdebock/drawings/artifacts/investigate.png "Dependency") +## [Compatibility](#compatibility) -Compatibility -------------- +This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): -This role has been tested on these [container images](https://hub.docker.com/): +|container|tags| +|---------|----| +|alpine|all| +|amazon|2018.03| +|el|7, 8| +|debian|buster, bullseye| +|fedora|31, 32| +|opensuse|all| +|ubuntu|focal, bionic, xenial| -|container|tag|allow_failures| -|---------|---|--------------| -|amazonlinux|1|no| -|amazonlinux|latest|no| -|alpine|latest|no| -|alpine|edge|yes| -|debian|unstable|yes| -|debian|latest|no| -|centos|7|no| -|centos|latest|no| -|fedora|latest|no| -|fedora|rawhide|yes| -|opensuse|latest|no| -|ubuntu|latest|no| +The minimum version of Ansible required is 2.8 but tests have been done to: -This role has been tested on these Ansible versions: - -- ansible>=2.8, <2.9 -- ansible>=2.9 -- git+https://github.com/ansible/ansible.git@devel +- The previous version, on version lower. +- The current version. +- The development version. -Testing -------- +## [Testing](#testing) -[Unit tests](https://travis-ci.org/robertdebock/ansible-role-investigate) are done on every commit, pull request, release and periodically. +[Unit tests](https://travis-ci.com/robertdebock/ansible-role-investigate) are done on every commit, pull request, release and periodically. If you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-investigate/issues) @@ -125,23 +126,13 @@ image="centos" tox image="debian" tag="stable" tox ``` -Modules -------- - -This role uses the following modules: -```yaml ---- -- package -- service -``` - -License -------- +## [License](#license) Apache-2.0 -Author Information ------------------- +## [Author Information](#author-information) [Robert de Bock](https://robertdebock.nl/) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/investigate/SECURITY.md b/roles/robertdebock.investigate/SECURITY.md similarity index 76% rename from roles/investigate/SECURITY.md rename to roles/robertdebock.investigate/SECURITY.md index fdab03f..3ae21e0 100644 --- a/roles/investigate/SECURITY.md +++ b/roles/robertdebock.investigate/SECURITY.md @@ -1,8 +1,8 @@ -# Security Policy +# [Security Policy](#security-policy) This software implements other software, it's not very likely that this software introduces new vulnerabilities. -## Supported Versions +## [Supported Versions](#supported-versions) The current major version is supported. For example if the current version is 3.4.1: @@ -14,10 +14,12 @@ The current major version is supported. For example if the current version is 3. | 2.0.0 | :x: | | 1.0.0 | :x: | -## Reporting a Vulnerability +## [Reporting a Vulnerability](#reporting-a-vulnarability) Please [open an issue](https://github.com/robertdebock/ansible-role-investigate/issues) describing the vulnerability. Tell them where to go, how often they can expect to get an update on a reported vulnerability, what to expect if the vulnerability is accepted or declined, etc. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.investigate/meta/.galaxy_install_info b/roles/robertdebock.investigate/meta/.galaxy_install_info new file mode 100644 index 0000000..575f104 --- /dev/null +++ b/roles/robertdebock.investigate/meta/.galaxy_install_info @@ -0,0 +1,2 @@ +install_date: Mon Sep 28 09:36:53 2020 +version: 2.3.4 diff --git a/roles/investigate/meta/main.yml b/roles/robertdebock.investigate/meta/main.yml similarity index 81% rename from roles/investigate/meta/main.yml rename to roles/robertdebock.investigate/meta/main.yml index 63eed57..8024993 100644 --- a/roles/investigate/meta/main.yml +++ b/roles/robertdebock.investigate/meta/main.yml @@ -8,37 +8,35 @@ galaxy_info: min_ansible_version: 2.8 platforms: - - name: Amazon - versions: - - all - name: Alpine versions: - all - - name: ArchLinux + - name: Amazon versions: - - all - - name: Debian - versions: - - all + - 2018.03 - name: EL versions: - 7 - 8 + - name: Debian + versions: + - buster + - bullseye - name: Fedora versions: - - all + - 31 + - 32 - name: OpenSUSE versions: - all - name: Ubuntu versions: - - artful + - focal - bionic + - xenial galaxy_tags: - investigate - - archlinux - centos - - rhel dependencies: [] diff --git a/roles/robertdebock.investigate/meta/preferences.yml b/roles/robertdebock.investigate/meta/preferences.yml new file mode 100644 index 0000000..e7fdebf --- /dev/null +++ b/roles/robertdebock.investigate/meta/preferences.yml @@ -0,0 +1,2 @@ +--- +tox_parallel: yes diff --git a/roles/robertdebock.investigate/molecule/default/converge.yml b/roles/robertdebock.investigate/molecule/default/converge.yml new file mode 100644 index 0000000..aa0165a --- /dev/null +++ b/roles/robertdebock.investigate/molecule/default/converge.yml @@ -0,0 +1,8 @@ +--- +- name: Converge + hosts: all + become: yes + gather_facts: yes + + roles: + - role: ansible-role-investigate diff --git a/roles/investigate/molecule/default/molecule.yml b/roles/robertdebock.investigate/molecule/default/molecule.yml similarity index 73% rename from roles/investigate/molecule/default/molecule.yml rename to roles/robertdebock.investigate/molecule/default/molecule.yml index 6b3973f..92acbce 100644 --- a/roles/investigate/molecule/default/molecule.yml +++ b/roles/robertdebock.investigate/molecule/default/molecule.yml @@ -6,8 +6,9 @@ dependency: name: galaxy options: role-file: requirements.yml -lint: - name: yamllint +lint: | + set -e + yamllint . driver: name: docker platforms: @@ -20,5 +21,9 @@ platforms: pre_build_image: yes provisioner: name: ansible -scenario: - name: default + config_options: + defaults: + stdout_callback: yaml + bin_ansible_callbacks: yes +verifier: + name: ansible diff --git a/roles/fail2ban/molecule/default/prepare.yml b/roles/robertdebock.investigate/molecule/default/prepare.yml similarity index 53% rename from roles/fail2ban/molecule/default/prepare.yml rename to roles/robertdebock.investigate/molecule/default/prepare.yml index d61fdfb..c8572a5 100644 --- a/roles/fail2ban/molecule/default/prepare.yml +++ b/roles/robertdebock.investigate/molecule/default/prepare.yml @@ -5,5 +5,5 @@ become: yes roles: - - robertdebock.bootstrap - - robertdebock.epel + - role: robertdebock.bootstrap + - role: robertdebock.epel diff --git a/roles/robertdebock.investigate/molecule/default/verify.yml b/roles/robertdebock.investigate/molecule/default/verify.yml new file mode 100644 index 0000000..b9dc6f8 --- /dev/null +++ b/roles/robertdebock.investigate/molecule/default/verify.yml @@ -0,0 +1,9 @@ +--- +- name: Verify + hosts: all + become: yes + gather_facts: no + + tasks: + - name: check if connection still works + ping: diff --git a/roles/investigate/requirements.yml b/roles/robertdebock.investigate/requirements.yml similarity index 100% rename from roles/investigate/requirements.yml rename to roles/robertdebock.investigate/requirements.yml diff --git a/roles/investigate/tasks/main.yml b/roles/robertdebock.investigate/tasks/main.yml similarity index 55% rename from roles/investigate/tasks/main.yml rename to roles/robertdebock.investigate/tasks/main.yml index 7378c6a..632aed7 100644 --- a/roles/investigate/tasks/main.yml +++ b/roles/robertdebock.investigate/tasks/main.yml @@ -4,6 +4,3 @@ package: name: "{{ investigate_packages }}" state: present - register: investigate_install_investigate - until: investigate_install_investigate is succeeded - retries: 3 diff --git a/roles/robertdebock.investigate/tox.ini b/roles/robertdebock.investigate/tox.ini new file mode 100644 index 0000000..c1bc1d4 --- /dev/null +++ b/roles/robertdebock.investigate/tox.ini @@ -0,0 +1,26 @@ +# +# Ansible managed +# +[tox] +minversion = 3.7 +# Disabled "next" because of: +# https://github.com/ansible-community/molecule/issues/2626. +# envlist = py{38}-ansible-{previous,current,next} +envlist = py{38}-ansible-{previous,current} +skipsdist = true + +[testenv] +deps = + previous: ansible>=2.8, <2.9 + current: ansible>=2.9 + next: git+https://github.com/ansible/ansible.git@devel + molecule[lint]>=3, <4 + docker>=4.2, <4.3 +commands = molecule test +setenv = + TOX_ENVNAME={envname} + MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} + PY_COLORS=1 + ANSIBLE_FORCE_COLOR=1 + +passenv = namespace image tag diff --git a/roles/investigate/vars/main.yml b/roles/robertdebock.investigate/vars/main.yml similarity index 85% rename from roles/investigate/vars/main.yml rename to roles/robertdebock.investigate/vars/main.yml index 83b6869..deb921e 100644 --- a/roles/investigate/vars/main.yml +++ b/roles/robertdebock.investigate/vars/main.yml @@ -1,5 +1,6 @@ --- # vars file for investigate + _investigate_packages: Alpine: - net-tools @@ -9,13 +10,6 @@ _investigate_packages: - bash-completion - curl - screen - Archlinux: - - net-tools - - tcpdump - - bash - - bash-completion - - curl - - screen Debian: - net-tools - tcpdump diff --git a/roles/robertdebock.molecule/.ansible-lint b/roles/robertdebock.molecule/.ansible-lint new file mode 100644 index 0000000..eba57d1 --- /dev/null +++ b/roles/robertdebock.molecule/.ansible-lint @@ -0,0 +1,8 @@ +# +# Ansible managed +# +exclude_paths: + - ./meta/exception.yml + - ./meta/preferences.yml + - ./molecule/default/verify.yml + - ./.tox diff --git a/roles/robertdebock.molecule/.github/FUNDING.yml b/roles/robertdebock.molecule/.github/FUNDING.yml new file mode 100644 index 0000000..67320f0 --- /dev/null +++ b/roles/robertdebock.molecule/.github/FUNDING.yml @@ -0,0 +1,2 @@ +--- +github: robertdebock diff --git a/roles/robertdebock.molecule/.github/ISSUE_TEMPLATE/bug_report.md b/roles/robertdebock.molecule/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..f39b5dc --- /dev/null +++ b/roles/robertdebock.molecule/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a report to help me improve + +--- + +## Describe the bug +A clear and concise description of what the bug is. + +## Playbook + +Please paste the playbook you are using. (Consider `requirements.yml` and +optionally the command you've invoked.) + + +```yaml +--- +YOUR PLAYBOOK HERE +``` + +## Output + +Show at least the error, possible related output, maybe just all the output. + +## Environment + +- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) +- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) +- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.molecule/.github/ISSUE_TEMPLATE/feature_request.md b/roles/robertdebock.molecule/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..55a93c4 --- /dev/null +++ b/roles/robertdebock.molecule/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +## Proposed feature + +A clear and concise description of what you want to happen. + +## Rationale + +Why is this feature required? + +## Additional context + +Add any other context about the feature request here. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/molecule/PULL_REQUEST_TEMPLATE.md b/roles/robertdebock.molecule/.github/pull_request_template.md similarity index 100% rename from roles/molecule/PULL_REQUEST_TEMPLATE.md rename to roles/robertdebock.molecule/.github/pull_request_template.md diff --git a/roles/molecule/.github/settings.yml b/roles/robertdebock.molecule/.github/settings.yml similarity index 100% rename from roles/molecule/.github/settings.yml rename to roles/robertdebock.molecule/.github/settings.yml diff --git a/roles/robertdebock.molecule/.github/workflows/galaxy.yml b/roles/robertdebock.molecule/.github/workflows/galaxy.yml new file mode 100644 index 0000000..28dbf05 --- /dev/null +++ b/roles/robertdebock.molecule/.github/workflows/galaxy.yml @@ -0,0 +1,22 @@ +--- +# +# Ansible managed +# + +name: Release to Ansible Galaxy + +on: + push: + tags: + - '*' + schedule: + - cron: '13 13 13 * *' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: galaxy + uses: robertdebock/galaxy-action@1.0.1 + with: + galaxy_api_key: ${{ secrets.galaxy_api_key }} diff --git a/roles/robertdebock.molecule/.github/workflows/molecule.yml b/roles/robertdebock.molecule/.github/workflows/molecule.yml new file mode 100644 index 0000000..6e2539b --- /dev/null +++ b/roles/robertdebock.molecule/.github/workflows/molecule.yml @@ -0,0 +1,68 @@ +--- +# +# Ansible managed +# + +name: Ansible Molecule + +on: + push: + tags_ignore: + - '*' + pull_request: + schedule: + - cron: '13 13 13 * *' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + command: lint + test: + needs: + - lint + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + config: + - image: "alpine" + tag: "latest" + - image: "alpine" + tag: "edge" + - image: "centos" + tag: "latest" + - image: "debian" + tag: "latest" + - image: "debian" + tag: "bullseye" + - image: "fedora" + tag: "31" + - image: "fedora" + tag: "latest" + - image: "ubuntu" + tag: "latest" + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: disable apparmor for mysql + run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + - name: parse apparmor for mysql + run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + image: ${{ matrix.config.image }} + tag: ${{ matrix.config.tag }} + options: "--parallel all" + env: + TOX_PARALLEL_NO_SPINNER: 1 diff --git a/roles/molecule/.gitignore b/roles/robertdebock.molecule/.gitignore similarity index 100% rename from roles/molecule/.gitignore rename to roles/robertdebock.molecule/.gitignore diff --git a/roles/robertdebock.molecule/.travis.yml b/roles/robertdebock.molecule/.travis.yml new file mode 100644 index 0000000..27efa49 --- /dev/null +++ b/roles/robertdebock.molecule/.travis.yml @@ -0,0 +1,45 @@ +--- +# +# Ansible managed +# +language: python + +os: linux +dist: xenial + +python: + - "3.8" + +services: + - docker + +env: + global: + namespace="robertdebock" + jobs: + - image="alpine" tag="latest" + - image="alpine" tag="edge" + - image="centos" tag="latest" + - image="debian" tag="latest" + - image="debian" tag="bullseye" + - image="fedora" tag="31" + - image="fedora" tag="latest" + - image="ubuntu" tag="latest" + +cache: + - pip + +install: + - pip install --upgrade pip + - pip install tox + +script: + - function retry { counter=0 ; until "$@" ; do exit=$? ; counter=$(($counter + 1)) ; if [ $counter -ge 3 ] ; then return $exit ; fi ; done ; return 0; } ; retry tox --parallel all + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ + slack: + secure: "Ts8B1BCjhczQMFq7kXpLn13HfMEYQSH9gIF1yy5U8k9lqqRBLlRpUIIJITsYYEAAnOERwV/BD/UKV3Qy3/7fFsDjQuuxeIqpn3Dc2Lxyz7IGTTcPJ2FDUmYpvkY8dTKT01gGDmqZgZEI94bnThypKm5zpvxb43PyqEOyyrO9uNHc4UZlGCoDwCynZKV9BMGlrsLjHV8gYP1EoJKAMUlwdRNYf1eFyhC80ZvY2Xj2qVXxDs9Zrr/fI6prfPp8HCoWJVA2IwMqZk5bnCneU2a6+fR0ArCw99rMcpe4mnre3RCKCOhg2o2rNtqN0GBHcOLFgNJx+n1tcyPn/apmgVfyTDcRIDA31u5itEtc7rLKrOUsiQHbPahgrE8yrSaHSroPc3FWCwm29rWVp4OnTbu0izfjiSTUAEsXMPHQ5yEzlzjYYD3+7HHGHsy6mRjBEknIYAeVje9S+WG8CaoxJt/E/QbDn5s0MSnd0ixzZ8rX9QwwG8xf+yXtkNxcsUWWooOpt++pqQLWUM5wqg4p1YtkBoXfWRxoG954ZiSjpI1V1FMaiBVMM2NZkQydsF+1C596P3z+oXMg5t3ZP40VVDYM2CRLNBGVNtV/db03iXULoj7BYiEttwf4RMa1dtvpz60gggE/ywF9Gzr/yOWvajr32fqhvDoDUsfhrNQgVhi3hq8=" + on_success: change + template: "%{result}: %{repository_slug}@%{branch}, build <%{build_url}|#%{build_number}> (<%{compare_url}|%{commit}>)" + email: false diff --git a/roles/robertdebock.molecule/.yamllint b/roles/robertdebock.molecule/.yamllint new file mode 100644 index 0000000..894450c --- /dev/null +++ b/roles/robertdebock.molecule/.yamllint @@ -0,0 +1,15 @@ +--- +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + line-length: disable + truthy: disable + +ignore: | + .tox/ diff --git a/roles/molecule/CODE_OF_CONDUCT.md b/roles/robertdebock.molecule/CODE_OF_CONDUCT.md similarity index 100% rename from roles/molecule/CODE_OF_CONDUCT.md rename to roles/robertdebock.molecule/CODE_OF_CONDUCT.md diff --git a/roles/robertdebock.molecule/CONTRIBUTING.md b/roles/robertdebock.molecule/CONTRIBUTING.md new file mode 100644 index 0000000..1c48058 --- /dev/null +++ b/roles/robertdebock.molecule/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# [Please contribute](#please-contribute) + +You can really make a difference by: + +- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) +- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. + +I'll try to help and take every contribution seriously. + +It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. + +## [Step by step](#step-by-step) + +Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. + +### [1. Make an issue.](#1-make-an-issue) + +When you spot an issue, [create an issue](https://github.com/robertdebock/ansible-role-molecule/issues). + +Making the issue help me and others to find similar problems in the future. + +### [2. Fork the project.](#2-fork-the-project) + +On the top right side of [the repository on GitHub](https://github.com/robertdebock/ansible-role-molecule), click `fork`. This copies everything to your GitHub namespace. + +### [3. Make the changes](#3-make-the-changes) + +In you own GitHub namespace, make the required changes. + +I typically do that by cloning the repository (in your namespace) locally: + +``` +git clone git@github.com:YOURNAMESPACE/ansible-role-molecule.git +``` + +Now you can start to edit on your laptop. + +### [4. Optionally: test your changes](#4-optionally-test-your-changes) + +Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): + +``` +pip install molecule tox ansible-lint docker +``` + +And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: + +``` +image=centos tag=7 molecule test +``` + +Once it start to work, you can test multiple version of Ansible: + +``` +image=centos tag=7 tox +``` + +### [5. Optionally: Regenerate all dynamic content](#5-optionally-regenerate-all-dynamic-content) + +You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. + +If you don't do it, I'll do it later for you. + +### [6. Make a pull request](#6-make-a-pull-request) + +[GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. + +In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. + +### [7. Wait](#7-wait) + +Now I'll get a message that you've added some code. Thank you, really. + +CI starts to test your changes. You can follow the progress on Travis. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.molecule/LICENSE b/roles/robertdebock.molecule/LICENSE new file mode 100644 index 0000000..bd15893 --- /dev/null +++ b/roles/robertdebock.molecule/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Robert de Bock (robert@meinit.nl) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/roles/molecule/README.md b/roles/robertdebock.molecule/README.md similarity index 60% rename from roles/molecule/README.md rename to roles/robertdebock.molecule/README.md index 6343538..1af5cbd 100644 --- a/roles/molecule/README.md +++ b/roles/robertdebock.molecule/README.md @@ -1,15 +1,14 @@ -molecule -========= - -Ansible logo - Build status +# [molecule](#molecule) Install Molecule on your system. -Example Playbook ----------------- +|Travis|GitHub|Quality|Downloads|Version| +|------|------|-------|---------|-------| +|[![travis](https://travis-ci.com/robertdebock/ansible-role-molecule.svg?branch=master)](https://travis-ci.com/robertdebock/ansible-role-molecule)|[![github](https://github.com/robertdebock/ansible-role-molecule/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-molecule/actions)|[![quality](https://img.shields.io/ansible/quality/35945)](https://galaxy.ansible.com/robertdebock/molecule)|[![downloads](https://img.shields.io/ansible/role/d/35945)](https://galaxy.ansible.com/robertdebock/molecule)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-molecule.svg)](https://github.com/robertdebock/ansible-role-molecule/releases/)| -This example is taken from `molecule/resources/playbook.yml` and is tested on each push, pull request and release. +## [Example Playbook](#example-playbook) + +This example is taken from `molecule/resources/converge.yml` and is tested on each push, pull request and release. ```yaml --- - name: Converge @@ -18,10 +17,10 @@ This example is taken from `molecule/resources/playbook.yml` and is tested on ea gather_facts: yes roles: - - robertdebock.molecule + - role: robertdebock.molecule ``` -The machine you are running this on, may need to be prepared, I use this playbook to ensure everything is in place to let the role work. +The machine may need to be prepared using `molecule/resources/prepare.yml`: ```yaml --- - name: Prepare @@ -36,23 +35,34 @@ The machine you are running this on, may need to be prepared, I use this playboo - role: robertdebock.python_pip ``` +For verification `molecule/resources/verify.yml` runs after the role has been applied. +```yaml +--- +- name: Verify + hosts: all + become: yes + gather_facts: no + + tasks: + - name: check if connection still works + ping: +``` Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles. -Role Variables --------------- +## [Role Variables](#role-variables) These variables are set in `defaults/main.yml`: ```yaml --- # defaults file for molecule + # If you need to give extra options to pip, use `molecule_extra_args`. For # example: # molecule_extra_args: "--user" ``` -Requirements ------------- +## [Requirements](#requirements) - Access to a repository containing packages, likely on the internet. - A recent version of Ansible. (Tests run on the current, previous and next release of Ansible.) @@ -68,39 +78,32 @@ The following roles can be installed to ensure all requirements are met, using ` ``` -Context -------- +## [Context](#context) This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information. Here is an overview of related roles: ![dependencies](https://raw.githubusercontent.com/robertdebock/drawings/artifacts/molecule.png "Dependency") +## [Compatibility](#compatibility) -Compatibility -------------- +This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): -This role has been tested on these [container images](https://hub.docker.com/): +|container|tags| +|---------|----| +|alpine|all| +|el|8| +|debian|buster, bullseye| +|fedora|31, 32| +|ubuntu|focal| -|container|tag|allow_failures| -|---------|---|--------------| -|alpine|latest|no| -|alpine|edge|yes| -|debian|unstable|yes| -|debian|latest|no| -|centos|latest|no| -|fedora|latest|no| -|fedora|rawhide|yes| -|opensuse|latest|no| +The minimum version of Ansible required is 2.8 but tests have been done to: -This role has been tested on these Ansible versions: +- The previous version, on version lower. +- The current version. +- The development version. -- ansible>=2.8, <2.9 -- ansible>=2.9 -- git+https://github.com/ansible/ansible.git@devel - -Exceptions ----------- +## [Exceptions](#exceptions) Some variarations of the build matrix do not work. These are the variations and reasons why the build won't work: @@ -108,13 +111,12 @@ Some variarations of the build matrix do not work. These are the variations and |---------------------------|------------------------| | CentOS 7 | error in click-completion setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers | | amazonlinux | Dependency (python_pip) not available | -| ubuntu | Not idempotent on install stratis | +| opensuse | UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 13: ordinal not in range(128) | -Testing -------- +## [Testing](#testing) -[Unit tests](https://travis-ci.org/robertdebock/ansible-role-molecule) are done on every commit, pull request, release and periodically. +[Unit tests](https://travis-ci.com/robertdebock/ansible-role-molecule) are done on every commit, pull request, release and periodically. If you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-molecule/issues) @@ -146,23 +148,13 @@ image="centos" tox image="debian" tag="stable" tox ``` -Modules -------- - -This role uses the following modules: -```yaml ---- -- package -- pip -``` - -License -------- +## [License](#license) Apache-2.0 -Author Information ------------------- +## [Author Information](#author-information) [Robert de Bock](https://robertdebock.nl/) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/molecule/SECURITY.md b/roles/robertdebock.molecule/SECURITY.md similarity index 76% rename from roles/molecule/SECURITY.md rename to roles/robertdebock.molecule/SECURITY.md index 81820fe..c628a5d 100644 --- a/roles/molecule/SECURITY.md +++ b/roles/robertdebock.molecule/SECURITY.md @@ -1,8 +1,8 @@ -# Security Policy +# [Security Policy](#security-policy) This software implements other software, it's not very likely that this software introduces new vulnerabilities. -## Supported Versions +## [Supported Versions](#supported-versions) The current major version is supported. For example if the current version is 3.4.1: @@ -14,10 +14,12 @@ The current major version is supported. For example if the current version is 3. | 2.0.0 | :x: | | 1.0.0 | :x: | -## Reporting a Vulnerability +## [Reporting a Vulnerability](#reporting-a-vulnarability) Please [open an issue](https://github.com/robertdebock/ansible-role-molecule/issues) describing the vulnerability. Tell them where to go, how often they can expect to get an update on a reported vulnerability, what to expect if the vulnerability is accepted or declined, etc. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/molecule/defaults/main.yml b/roles/robertdebock.molecule/defaults/main.yml similarity index 99% rename from roles/molecule/defaults/main.yml rename to roles/robertdebock.molecule/defaults/main.yml index 7605a69..b115b32 100644 --- a/roles/molecule/defaults/main.yml +++ b/roles/robertdebock.molecule/defaults/main.yml @@ -1,5 +1,6 @@ --- # defaults file for molecule + # If you need to give extra options to pip, use `molecule_extra_args`. For # example: # molecule_extra_args: "--user" diff --git a/roles/robertdebock.molecule/meta/.galaxy_install_info b/roles/robertdebock.molecule/meta/.galaxy_install_info new file mode 100644 index 0000000..dccbe9e --- /dev/null +++ b/roles/robertdebock.molecule/meta/.galaxy_install_info @@ -0,0 +1,2 @@ +install_date: Mon Sep 28 09:36:55 2020 +version: 2.3.1 diff --git a/roles/molecule/meta/exception.yml b/roles/robertdebock.molecule/meta/exception.yml similarity index 67% rename from roles/molecule/meta/exception.yml rename to roles/robertdebock.molecule/meta/exception.yml index 9e8a710..f51abd1 100644 --- a/roles/molecule/meta/exception.yml +++ b/roles/robertdebock.molecule/meta/exception.yml @@ -4,5 +4,5 @@ exceptions: reason: "error in click-completion setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers" - variation: amazonlinux reason: Dependency (python_pip) not available - - variation: ubuntu - reason: "Not idempotent on install stratis" + - variation: opensuse + reason: "UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 13: ordinal not in range(128)" diff --git a/roles/molecule/meta/main.yml b/roles/robertdebock.molecule/meta/main.yml similarity index 75% rename from roles/molecule/meta/main.yml rename to roles/robertdebock.molecule/meta/main.yml index a67cfd5..982543d 100644 --- a/roles/molecule/meta/main.yml +++ b/roles/robertdebock.molecule/meta/main.yml @@ -11,26 +11,23 @@ galaxy_info: - name: Alpine versions: - all - - name: ArchLinux - versions: - - all - - name: Debian - versions: - - all - name: EL versions: - 8 + - name: Debian + versions: + - buster + - bullseye - name: Fedora versions: - - all - - name: OpenSUSE + - 31 + - 32 + - name: Ubuntu versions: - - all + - focal galaxy_tags: - molecule - - archlinux - centos - - rhel dependencies: [] diff --git a/roles/robertdebock.molecule/meta/preferences.yml b/roles/robertdebock.molecule/meta/preferences.yml new file mode 100644 index 0000000..e7fdebf --- /dev/null +++ b/roles/robertdebock.molecule/meta/preferences.yml @@ -0,0 +1,2 @@ +--- +tox_parallel: yes diff --git a/roles/robertdebock.molecule/molecule/default/converge.yml b/roles/robertdebock.molecule/molecule/default/converge.yml new file mode 100644 index 0000000..f62959c --- /dev/null +++ b/roles/robertdebock.molecule/molecule/default/converge.yml @@ -0,0 +1,8 @@ +--- +- name: Converge + hosts: all + become: yes + gather_facts: yes + + roles: + - role: ansible-role-molecule diff --git a/roles/molecule/molecule/default/molecule.yml b/roles/robertdebock.molecule/molecule/default/molecule.yml similarity index 73% rename from roles/molecule/molecule/default/molecule.yml rename to roles/robertdebock.molecule/molecule/default/molecule.yml index af4a783..2a8a642 100644 --- a/roles/molecule/molecule/default/molecule.yml +++ b/roles/robertdebock.molecule/molecule/default/molecule.yml @@ -6,8 +6,9 @@ dependency: name: galaxy options: role-file: requirements.yml -lint: - name: yamllint +lint: | + set -e + yamllint . driver: name: docker platforms: @@ -20,5 +21,9 @@ platforms: pre_build_image: yes provisioner: name: ansible -scenario: - name: default + config_options: + defaults: + stdout_callback: yaml + bin_ansible_callbacks: yes +verifier: + name: ansible diff --git a/roles/molecule/molecule/default/prepare.yml b/roles/robertdebock.molecule/molecule/default/prepare.yml similarity index 100% rename from roles/molecule/molecule/default/prepare.yml rename to roles/robertdebock.molecule/molecule/default/prepare.yml diff --git a/roles/robertdebock.molecule/molecule/default/verify.yml b/roles/robertdebock.molecule/molecule/default/verify.yml new file mode 100644 index 0000000..b9dc6f8 --- /dev/null +++ b/roles/robertdebock.molecule/molecule/default/verify.yml @@ -0,0 +1,9 @@ +--- +- name: Verify + hosts: all + become: yes + gather_facts: no + + tasks: + - name: check if connection still works + ping: diff --git a/roles/ansible/requirements.yml b/roles/robertdebock.molecule/requirements.yml similarity index 100% rename from roles/ansible/requirements.yml rename to roles/robertdebock.molecule/requirements.yml index 0c03c19..2fd552b 100644 --- a/roles/ansible/requirements.yml +++ b/roles/robertdebock.molecule/requirements.yml @@ -1,5 +1,5 @@ --- - robertdebock.bootstrap -- robertdebock.epel - robertdebock.buildtools +- robertdebock.epel - robertdebock.python_pip diff --git a/roles/robertdebock.molecule/tasks/assert.yml b/roles/robertdebock.molecule/tasks/assert.yml new file mode 100644 index 0000000..034e0fd --- /dev/null +++ b/roles/robertdebock.molecule/tasks/assert.yml @@ -0,0 +1,8 @@ +--- +- name: test if molecule_extra_args is set correctly + assert: + that: + - molecule_extra_args | length > 0 + quiet: yes + when: + - molecule_extra_args is defined diff --git a/roles/molecule/tasks/main.yml b/roles/robertdebock.molecule/tasks/main.yml similarity index 54% rename from roles/molecule/tasks/main.yml rename to roles/robertdebock.molecule/tasks/main.yml index d124dd9..fd74a34 100644 --- a/roles/molecule/tasks/main.yml +++ b/roles/robertdebock.molecule/tasks/main.yml @@ -1,19 +1,16 @@ --- # tasks file for molecule +- name: include assert.yml + include_tasks: assert.yml + - name: install requirements package: name: "{{ molecule_requirements }}" state: present - register: molecule_install_requirements - until: molecule_install_requirements is succeeded - retries: 3 - become: true + become: yes - name: install molecule pip: name: molecule state: present extra_args: "{{ molecule_extra_args | default(omit) }}" - register: molecule_install_molecule - until: molecule_install_molecule is succeeded - retries: 3 diff --git a/roles/robertdebock.molecule/tox.ini b/roles/robertdebock.molecule/tox.ini new file mode 100644 index 0000000..c1bc1d4 --- /dev/null +++ b/roles/robertdebock.molecule/tox.ini @@ -0,0 +1,26 @@ +# +# Ansible managed +# +[tox] +minversion = 3.7 +# Disabled "next" because of: +# https://github.com/ansible-community/molecule/issues/2626. +# envlist = py{38}-ansible-{previous,current,next} +envlist = py{38}-ansible-{previous,current} +skipsdist = true + +[testenv] +deps = + previous: ansible>=2.8, <2.9 + current: ansible>=2.9 + next: git+https://github.com/ansible/ansible.git@devel + molecule[lint]>=3, <4 + docker>=4.2, <4.3 +commands = molecule test +setenv = + TOX_ENVNAME={envname} + MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} + PY_COLORS=1 + ANSIBLE_FORCE_COLOR=1 + +passenv = namespace image tag diff --git a/roles/molecule/vars/main.yml b/roles/robertdebock.molecule/vars/main.yml similarity index 95% rename from roles/molecule/vars/main.yml rename to roles/robertdebock.molecule/vars/main.yml index 68ebfb2..90a172e 100644 --- a/roles/molecule/vars/main.yml +++ b/roles/robertdebock.molecule/vars/main.yml @@ -1,9 +1,8 @@ --- # vars file for molecule + _molecule_requirements: default: [] - Archlinux: - - bash Alpine: - linux-headers CentOS-7: diff --git a/roles/robertdebock.postfix/.ansible-lint b/roles/robertdebock.postfix/.ansible-lint new file mode 100644 index 0000000..eba57d1 --- /dev/null +++ b/roles/robertdebock.postfix/.ansible-lint @@ -0,0 +1,8 @@ +# +# Ansible managed +# +exclude_paths: + - ./meta/exception.yml + - ./meta/preferences.yml + - ./molecule/default/verify.yml + - ./.tox diff --git a/roles/robertdebock.postfix/.github/FUNDING.yml b/roles/robertdebock.postfix/.github/FUNDING.yml new file mode 100644 index 0000000..67320f0 --- /dev/null +++ b/roles/robertdebock.postfix/.github/FUNDING.yml @@ -0,0 +1,2 @@ +--- +github: robertdebock diff --git a/roles/robertdebock.postfix/.github/ISSUE_TEMPLATE/bug_report.md b/roles/robertdebock.postfix/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..f39b5dc --- /dev/null +++ b/roles/robertdebock.postfix/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a report to help me improve + +--- + +## Describe the bug +A clear and concise description of what the bug is. + +## Playbook + +Please paste the playbook you are using. (Consider `requirements.yml` and +optionally the command you've invoked.) + + +```yaml +--- +YOUR PLAYBOOK HERE +``` + +## Output + +Show at least the error, possible related output, maybe just all the output. + +## Environment + +- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) +- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) +- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.postfix/.github/ISSUE_TEMPLATE/feature_request.md b/roles/robertdebock.postfix/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..55a93c4 --- /dev/null +++ b/roles/robertdebock.postfix/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +## Proposed feature + +A clear and concise description of what you want to happen. + +## Rationale + +Why is this feature required? + +## Additional context + +Add any other context about the feature request here. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/postfix/PULL_REQUEST_TEMPLATE.md b/roles/robertdebock.postfix/.github/pull_request_template.md similarity index 100% rename from roles/postfix/PULL_REQUEST_TEMPLATE.md rename to roles/robertdebock.postfix/.github/pull_request_template.md diff --git a/roles/postfix/.github/settings.yml b/roles/robertdebock.postfix/.github/settings.yml similarity index 100% rename from roles/postfix/.github/settings.yml rename to roles/robertdebock.postfix/.github/settings.yml diff --git a/roles/robertdebock.postfix/.github/workflows/galaxy.yml b/roles/robertdebock.postfix/.github/workflows/galaxy.yml new file mode 100644 index 0000000..cca8501 --- /dev/null +++ b/roles/robertdebock.postfix/.github/workflows/galaxy.yml @@ -0,0 +1,22 @@ +--- +# +# Ansible managed +# + +name: Release to Ansible Galaxy + +on: + push: + tags: + - '*' + schedule: + - cron: '16 16 16 * *' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: galaxy + uses: robertdebock/galaxy-action@1.0.1 + with: + galaxy_api_key: ${{ secrets.galaxy_api_key }} diff --git a/roles/robertdebock.postfix/.github/workflows/molecule.yml b/roles/robertdebock.postfix/.github/workflows/molecule.yml new file mode 100644 index 0000000..3c0e769 --- /dev/null +++ b/roles/robertdebock.postfix/.github/workflows/molecule.yml @@ -0,0 +1,72 @@ +--- +# +# Ansible managed +# + +name: Ansible Molecule + +on: + push: + tags_ignore: + - '*' + pull_request: + schedule: + - cron: '16 16 16 * *' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + command: lint + test: + needs: + - lint + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + config: + - image: "amazonlinux" + tag: "1" + - image: "centos" + tag: "7" + - image: "centos" + tag: "latest" + - image: "debian" + tag: "latest" + - image: "debian" + tag: "bullseye" + - image: "fedora" + tag: "31" + - image: "fedora" + tag: "latest" + - image: "ubuntu" + tag: "latest" + - image: "ubuntu" + tag: "bionic" + - image: "ubuntu" + tag: "xenial" + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: disable apparmor for mysql + run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + - name: parse apparmor for mysql + run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + image: ${{ matrix.config.image }} + tag: ${{ matrix.config.tag }} + options: "--parallel all" + env: + TOX_PARALLEL_NO_SPINNER: 1 diff --git a/roles/postfix/.gitignore b/roles/robertdebock.postfix/.gitignore similarity index 100% rename from roles/postfix/.gitignore rename to roles/robertdebock.postfix/.gitignore diff --git a/roles/robertdebock.postfix/.travis.yml b/roles/robertdebock.postfix/.travis.yml new file mode 100644 index 0000000..65b12ad --- /dev/null +++ b/roles/robertdebock.postfix/.travis.yml @@ -0,0 +1,47 @@ +--- +# +# Ansible managed +# +language: python + +os: linux +dist: xenial + +python: + - "3.8" + +services: + - docker + +env: + global: + namespace="robertdebock" + jobs: + - image="amazonlinux" tag="1" + - image="centos" tag="7" + - image="centos" tag="latest" + - image="debian" tag="latest" + - image="debian" tag="bullseye" + - image="fedora" tag="31" + - image="fedora" tag="latest" + - image="ubuntu" tag="latest" + - image="ubuntu" tag="bionic" + - image="ubuntu" tag="xenial" + +cache: + - pip + +install: + - pip install --upgrade pip + - pip install tox + +script: + - function retry { counter=0 ; until "$@" ; do exit=$? ; counter=$(($counter + 1)) ; if [ $counter -ge 3 ] ; then return $exit ; fi ; done ; return 0; } ; retry tox --parallel all + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ + slack: + secure: "U772ebHw7bzE583/zsePnFgn1rNeMudFTM9+9FgpXS3wYY/52icoRvqBH3zpeTypZcbLW9Dzu9JQR9PxI6BU9Ukn/Y8BEjS+6mKj99rr39XaK/D4ofdJZP3zxE3VtUhjugKROahsTGfqelLSArGPCV5HqCzH+RpBGKs1UyFxqTyuJCn5dQke9vk+X0wZO4q5TrsGLXM8qB9pwz/gq6f14yPod8cbACYOI8u7oLVwhp+cD5UN5CEJ7hLCegtY2l2OuBgWg/P+za19Rseg8MLMWKLLi/j0bH99GdnnHrT3x87BwQl3i8EF0r/nl3moWgQvkNuCwY+yVMJ2Wo8AKzbBef0wRBuj8iYXCTa8mbhLfe5C5WdhgUSQHrJg1wYSYJOFQP8obCzQbuHEJ7swMv6ufHwXkvktpab+xuCiQPfVRzJSguk2ZuFEaBFrk0pZFQnagqQPiRlWAfjqjVhGikQcXx9qpnizQdtefISUDYNpx169ndYx4YphEroGiT6oGca1ki4f2YXV+VclPVFlfG2oKaeCcIhTqBlgFdGwzWQCtxMsnhcFNyUpBYjeOgcerP/Byv5tB0EXql2UZWzQOh9GMHmwc7KQDyC6Ayi89LWeSOLIEL+SBSaSmE+FsGu9kk/CNW6iWyNLDUcqCNnwnQp/7NO0KAZsgJ9+ucHa549+b8c=" + on_success: change + template: "%{result}: %{repository_slug}@%{branch}, build <%{build_url}|#%{build_number}> (<%{compare_url}|%{commit}>)" + email: false diff --git a/roles/robertdebock.postfix/.yamllint b/roles/robertdebock.postfix/.yamllint new file mode 100644 index 0000000..894450c --- /dev/null +++ b/roles/robertdebock.postfix/.yamllint @@ -0,0 +1,15 @@ +--- +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + line-length: disable + truthy: disable + +ignore: | + .tox/ diff --git a/roles/postfix/CODE_OF_CONDUCT.md b/roles/robertdebock.postfix/CODE_OF_CONDUCT.md similarity index 100% rename from roles/postfix/CODE_OF_CONDUCT.md rename to roles/robertdebock.postfix/CODE_OF_CONDUCT.md diff --git a/roles/robertdebock.postfix/CONTRIBUTING.md b/roles/robertdebock.postfix/CONTRIBUTING.md new file mode 100644 index 0000000..eb41f85 --- /dev/null +++ b/roles/robertdebock.postfix/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# [Please contribute](#please-contribute) + +You can really make a difference by: + +- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) +- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. + +I'll try to help and take every contribution seriously. + +It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. + +## [Step by step](#step-by-step) + +Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. + +### [1. Make an issue.](#1-make-an-issue) + +When you spot an issue, [create an issue](https://github.com/robertdebock/ansible-role-postfix/issues). + +Making the issue help me and others to find similar problems in the future. + +### [2. Fork the project.](#2-fork-the-project) + +On the top right side of [the repository on GitHub](https://github.com/robertdebock/ansible-role-postfix), click `fork`. This copies everything to your GitHub namespace. + +### [3. Make the changes](#3-make-the-changes) + +In you own GitHub namespace, make the required changes. + +I typically do that by cloning the repository (in your namespace) locally: + +``` +git clone git@github.com:YOURNAMESPACE/ansible-role-postfix.git +``` + +Now you can start to edit on your laptop. + +### [4. Optionally: test your changes](#4-optionally-test-your-changes) + +Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): + +``` +pip install molecule tox ansible-lint docker +``` + +And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: + +``` +image=centos tag=7 molecule test +``` + +Once it start to work, you can test multiple version of Ansible: + +``` +image=centos tag=7 tox +``` + +### [5. Optionally: Regenerate all dynamic content](#5-optionally-regenerate-all-dynamic-content) + +You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. + +If you don't do it, I'll do it later for you. + +### [6. Make a pull request](#6-make-a-pull-request) + +[GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. + +In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. + +### [7. Wait](#7-wait) + +Now I'll get a message that you've added some code. Thank you, really. + +CI starts to test your changes. You can follow the progress on Travis. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.postfix/LICENSE b/roles/robertdebock.postfix/LICENSE new file mode 100644 index 0000000..bd15893 --- /dev/null +++ b/roles/robertdebock.postfix/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Robert de Bock (robert@meinit.nl) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/roles/postfix/README.md b/roles/robertdebock.postfix/README.md similarity index 57% rename from roles/postfix/README.md rename to roles/robertdebock.postfix/README.md index 63c23d9..53fc93b 100644 --- a/roles/postfix/README.md +++ b/roles/robertdebock.postfix/README.md @@ -1,15 +1,14 @@ -postfix -========= - -Ansible logo - Build status +# [postfix](#postfix) Install and configure postfix on your system. -Example Playbook ----------------- +|Travis|GitHub|Quality|Downloads|Version| +|------|------|-------|---------|-------| +|[![travis](https://travis-ci.com/robertdebock/ansible-role-postfix.svg?branch=master)](https://travis-ci.com/robertdebock/ansible-role-postfix)|[![github](https://github.com/robertdebock/ansible-role-postfix/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-postfix/actions)|[![quality](https://img.shields.io/ansible/quality/22976)](https://galaxy.ansible.com/robertdebock/postfix)|[![downloads](https://img.shields.io/ansible/role/d/22976)](https://galaxy.ansible.com/robertdebock/postfix)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-postfix.svg)](https://github.com/robertdebock/ansible-role-postfix/releases/)| -This example is taken from `molecule/resources/playbook.yml` and is tested on each push, pull request and release. +## [Example Playbook](#example-playbook) + +This example is taken from `molecule/resources/converge.yml` and is tested on each push, pull request and release. ```yaml --- - name: Converge @@ -17,16 +16,17 @@ This example is taken from `molecule/resources/playbook.yml` and is tested on ea become: yes gather_facts: yes - vars: - postfix_aliases: - - name: root - destination: robert@meinit.nl - roles: - - robertdebock.postfix + - role: robertdebock.postfix + postfix_myhostname: "smtp.example.com" + postfix_mydomain: "example.com" + postfix_myorigin: "example.com" + postfix_aliases: + - name: root + destination: test@example.com ``` -The machine you are running this on, may need to be prepared, I use this playbook to ensure everything is in place to let the role work. +The machine may need to be prepared using `molecule/resources/prepare.yml`: ```yaml --- - name: Prepare @@ -35,15 +35,34 @@ The machine you are running this on, may need to be prepared, I use this playboo gather_facts: no roles: - - robertdebock.bootstrap - - robertdebock.core_dependencies + - role: robertdebock.bootstrap + - role: robertdebock.core_dependencies ``` +For verification `molecule/resources/verify.yml` runs after the role has been applied. +```yaml +--- +- name: Verify + hosts: all + become: yes + gather_facts: no + + tasks: + - name: check if port 25 is open + wait_for: + port: 25 + + - name: check if a mail can be sent + mail: + from: "Robert de Bock " + to: "Robert de Bock " + subject: Testing robertdebock.postfix. + body: Testing the ansible role postfix. +``` Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles. -Role Variables --------------- +## [Role Variables](#role-variables) These variables are set in `defaults/main.yml`: ```yaml @@ -52,12 +71,15 @@ These variables are set in `defaults/main.yml`: # These settings are required in postfix. postfix_myhostname: "{{ ansible_fqdn }}" -postfix_mydomain: "{{ ansible_domain | default ('localdomain', true) }}" -postfix_myorigin: "{{ ansible_domain | default ('localdomain', true) }}" +postfix_mydomain: "{{ ansible_domain | default('localdomain', true) }}" +postfix_myorigin: "{{ ansible_domain | default('localdomain', true) }}" # To "listen" on public interfaces, set inet_interfaces to something like # "all" or the name of the interface, such as "eth0". -postfix_inet_inferfaces: "loopback-only" +postfix_inet_interfaces: "loopback-only" + +# Enable IPv4, and IPv6 if supported - if IPV4 only set to ipv4 +postfix_inet_protocols: all # The distination tells Postfix what mails to accept mail for. postfix_mydestination: $mydomain, $myhostname, localhost.$mydomain, localhost @@ -89,6 +111,9 @@ postfix_smtpd_recipient_restrictions: - reject_rbl_client dul.dnsbl.sorbs.net - permit +postfix_smtpd_sender_restrictions: + - reject_unknown_sender_domain + # To enable spamassassin, ensure spamassassin is installed, # (hint: role: robertdebock.spamassassin) and set these two variables: # postfix_spamassassin: enabled @@ -102,10 +127,23 @@ postfix_smtpd_recipient_restrictions: # postfix_aliases: # - name: root # destination: robert@meinit.nl + +# You can configure sender access controls here. +# postfix_sender_access: +# - domain: gooddomain.com +# action: OK +# - domain: baddomain.com +# action: REJECT + +# You can configure recipient access controls here. +# postfix_recipient_access: +# - domain: gooddomain.com +# action: OK +# - domain: baddomain.com +# action: REJECT ``` -Requirements ------------- +## [Requirements](#requirements) - Access to a repository containing packages, likely on the internet. - A recent version of Ansible. (Tests run on the current, previous and next release of Ansible.) @@ -119,54 +157,44 @@ The following roles can be installed to ensure all requirements are met, using ` ``` -Context -------- +## [Context](#context) This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information. Here is an overview of related roles: ![dependencies](https://raw.githubusercontent.com/robertdebock/drawings/artifacts/postfix.png "Dependency") +## [Compatibility](#compatibility) -Compatibility -------------- +This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): -This role has been tested on these [container images](https://hub.docker.com/): +|container|tags| +|---------|----| +|amazon|2018.03| +|el|7, 8| +|debian|buster, bullseye| +|fedora|31, 32| +|ubuntu|focal, bionic, xenial| -|container|tag|allow_failures| -|---------|---|--------------| -|alpine|latest|no| -|alpine|edge|yes| -|debian|unstable|yes| -|debian|latest|no| -|centos|7|no| -|redhat|7|no| -|centos|latest|no| -|redhat|latest|no| -|fedora|latest|no| -|fedora|rawhide|yes| -|ubuntu|latest|no| +The minimum version of Ansible required is 2.8 but tests have been done to: -This role has been tested on these Ansible versions: +- The previous version, on version lower. +- The current version. +- The development version. -- ansible>=2.8, <2.9 -- ansible>=2.9 -- git+https://github.com/ansible/ansible.git@devel - -Exceptions ----------- +## [Exceptions](#exceptions) Some variarations of the build matrix do not work. These are the variations and reasons why the build won't work: | variation | reason | |---------------------------|------------------------| | opensuse | Not idempotent on configure postfix (main.cf) and configure postfix | +| alpine | 451, 4.3.0 : Temporary lookup failure | -Testing -------- +## [Testing](#testing) -[Unit tests](https://travis-ci.org/robertdebock/ansible-role-postfix) are done on every commit, pull request, release and periodically. +[Unit tests](https://travis-ci.com/robertdebock/ansible-role-postfix) are done on every commit, pull request, release and periodically. If you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-postfix/issues) @@ -198,28 +226,13 @@ image="centos" tox image="debian" tag="stable" tox ``` -Modules -------- - -This role uses the following modules: -```yaml ---- -- command -- file -- group -- lineinfile -- package -- service -- template -``` - -License -------- +## [License](#license) Apache-2.0 -Author Information ------------------- +## [Author Information](#author-information) [Robert de Bock](https://robertdebock.nl/) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/postfix/SECURITY.md b/roles/robertdebock.postfix/SECURITY.md similarity index 76% rename from roles/postfix/SECURITY.md rename to roles/robertdebock.postfix/SECURITY.md index 7ab482d..fbe506a 100644 --- a/roles/postfix/SECURITY.md +++ b/roles/robertdebock.postfix/SECURITY.md @@ -1,8 +1,8 @@ -# Security Policy +# [Security Policy](#security-policy) This software implements other software, it's not very likely that this software introduces new vulnerabilities. -## Supported Versions +## [Supported Versions](#supported-versions) The current major version is supported. For example if the current version is 3.4.1: @@ -14,10 +14,12 @@ The current major version is supported. For example if the current version is 3. | 2.0.0 | :x: | | 1.0.0 | :x: | -## Reporting a Vulnerability +## [Reporting a Vulnerability](#reporting-a-vulnarability) Please [open an issue](https://github.com/robertdebock/ansible-role-postfix/issues) describing the vulnerability. Tell them where to go, how often they can expect to get an update on a reported vulnerability, what to expect if the vulnerability is accepted or declined, etc. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/postfix/defaults/main.yml b/roles/robertdebock.postfix/defaults/main.yml similarity index 71% rename from roles/postfix/defaults/main.yml rename to roles/robertdebock.postfix/defaults/main.yml index 985d51d..7b960c1 100644 --- a/roles/postfix/defaults/main.yml +++ b/roles/robertdebock.postfix/defaults/main.yml @@ -3,12 +3,15 @@ # These settings are required in postfix. postfix_myhostname: "{{ ansible_fqdn }}" -postfix_mydomain: "{{ ansible_domain | default ('localdomain', true) }}" -postfix_myorigin: "{{ ansible_domain | default ('localdomain', true) }}" +postfix_mydomain: "{{ ansible_domain | default('localdomain', true) }}" +postfix_myorigin: "{{ ansible_domain | default('localdomain', true) }}" # To "listen" on public interfaces, set inet_interfaces to something like # "all" or the name of the interface, such as "eth0". -postfix_inet_inferfaces: "loopback-only" +postfix_inet_interfaces: "loopback-only" + +# Enable IPv4, and IPv6 if supported - if IPV4 only set to ipv4 +postfix_inet_protocols: all # The distination tells Postfix what mails to accept mail for. postfix_mydestination: $mydomain, $myhostname, localhost.$mydomain, localhost @@ -40,6 +43,9 @@ postfix_smtpd_recipient_restrictions: - reject_rbl_client dul.dnsbl.sorbs.net - permit +postfix_smtpd_sender_restrictions: + - reject_unknown_sender_domain + # To enable spamassassin, ensure spamassassin is installed, # (hint: role: robertdebock.spamassassin) and set these two variables: # postfix_spamassassin: enabled @@ -53,3 +59,17 @@ postfix_smtpd_recipient_restrictions: # postfix_aliases: # - name: root # destination: robert@meinit.nl + +# You can configure sender access controls here. +# postfix_sender_access: +# - domain: gooddomain.com +# action: OK +# - domain: baddomain.com +# action: REJECT + +# You can configure recipient access controls here. +# postfix_recipient_access: +# - domain: gooddomain.com +# action: OK +# - domain: baddomain.com +# action: REJECT diff --git a/roles/robertdebock.postfix/files/my-postfix.te b/roles/robertdebock.postfix/files/my-postfix.te new file mode 100644 index 0000000..915ccda --- /dev/null +++ b/roles/robertdebock.postfix/files/my-postfix.te @@ -0,0 +1,10 @@ + +module my-postfix 1.0; + +require { + type postfix_postdrop_t; + class capability dac_override; +} + +#============= postfix_postdrop_t ============== +allow postfix_postdrop_t self:capability dac_override; diff --git a/roles/robertdebock.postfix/handlers/main.yml b/roles/robertdebock.postfix/handlers/main.yml new file mode 100644 index 0000000..450f24e --- /dev/null +++ b/roles/robertdebock.postfix/handlers/main.yml @@ -0,0 +1,24 @@ +--- +# handlers file for postfix +- name: rebuild alias database + command: postmap "{{ postfix_alias_path }}" + +- name: rebuild sender_access database + command: postmap "{{ postfix_sender_access_path }}" + +- name: rebuild recipient_access database + command: postmap "{{ postfix_recipient_access_path }}" + +- name: restart postfix + service: + name: "{{ postfix_service }}" + state: restarted + +- name: create selinux mod for postfix + command: checkmodule -M -m -o /etc/my-postfix.mod /etc/my-postfix.te + +- name: create selinux pp for postfix + command: semodule_package -o /etc/my-postfix.pp -m /etc/my-postfix.mod + +- name: load selinux pp for postfix + command: semodule -i /etc/my-postfix.pp diff --git a/roles/robertdebock.postfix/meta/.galaxy_install_info b/roles/robertdebock.postfix/meta/.galaxy_install_info new file mode 100644 index 0000000..d4d07da --- /dev/null +++ b/roles/robertdebock.postfix/meta/.galaxy_install_info @@ -0,0 +1,2 @@ +install_date: Mon Sep 28 09:36:57 2020 +version: 3.3.2 diff --git a/roles/postfix/meta/exception.yml b/roles/robertdebock.postfix/meta/exception.yml similarity index 57% rename from roles/postfix/meta/exception.yml rename to roles/robertdebock.postfix/meta/exception.yml index 5f0d574..d70b96a 100644 --- a/roles/postfix/meta/exception.yml +++ b/roles/robertdebock.postfix/meta/exception.yml @@ -2,3 +2,5 @@ exceptions: - variation: opensuse reason: "Not idempotent on configure postfix (main.cf) and configure postfix" + - variation: alpine + reason: "451, 4.3.0 : Temporary lookup failure" diff --git a/roles/postfix/meta/main.yml b/roles/robertdebock.postfix/meta/main.yml similarity index 80% rename from roles/postfix/meta/main.yml rename to roles/robertdebock.postfix/meta/main.yml index f29dc3d..70f65b4 100644 --- a/roles/postfix/meta/main.yml +++ b/roles/robertdebock.postfix/meta/main.yml @@ -8,26 +8,26 @@ galaxy_info: min_ansible_version: 2.8 platforms: - - name: Alpine + - name: Amazon versions: - - all - - name: ArchLinux - versions: - - all - - name: Debian - versions: - - all + - 2018.03 - name: EL versions: - 7 - 8 + - name: Debian + versions: + - buster + - bullseye - name: Fedora versions: - - all + - 31 + - 32 - name: Ubuntu versions: - - artful + - focal - bionic + - xenial galaxy_tags: - centos diff --git a/roles/robertdebock.postfix/meta/preferences.yml b/roles/robertdebock.postfix/meta/preferences.yml new file mode 100644 index 0000000..e7fdebf --- /dev/null +++ b/roles/robertdebock.postfix/meta/preferences.yml @@ -0,0 +1,2 @@ +--- +tox_parallel: yes diff --git a/roles/robertdebock.postfix/molecule/default/converge.yml b/roles/robertdebock.postfix/molecule/default/converge.yml new file mode 100644 index 0000000..0f16f77 --- /dev/null +++ b/roles/robertdebock.postfix/molecule/default/converge.yml @@ -0,0 +1,14 @@ +--- +- name: Converge + hosts: all + become: yes + gather_facts: yes + + roles: + - role: ansible-role-postfix + postfix_myhostname: "smtp.example.com" + postfix_mydomain: "example.com" + postfix_myorigin: "example.com" + postfix_aliases: + - name: root + destination: test@example.com diff --git a/roles/postfix/molecule/default/molecule.yml b/roles/robertdebock.postfix/molecule/default/molecule.yml similarity index 73% rename from roles/postfix/molecule/default/molecule.yml rename to roles/robertdebock.postfix/molecule/default/molecule.yml index 5306639..74e8723 100644 --- a/roles/postfix/molecule/default/molecule.yml +++ b/roles/robertdebock.postfix/molecule/default/molecule.yml @@ -6,8 +6,9 @@ dependency: name: galaxy options: role-file: requirements.yml -lint: - name: yamllint +lint: | + set -e + yamllint . driver: name: docker platforms: @@ -20,5 +21,9 @@ platforms: pre_build_image: yes provisioner: name: ansible -scenario: - name: default + config_options: + defaults: + stdout_callback: yaml + bin_ansible_callbacks: yes +verifier: + name: ansible diff --git a/roles/robertdebock.postfix/molecule/default/prepare.yml b/roles/robertdebock.postfix/molecule/default/prepare.yml new file mode 100644 index 0000000..3b19573 --- /dev/null +++ b/roles/robertdebock.postfix/molecule/default/prepare.yml @@ -0,0 +1,9 @@ +--- +- name: Prepare + hosts: all + become: yes + gather_facts: no + + roles: + - role: robertdebock.bootstrap + - role: robertdebock.core_dependencies diff --git a/roles/robertdebock.postfix/molecule/default/verify.yml b/roles/robertdebock.postfix/molecule/default/verify.yml new file mode 100644 index 0000000..ce34a00 --- /dev/null +++ b/roles/robertdebock.postfix/molecule/default/verify.yml @@ -0,0 +1,17 @@ +--- +- name: Verify + hosts: all + become: yes + gather_facts: no + + tasks: + - name: check if port 25 is open + wait_for: + port: 25 + + - name: check if a mail can be sent + mail: + from: "Robert de Bock " + to: "Robert de Bock " + subject: Testing ansible-role-postfix. + body: Testing the ansible role postfix. diff --git a/roles/postfix/requirements.yml b/roles/robertdebock.postfix/requirements.yml similarity index 100% rename from roles/postfix/requirements.yml rename to roles/robertdebock.postfix/requirements.yml diff --git a/roles/robertdebock.postfix/tasks/assert.yml b/roles/robertdebock.postfix/tasks/assert.yml new file mode 100644 index 0000000..7df5d1b --- /dev/null +++ b/roles/robertdebock.postfix/tasks/assert.yml @@ -0,0 +1,58 @@ +--- +- name: test if postfix_myhostname is set correctly + assert: + that: + - postfix_myhostname is defined + - postfix_myhostname | length > 0 + quiet: yes + +- name: test if postfix_mydomain is set correctly + assert: + that: + - postfix_mydomain is defined + - postfix_mydomain | length > 0 + quiet: yes + +- name: test if postfix_myorigin is set correctly + assert: + that: + - postfix_myorigin is defined + - postfix_myorigin | length > 0 + quiet: yes + +- name: test if postfix_inet_interfaces is set correctly + assert: + that: + - postfix_inet_interfaces is defined + - postfix_inet_interfaces | length > 0 + quiet: yes + +- name: test if postfix_mydestination is set correctly + assert: + that: + - postfix_mydestination is defined + - postfix_mydestination | length > 0 + quiet: yes + +- name: test if postfix_mynetworks is set correctly + assert: + that: + - postfix_mynetworks is defined + - postfix_mynetworks | length > 0 + quiet: yes + +- name: test if postfix_smtpd_recipient_restrictions is set correctly + assert: + that: + - postfix_smtpd_recipient_restrictions is defined + - postfix_smtpd_recipient_restrictions | length > 0 + - postfix_smtpd_recipient_restrictions is iterable + quiet: yes + +- name: test if postfix_smtpd_sender_restrictions is set correctly + assert: + that: + - postfix_smtpd_sender_restrictions is defined + - postfix_smtpd_sender_restrictions | length > 0 + - postfix_smtpd_sender_restrictions is iterable + quiet: yes diff --git a/roles/robertdebock.postfix/tasks/main.yml b/roles/robertdebock.postfix/tasks/main.yml new file mode 100644 index 0000000..607e0b2 --- /dev/null +++ b/roles/robertdebock.postfix/tasks/main.yml @@ -0,0 +1,115 @@ +--- +# tasks file for postfix +- name: include assert.yml + include_tasks: assert.yml + +- name: install postfix + package: + name: "{{ postfix_packages }}" + state: present + +- name: create group + group: + name: "{{ postfix_group }}" + state: present + +- name: configure postfix (main.cf) + template: + src: main.cf.j2 + dest: /etc/postfix/main.cf + validate: postconf -d -c %s + mode: "0644" + notify: + - restart postfix + +- name: configure postfix (master.cf) + template: + src: master.cf.j2 + dest: /etc/postfix/master.cf + validate: postconf -d -c %s + mode: "0644" + notify: + - restart postfix + +- name: force all notified handlers to run + meta: flush_handlers + +- name: configure aliases + lineinfile: + path: "{{ postfix_alias_path }}" + regexp: "^{{ item.name }}:" + line: "{{ item.name }}: {{ item.destination }}" + mode: "0644" + when: + - postfix_aliases is defined + loop: "{{ postfix_aliases }}" + notify: + - rebuild alias database + - restart postfix + loop_control: + label: "{{ item.name }}" + +- name: configure sender_access + lineinfile: + path: "{{ postfix_sender_access_path }}" + regexp: "^{{ item.domain }}" + line: "{{ item.domain }} {{ item.action }}" + create: yes + mode: "0644" + when: + - postfix_sender_access is defined + loop: "{{ postfix_sender_access }}" + notify: + - rebuild sender_access database + - restart postfix + loop_control: + label: "{{ item.domain }}" + +- name: configure recipient_access + lineinfile: + path: "{{ postfix_recipient_access_path }}" + regexp: "^{{ item.domain }}" + line: "{{ item.domain }} {{ item.action }}" + create: yes + mode: "0644" + when: + - postfix_recipient_access is defined + loop: "{{ postfix_recipient_access }}" + notify: + - rebuild recipient_access database + - restart postfix + loop_control: + label: "{{ item.domain }}" + +- name: force all notified handlers to run + meta: flush_handlers + +- name: set group owner + file: + path: "{{ item }}" + group: "{{ postfix_group }}" + mode: "0755" + loop: + - /usr/sbin/postqueue + - /usr/sbin/postdrop + - /var/spool/postfix/public + - /var/spool/postfix/maildrop + +- name: place selinux type enforcement + copy: + src: my-postfix.te + dest: /etc/my-postfix.te + mode: "0644" + notify: + - create selinux mod for postfix + - create selinux pp for postfix + - load selinux pp for postfix + when: + - ansible_selinux.status is defined + - ansible_selinux.status == "enabled" + +- name: start and enable postfix + service: + name: "{{ postfix_service }}" + state: started + enabled: yes diff --git a/roles/postfix/templates/main.cf.j2 b/roles/robertdebock.postfix/templates/main.cf.j2 similarity index 95% rename from roles/postfix/templates/main.cf.j2 rename to roles/robertdebock.postfix/templates/main.cf.j2 index 676d9cb..5fbff9a 100644 --- a/roles/postfix/templates/main.cf.j2 +++ b/roles/robertdebock.postfix/templates/main.cf.j2 @@ -117,11 +117,11 @@ myorigin = {{ postfix_myorigin }} #inet_interfaces = all #inet_interfaces = $myhostname #inet_interfaces = $myhostname, localhost -#inet_inferfaces = localhost -inet_interfaces = {{ postfix_inet_inferfaces }} +#inet_interfaces = localhost +inet_interfaces = {{ postfix_inet_interfaces }} # Enable IPv4, and IPv6 if supported -inet_protocols = all +inet_protocols = {{ postfix_inet_protocols }} # The proxy_interfaces parameter specifies the network interface # addresses that this mail system receives mail on by way of a @@ -307,10 +307,23 @@ mynetworks = {{ postfix_mynetworks }} relay_domains = {{ postfix_relay_domains }} {% endif %} -{% if postfix_smtpd_recipient_restrictions is defined %} +{% if postfix_smtpd_recipient_restrictions is defined and postfix_recipient_access is not defined %} smtpd_recipient_restrictions = {% for smtpd_recipient_restriction in postfix_smtpd_recipient_restrictions %}{{ smtpd_recipient_restriction }}, {% endfor %} {% endif %} +{% if postfix_smtpd_recipient_restrictions is defined and postfix_recipient_access is defined %} +smtpd_recipient_restrictions = check_recipient_access hash:{{ postfix_recipient_access_path }}, {% for smtpd_recipient_restriction in postfix_smtpd_recipient_restrictions %}{{ smtpd_recipient_restriction }}, {% endfor %} +{% endif %} + +{% if postfix_smtpd_sender_restrictions is defined and postfix_sender_access is not defined %} +smtpd_sender_restrictions = {% for smtpd_sender_restriction in postfix_smtpd_sender_restrictions %}{{ smtpd_sender_restriction }}, {% endfor %} +{% endif %} + +{% if postfix_smtpd_sender_restrictions is defined and postfix_sender_access is defined %} +smtpd_sender_restrictions = check_sender_access hash:{{ postfix_sender_access_path }}, {% for smtpd_sender_restriction in postfix_smtpd_sender_restrictions %}{{ smtpd_sender_restriction }}, {% endfor %} +{% endif %} + + # INTERNET OR INTRANET # The relayhost parameter specifies the default host to send mail to @@ -332,7 +345,7 @@ smtpd_recipient_restrictions = {% for smtpd_recipient_restriction in postfix_smt #relayhost = uucphost #relayhost = [an.ip.add.ress] {% if postfix_relayhost is defined %} -relayhost = {{ postfix_relayhost }} +relayhost = {{ postfix_relayhost|replace("'", "") }} {% endif %} # REJECTING UNKNOWN RELAY USERS @@ -698,7 +711,7 @@ sample_directory = /usr/share/doc/postfix-2.10.1/samples readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES # content_filter: An optional filter to classify content. -{% if postfix_clamav is defined %} +{% if postfix_clamav is defined and postfix_clamav == "enabled" %} content_filter = scan:127.0.0.1:10025 receive_override_options = no_address_mappings {% endif %} diff --git a/roles/postfix/templates/master.cf.j2 b/roles/robertdebock.postfix/templates/master.cf.j2 similarity index 100% rename from roles/postfix/templates/master.cf.j2 rename to roles/robertdebock.postfix/templates/master.cf.j2 diff --git a/roles/robertdebock.postfix/tox.ini b/roles/robertdebock.postfix/tox.ini new file mode 100644 index 0000000..c1bc1d4 --- /dev/null +++ b/roles/robertdebock.postfix/tox.ini @@ -0,0 +1,26 @@ +# +# Ansible managed +# +[tox] +minversion = 3.7 +# Disabled "next" because of: +# https://github.com/ansible-community/molecule/issues/2626. +# envlist = py{38}-ansible-{previous,current,next} +envlist = py{38}-ansible-{previous,current} +skipsdist = true + +[testenv] +deps = + previous: ansible>=2.8, <2.9 + current: ansible>=2.9 + next: git+https://github.com/ansible/ansible.git@devel + molecule[lint]>=3, <4 + docker>=4.2, <4.3 +commands = molecule test +setenv = + TOX_ENVNAME={envname} + MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} + PY_COLORS=1 + ANSIBLE_FORCE_COLOR=1 + +passenv = namespace image tag diff --git a/roles/postfix/vars/main.yml b/roles/robertdebock.postfix/vars/main.yml similarity index 82% rename from roles/postfix/vars/main.yml rename to roles/robertdebock.postfix/vars/main.yml index 94afd64..b5d002a 100644 --- a/roles/postfix/vars/main.yml +++ b/roles/robertdebock.postfix/vars/main.yml @@ -1,5 +1,6 @@ --- # vars file for postfix + postfix_packages: - postfix @@ -17,6 +18,9 @@ postfix_group: postdrop _postfix_alias_path: default: /etc/aliases Alpine: /etc/postfix/aliases - Archlinux: /etc/postfix/aliases postfix_alias_path: "{{ _postfix_alias_path[ansible_os_family] | default(_postfix_alias_path['default']) }}" + +postfix_recipient_access_path: /etc/postfix/recipient_access + +postfix_sender_access_path: /etc/postfix/sender_access diff --git a/roles/robertdebock.python_pip/.ansible-lint b/roles/robertdebock.python_pip/.ansible-lint new file mode 100644 index 0000000..eba57d1 --- /dev/null +++ b/roles/robertdebock.python_pip/.ansible-lint @@ -0,0 +1,8 @@ +# +# Ansible managed +# +exclude_paths: + - ./meta/exception.yml + - ./meta/preferences.yml + - ./molecule/default/verify.yml + - ./.tox diff --git a/roles/robertdebock.python_pip/.github/FUNDING.yml b/roles/robertdebock.python_pip/.github/FUNDING.yml new file mode 100644 index 0000000..67320f0 --- /dev/null +++ b/roles/robertdebock.python_pip/.github/FUNDING.yml @@ -0,0 +1,2 @@ +--- +github: robertdebock diff --git a/roles/robertdebock.python_pip/.github/ISSUE_TEMPLATE/bug_report.md b/roles/robertdebock.python_pip/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..f39b5dc --- /dev/null +++ b/roles/robertdebock.python_pip/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a report to help me improve + +--- + +## Describe the bug +A clear and concise description of what the bug is. + +## Playbook + +Please paste the playbook you are using. (Consider `requirements.yml` and +optionally the command you've invoked.) + + +```yaml +--- +YOUR PLAYBOOK HERE +``` + +## Output + +Show at least the error, possible related output, maybe just all the output. + +## Environment + +- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) +- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) +- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.python_pip/.github/ISSUE_TEMPLATE/feature_request.md b/roles/robertdebock.python_pip/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..55a93c4 --- /dev/null +++ b/roles/robertdebock.python_pip/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +## Proposed feature + +A clear and concise description of what you want to happen. + +## Rationale + +Why is this feature required? + +## Additional context + +Add any other context about the feature request here. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/python_pip/PULL_REQUEST_TEMPLATE.md b/roles/robertdebock.python_pip/.github/pull_request_template.md similarity index 100% rename from roles/python_pip/PULL_REQUEST_TEMPLATE.md rename to roles/robertdebock.python_pip/.github/pull_request_template.md diff --git a/roles/python_pip/.github/settings.yml b/roles/robertdebock.python_pip/.github/settings.yml similarity index 100% rename from roles/python_pip/.github/settings.yml rename to roles/robertdebock.python_pip/.github/settings.yml diff --git a/roles/robertdebock.python_pip/.github/workflows/galaxy.yml b/roles/robertdebock.python_pip/.github/workflows/galaxy.yml new file mode 100644 index 0000000..cca8501 --- /dev/null +++ b/roles/robertdebock.python_pip/.github/workflows/galaxy.yml @@ -0,0 +1,22 @@ +--- +# +# Ansible managed +# + +name: Release to Ansible Galaxy + +on: + push: + tags: + - '*' + schedule: + - cron: '16 16 16 * *' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: galaxy + uses: robertdebock/galaxy-action@1.0.1 + with: + galaxy_api_key: ${{ secrets.galaxy_api_key }} diff --git a/roles/robertdebock.python_pip/.github/workflows/molecule.yml b/roles/robertdebock.python_pip/.github/workflows/molecule.yml new file mode 100644 index 0000000..87d7684 --- /dev/null +++ b/roles/robertdebock.python_pip/.github/workflows/molecule.yml @@ -0,0 +1,76 @@ +--- +# +# Ansible managed +# + +name: Ansible Molecule + +on: + push: + tags_ignore: + - '*' + pull_request: + schedule: + - cron: '16 16 16 * *' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + command: lint + test: + needs: + - lint + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + config: + - image: "alpine" + tag: "latest" + - image: "alpine" + tag: "edge" + - image: "centos" + tag: "7" + - image: "centos" + tag: "latest" + - image: "debian" + tag: "latest" + - image: "debian" + tag: "bullseye" + - image: "fedora" + tag: "31" + - image: "fedora" + tag: "latest" + - image: "opensuse" + tag: "latest" + - image: "ubuntu" + tag: "latest" + - image: "ubuntu" + tag: "bionic" + - image: "ubuntu" + tag: "xenial" + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: disable apparmor for mysql + run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + - name: parse apparmor for mysql + run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + - name: molecule + uses: robertdebock/molecule-action@2.6.2 + with: + image: ${{ matrix.config.image }} + tag: ${{ matrix.config.tag }} + options: "--parallel all" + env: + TOX_PARALLEL_NO_SPINNER: 1 diff --git a/roles/python_pip/.gitignore b/roles/robertdebock.python_pip/.gitignore similarity index 100% rename from roles/python_pip/.gitignore rename to roles/robertdebock.python_pip/.gitignore diff --git a/roles/robertdebock.python_pip/.travis.yml b/roles/robertdebock.python_pip/.travis.yml new file mode 100644 index 0000000..524218b --- /dev/null +++ b/roles/robertdebock.python_pip/.travis.yml @@ -0,0 +1,49 @@ +--- +# +# Ansible managed +# +language: python + +os: linux +dist: xenial + +python: + - "3.8" + +services: + - docker + +env: + global: + namespace="robertdebock" + jobs: + - image="alpine" tag="latest" + - image="alpine" tag="edge" + - image="centos" tag="7" + - image="centos" tag="latest" + - image="debian" tag="latest" + - image="debian" tag="bullseye" + - image="fedora" tag="31" + - image="fedora" tag="latest" + - image="opensuse" tag="latest" + - image="ubuntu" tag="latest" + - image="ubuntu" tag="bionic" + - image="ubuntu" tag="xenial" + +cache: + - pip + +install: + - pip install --upgrade pip + - pip install tox + +script: + - function retry { counter=0 ; until "$@" ; do exit=$? ; counter=$(($counter + 1)) ; if [ $counter -ge 3 ] ; then return $exit ; fi ; done ; return 0; } ; retry tox --parallel all + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ + slack: + secure: "B8VPCMWxv/8UDsuvi0StYn30s4h/9An62D9CXJTUL6gaTwkZ+0PpCZ482Vd2EiYbQc3hNQyBiScStXG3r+2Yzl5i4fwOmYpBnOMptZUrFapqI0Tx7zaQOKTw2wvNccuIM0usDPZPnF653X4vgJ6JXZ6s74wXcpHcPL3tStwVcqExjs0VcrDO2cRc+NHlvZr/e8z/66LPh2kuOT3dbQiVsGVQmr+pXPN5ZE7+KczDSPUpbS2IK/aR5qj+GR3gxr8lcHhfsLwb4ajloTJas2Whskg6KnPuGOFy3Ta/BdNnuwkgyPeNPFVanyJXX/CiBu6oeN3VLQxq/alOFTrwO1LQ80UtgVEj8abTkNAySSEpDuFM0BWm9I79syufP2iguV/aUyTKUC+Ut9j++8mkMWDErQnZu1sdiONLdInHnPA30U8mp3W0nQjJuNkQZGTFDaY8aoW3UiNEO1G9PExSAOVxt6132VlvSPDcMzfRdFDEegNT5Ebkqhpx4illSeooT9SZs2tboobCAl9CWigY994hjzOk4DEaIurt9rakDNrAeh75DJZE72dfBc5txARmBKqiml5htf0Nxf4R6q+GfSFCzMYarHS8MR/Ekd8679YD/6wfBRQUOS4aypsRt3WNlxwLH+kj7pKTyDkefO2P6KQrMcZcoPb0O2o8WGNihmwlyDA=" + on_success: change + template: "%{result}: %{repository_slug}@%{branch}, build <%{build_url}|#%{build_number}> (<%{compare_url}|%{commit}>)" + email: false diff --git a/roles/robertdebock.python_pip/.yamllint b/roles/robertdebock.python_pip/.yamllint new file mode 100644 index 0000000..894450c --- /dev/null +++ b/roles/robertdebock.python_pip/.yamllint @@ -0,0 +1,15 @@ +--- +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + line-length: disable + truthy: disable + +ignore: | + .tox/ diff --git a/roles/python_pip/CODE_OF_CONDUCT.md b/roles/robertdebock.python_pip/CODE_OF_CONDUCT.md similarity index 100% rename from roles/python_pip/CODE_OF_CONDUCT.md rename to roles/robertdebock.python_pip/CODE_OF_CONDUCT.md diff --git a/roles/robertdebock.python_pip/CONTRIBUTING.md b/roles/robertdebock.python_pip/CONTRIBUTING.md new file mode 100644 index 0000000..d1b7803 --- /dev/null +++ b/roles/robertdebock.python_pip/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# [Please contribute](#please-contribute) + +You can really make a difference by: + +- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) +- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. + +I'll try to help and take every contribution seriously. + +It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. + +## [Step by step](#step-by-step) + +Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. + +### [1. Make an issue.](#1-make-an-issue) + +When you spot an issue, [create an issue](https://github.com/robertdebock/ansible-role-python_pip/issues). + +Making the issue help me and others to find similar problems in the future. + +### [2. Fork the project.](#2-fork-the-project) + +On the top right side of [the repository on GitHub](https://github.com/robertdebock/ansible-role-python_pip), click `fork`. This copies everything to your GitHub namespace. + +### [3. Make the changes](#3-make-the-changes) + +In you own GitHub namespace, make the required changes. + +I typically do that by cloning the repository (in your namespace) locally: + +``` +git clone git@github.com:YOURNAMESPACE/ansible-role-python_pip.git +``` + +Now you can start to edit on your laptop. + +### [4. Optionally: test your changes](#4-optionally-test-your-changes) + +Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): + +``` +pip install molecule tox ansible-lint docker +``` + +And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: + +``` +image=centos tag=7 molecule test +``` + +Once it start to work, you can test multiple version of Ansible: + +``` +image=centos tag=7 tox +``` + +### [5. Optionally: Regenerate all dynamic content](#5-optionally-regenerate-all-dynamic-content) + +You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. + +If you don't do it, I'll do it later for you. + +### [6. Make a pull request](#6-make-a-pull-request) + +[GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. + +In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. + +### [7. Wait](#7-wait) + +Now I'll get a message that you've added some code. Thank you, really. + +CI starts to test your changes. You can follow the progress on Travis. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.python_pip/LICENSE b/roles/robertdebock.python_pip/LICENSE new file mode 100644 index 0000000..bd15893 --- /dev/null +++ b/roles/robertdebock.python_pip/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Robert de Bock (robert@meinit.nl) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/roles/python_pip/README.md b/roles/robertdebock.python_pip/README.md similarity index 57% rename from roles/python_pip/README.md rename to roles/robertdebock.python_pip/README.md index e7d96a4..9055fb8 100644 --- a/roles/python_pip/README.md +++ b/roles/robertdebock.python_pip/README.md @@ -1,15 +1,14 @@ -python_pip -========= - -Ansible logo - Build status +# [python_pip](#python_pip) Install pythons pip on your system. -Example Playbook ----------------- +|Travis|GitHub|Quality|Downloads|Version| +|------|------|-------|---------|-------| +|[![travis](https://travis-ci.com/robertdebock/ansible-role-python_pip.svg?branch=master)](https://travis-ci.com/robertdebock/ansible-role-python_pip)|[![github](https://github.com/robertdebock/ansible-role-python_pip/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-python_pip/actions)|[![quality](https://img.shields.io/ansible/quality/42440)](https://galaxy.ansible.com/robertdebock/python_pip)|[![downloads](https://img.shields.io/ansible/role/d/42440)](https://galaxy.ansible.com/robertdebock/python_pip)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-python_pip.svg)](https://github.com/robertdebock/ansible-role-python_pip/releases/)| -This example is taken from `molecule/resources/playbook.yml` and is tested on each push, pull request and release. +## [Example Playbook](#example-playbook) + +This example is taken from `molecule/resources/converge.yml` and is tested on each push, pull request and release. ```yaml --- - name: Converge @@ -18,10 +17,10 @@ This example is taken from `molecule/resources/playbook.yml` and is tested on ea gather_facts: yes roles: - - robertdebock.python_pip + - role: robertdebock.python_pip ``` -The machine you are running this on, may need to be prepared, I use this playbook to ensure everything is in place to let the role work. +The machine may need to be prepared using `molecule/resources/prepare.yml`: ```yaml --- - name: Prepare @@ -30,45 +29,62 @@ The machine you are running this on, may need to be prepared, I use this playboo become: yes roles: - - robertdebock.bootstrap - - robertdebock.epel - - robertdebock.buildtools + - role: robertdebock.bootstrap + - role: robertdebock.epel + - role: robertdebock.buildtools ``` -After running this role, this playbook runs to verify that everything works, this may be a good example how you can use this role. +For verification `molecule/resources/verify.yml` runs after the role has been applied. ```yaml --- - name: Verify hosts: all become: yes - gather_facts: yes + gather_facts: no tasks: - name: install pip module pip: - name: ansible + name: docker state: present -``` + + - name: check if bootstrap still works. + include_role: + name: robertdebock.bootstrap + + - name: remove pip module + pip: + name: docker + state: absent + + - name: check if requested modules can be installed + include_role: + name: robertdebock.python_pip + vars: + python_pip_modules: + - name: docker ``` Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles. -Role Variables --------------- +## [Role Variables](#role-variables) These variables are set in `defaults/main.yml`: ```yaml --- # defaults file for python_pip + # By default no modules should be installed. python_pip_modules: [] # Connect to a (pypi) proxy by setting this variable. # python_pip_proxy: "https://user:password@proxy:8443/artifactory/pypi/pypi-virtual/simple" + +# Don't forget to trust foreign pip repositories if you use them. +# python_pip_trusted_host: my-pip-repository.example.com ``` -Requirements ------------- +## [Requirements](#requirements) - Access to a repository containing packages, likely on the internet. - A recent version of Ansible. (Tests run on the current, previous and next release of Ansible.) @@ -83,29 +99,25 @@ The following roles can be installed to ensure all requirements are met, using ` ``` -Context -------- +## [Context](#context) This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information. Here is an overview of related roles: ![dependencies](https://raw.githubusercontent.com/robertdebock/drawings/artifacts/python_pip.png "Dependency") +## [Compatibility](#compatibility) -Compatibility -------------- - -This role has been tested on these [container images](https://hub.docker.com/): +This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): |container|tags| |---------|----| |alpine|all| -|archlinux|all| -|debian|all| |el|7, 8| -|fedora|all| +|debian|buster, bullseye| +|fedora|31, 32| |opensuse|all| -|ubuntu|artful, bionic| +|ubuntu|focal, bionic, xenial| The minimum version of Ansible required is 2.8 but tests have been done to: @@ -113,8 +125,7 @@ The minimum version of Ansible required is 2.8 but tests have been done to: - The current version. - The development version. -Exceptions ----------- +## [Exceptions](#exceptions) Some variarations of the build matrix do not work. These are the variations and reasons why the build won't work: @@ -124,10 +135,9 @@ Some variarations of the build matrix do not work. These are the variations and | amazonline | ImportError: No module named pkg_resources | -Testing -------- +## [Testing](#testing) -[Unit tests](https://travis-ci.org/robertdebock/ansible-role-python_pip) are done on every commit, pull request, release and periodically. +[Unit tests](https://travis-ci.com/robertdebock/ansible-role-python_pip) are done on every commit, pull request, release and periodically. If you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-python_pip/issues) @@ -159,13 +169,18 @@ image="centos" tox image="debian" tag="stable" tox ``` -License -------- +## [License](#license) Apache-2.0 +## [Contributors](#contributors) -Author Information ------------------- +I'd like to thank everybody that made contributions to this repository. It motivates me, improves the code and is just fun to collaborate. + +- [rohankrishnadev](https://github.com/rohankrishnadev) + +## [Author Information](#author-information) [Robert de Bock](https://robertdebock.nl/) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/python_pip/SECURITY.md b/roles/robertdebock.python_pip/SECURITY.md similarity index 76% rename from roles/python_pip/SECURITY.md rename to roles/robertdebock.python_pip/SECURITY.md index 6589dc5..fb00744 100644 --- a/roles/python_pip/SECURITY.md +++ b/roles/robertdebock.python_pip/SECURITY.md @@ -1,8 +1,8 @@ -# Security Policy +# [Security Policy](#security-policy) This software implements other software, it's not very likely that this software introduces new vulnerabilities. -## Supported Versions +## [Supported Versions](#supported-versions) The current major version is supported. For example if the current version is 3.4.1: @@ -14,10 +14,12 @@ The current major version is supported. For example if the current version is 3. | 2.0.0 | :x: | | 1.0.0 | :x: | -## Reporting a Vulnerability +## [Reporting a Vulnerability](#reporting-a-vulnarability) Please [open an issue](https://github.com/robertdebock/ansible-role-python_pip/issues) describing the vulnerability. Tell them where to go, how often they can expect to get an update on a reported vulnerability, what to expect if the vulnerability is accepted or declined, etc. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/python_pip/defaults/main.yml b/roles/robertdebock.python_pip/defaults/main.yml similarity index 66% rename from roles/python_pip/defaults/main.yml rename to roles/robertdebock.python_pip/defaults/main.yml index e4532d4..dc8580f 100644 --- a/roles/python_pip/defaults/main.yml +++ b/roles/robertdebock.python_pip/defaults/main.yml @@ -1,7 +1,11 @@ --- # defaults file for python_pip + # By default no modules should be installed. python_pip_modules: [] # Connect to a (pypi) proxy by setting this variable. # python_pip_proxy: "https://user:password@proxy:8443/artifactory/pypi/pypi-virtual/simple" + +# Don't forget to trust foreign pip repositories if you use them. +# python_pip_trusted_host: my-pip-repository.example.com diff --git a/roles/robertdebock.python_pip/meta/.galaxy_install_info b/roles/robertdebock.python_pip/meta/.galaxy_install_info new file mode 100644 index 0000000..de1c552 --- /dev/null +++ b/roles/robertdebock.python_pip/meta/.galaxy_install_info @@ -0,0 +1,2 @@ +install_date: Mon Sep 28 09:37:00 2020 +version: 3.3.11 diff --git a/roles/python_pip/meta/exception.yml b/roles/robertdebock.python_pip/meta/exception.yml similarity index 100% rename from roles/python_pip/meta/exception.yml rename to roles/robertdebock.python_pip/meta/exception.yml diff --git a/roles/python_pip/meta/main.yml b/roles/robertdebock.python_pip/meta/main.yml similarity index 85% rename from roles/python_pip/meta/main.yml rename to roles/robertdebock.python_pip/meta/main.yml index 518806e..5a7d21f 100644 --- a/roles/python_pip/meta/main.yml +++ b/roles/robertdebock.python_pip/meta/main.yml @@ -11,26 +11,26 @@ galaxy_info: - name: Alpine versions: - all - - name: ArchLinux - versions: - - all - - name: Debian - versions: - - all - name: EL versions: - 7 - 8 + - name: Debian + versions: + - buster + - bullseye - name: Fedora versions: - - all + - 31 + - 32 - name: OpenSUSE versions: - all - name: Ubuntu versions: - - artful + - focal - bionic + - xenial galaxy_tags: - python diff --git a/roles/robertdebock.python_pip/meta/preferences.yml b/roles/robertdebock.python_pip/meta/preferences.yml new file mode 100644 index 0000000..e7fdebf --- /dev/null +++ b/roles/robertdebock.python_pip/meta/preferences.yml @@ -0,0 +1,2 @@ +--- +tox_parallel: yes diff --git a/roles/robertdebock.python_pip/molecule/default/converge.yml b/roles/robertdebock.python_pip/molecule/default/converge.yml new file mode 100644 index 0000000..ee3c770 --- /dev/null +++ b/roles/robertdebock.python_pip/molecule/default/converge.yml @@ -0,0 +1,8 @@ +--- +- name: Converge + hosts: all + become: yes + gather_facts: yes + + roles: + - role: ansible-role-python_pip diff --git a/roles/python_pip/molecule/default/molecule.yml b/roles/robertdebock.python_pip/molecule/default/molecule.yml similarity index 78% rename from roles/python_pip/molecule/default/molecule.yml rename to roles/robertdebock.python_pip/molecule/default/molecule.yml index 5fc9054..ccbf3f0 100644 --- a/roles/python_pip/molecule/default/molecule.yml +++ b/roles/robertdebock.python_pip/molecule/default/molecule.yml @@ -6,8 +6,9 @@ dependency: name: galaxy options: role-file: requirements.yml -lint: - name: yamllint +lint: | + set -e + yamllint . driver: name: docker platforms: @@ -20,10 +21,9 @@ platforms: pre_build_image: yes provisioner: name: ansible + config_options: + defaults: + stdout_callback: yaml + bin_ansible_callbacks: yes verifier: name: ansible - lint: - name: ansible-lint - enabled: no -scenario: - name: default diff --git a/roles/robertdebock.python_pip/molecule/default/prepare.yml b/roles/robertdebock.python_pip/molecule/default/prepare.yml new file mode 100644 index 0000000..1772675 --- /dev/null +++ b/roles/robertdebock.python_pip/molecule/default/prepare.yml @@ -0,0 +1,10 @@ +--- +- name: Prepare + hosts: all + gather_facts: no + become: yes + + roles: + - role: robertdebock.bootstrap + - role: robertdebock.epel + - role: robertdebock.buildtools diff --git a/roles/robertdebock.python_pip/molecule/default/verify.yml b/roles/robertdebock.python_pip/molecule/default/verify.yml new file mode 100644 index 0000000..691b58d --- /dev/null +++ b/roles/robertdebock.python_pip/molecule/default/verify.yml @@ -0,0 +1,27 @@ +--- +- name: Verify + hosts: all + become: yes + gather_facts: no + + tasks: + - name: install pip module + pip: + name: docker + state: present + + - name: check if bootstrap still works. + include_role: + name: robertdebock.bootstrap + + - name: remove pip module + pip: + name: docker + state: absent + + - name: check if requested modules can be installed + include_role: + name: ansible-role-python_pip + vars: + python_pip_modules: + - name: docker diff --git a/roles/python_pip/requirements.yml b/roles/robertdebock.python_pip/requirements.yml similarity index 100% rename from roles/python_pip/requirements.yml rename to roles/robertdebock.python_pip/requirements.yml diff --git a/roles/robertdebock.python_pip/tasks/assert.yml b/roles/robertdebock.python_pip/tasks/assert.yml new file mode 100644 index 0000000..aad155b --- /dev/null +++ b/roles/robertdebock.python_pip/tasks/assert.yml @@ -0,0 +1,23 @@ +--- +- name: test if python_pip_modules is set correctly + assert: + that: + - python_pip_modules is defined + - python_pip_modules | type_debug == "list" + quiet: yes + +- name: test if python_pip_proxy is set correctly + assert: + that: + - python_pip_proxy | length > 0 + quiet: yes + when: + - python_pip_proxy is defined + +- name: test if python_pip_trusted_host is set correctly + assert: + that: + - python_pip_trusted_host | length > 0 + quiet: yes + when: + - python_pip_trusted_host is defined diff --git a/roles/python_pip/tasks/main.yml b/roles/robertdebock.python_pip/tasks/main.yml similarity index 60% rename from roles/python_pip/tasks/main.yml rename to roles/robertdebock.python_pip/tasks/main.yml index 64e25e5..27d40c9 100644 --- a/roles/python_pip/tasks/main.yml +++ b/roles/robertdebock.python_pip/tasks/main.yml @@ -1,12 +1,12 @@ --- # tasks file for python_pip +- name: include assert.yml + include_tasks: assert.yml + - name: install python pip package: name: "{{ python_pip_packages }}" state: present - register: python_pip_install_python_pip - until: python_pip_install_python_pip is succeeded - retries: 3 - name: configure pip proxy ini_file: @@ -14,18 +14,25 @@ section: global option: index-url value: "{{ python_pip_proxy }}" + mode: "0644" when: - python_pip_proxy is defined +- name: trust hosts + ini_file: + path: /etc/pip.conf + section: global + option: trusted-host + value: "{{ python_pip_trusted_host }}" + mode: "0644" + when: + - python_pip_trusted_host is defined + - name: install requested modules pip: name: "{{ item.name }}" state: present version: "{{ item.version | default(omit) }}" - with_items: - - "{{ python_pip_modules }}" + loop: "{{ python_pip_modules }}" loop_control: label: "{{ item.name }}" - register: install_requested_modules - until: install_requested_modules is succeeded - retries: 3 diff --git a/roles/robertdebock.python_pip/tox.ini b/roles/robertdebock.python_pip/tox.ini new file mode 100644 index 0000000..c1bc1d4 --- /dev/null +++ b/roles/robertdebock.python_pip/tox.ini @@ -0,0 +1,26 @@ +# +# Ansible managed +# +[tox] +minversion = 3.7 +# Disabled "next" because of: +# https://github.com/ansible-community/molecule/issues/2626. +# envlist = py{38}-ansible-{previous,current,next} +envlist = py{38}-ansible-{previous,current} +skipsdist = true + +[testenv] +deps = + previous: ansible>=2.8, <2.9 + current: ansible>=2.9 + next: git+https://github.com/ansible/ansible.git@devel + molecule[lint]>=3, <4 + docker>=4.2, <4.3 +commands = molecule test +setenv = + TOX_ENVNAME={envname} + MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} + PY_COLORS=1 + ANSIBLE_FORCE_COLOR=1 + +passenv = namespace image tag diff --git a/roles/robertdebock.python_pip/vars/main.yml b/roles/robertdebock.python_pip/vars/main.yml new file mode 100644 index 0000000..3fd72f5 --- /dev/null +++ b/roles/robertdebock.python_pip/vars/main.yml @@ -0,0 +1,22 @@ +--- +# vars file for python_pip + +_python_pip_packages: + Alpine: + - py3-pip + - py3-setuptools + - python3-dev + Debian: + - python3-pip + - python3-setuptools + RedHat-7: + - python2-pip + - python-setuptools + RedHat: + - python3-pip + - python3-setuptools + Suse: + - python-pip + - python-setuptools + +python_pip_packages: "{{ _python_pip_packages[ansible_os_family ~ '-' ~ ansible_distribution_major_version] | default(_python_pip_packages[ansible_os_family] | default(_python_pip_packages['default'])) }}" diff --git a/roles/robertdebock.reboot/.ansible-lint b/roles/robertdebock.reboot/.ansible-lint new file mode 100644 index 0000000..acb2d05 --- /dev/null +++ b/roles/robertdebock.reboot/.ansible-lint @@ -0,0 +1,6 @@ +# +# Ansible managed +# +exclude_paths: + - ./meta/preferences.yml + - ./molecule/default/verify.yml diff --git a/roles/robertdebock.reboot/.github/FUNDING.yml b/roles/robertdebock.reboot/.github/FUNDING.yml new file mode 100644 index 0000000..67320f0 --- /dev/null +++ b/roles/robertdebock.reboot/.github/FUNDING.yml @@ -0,0 +1,2 @@ +--- +github: robertdebock diff --git a/roles/robertdebock.reboot/.github/ISSUE_TEMPLATE/bug_report.md b/roles/robertdebock.reboot/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..f39b5dc --- /dev/null +++ b/roles/robertdebock.reboot/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a report to help me improve + +--- + +## Describe the bug +A clear and concise description of what the bug is. + +## Playbook + +Please paste the playbook you are using. (Consider `requirements.yml` and +optionally the command you've invoked.) + + +```yaml +--- +YOUR PLAYBOOK HERE +``` + +## Output + +Show at least the error, possible related output, maybe just all the output. + +## Environment + +- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) +- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) +- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.reboot/.github/ISSUE_TEMPLATE/feature_request.md b/roles/robertdebock.reboot/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..55a93c4 --- /dev/null +++ b/roles/robertdebock.reboot/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +## Proposed feature + +A clear and concise description of what you want to happen. + +## Rationale + +Why is this feature required? + +## Additional context + +Add any other context about the feature request here. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/reboot/PULL_REQUEST_TEMPLATE.md b/roles/robertdebock.reboot/.github/pull_request_template.md similarity index 100% rename from roles/reboot/PULL_REQUEST_TEMPLATE.md rename to roles/robertdebock.reboot/.github/pull_request_template.md diff --git a/roles/reboot/.github/settings.yml b/roles/robertdebock.reboot/.github/settings.yml similarity index 100% rename from roles/reboot/.github/settings.yml rename to roles/robertdebock.reboot/.github/settings.yml diff --git a/roles/robertdebock.reboot/.github/workflows/galaxy.yml b/roles/robertdebock.reboot/.github/workflows/galaxy.yml new file mode 100644 index 0000000..87ced73 --- /dev/null +++ b/roles/robertdebock.reboot/.github/workflows/galaxy.yml @@ -0,0 +1,22 @@ +--- +# +# Ansible managed +# + +name: Release to Ansible Galaxy + +on: + push: + tags: + - '*' + schedule: + - cron: '18 18 18 * *' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: galaxy + uses: robertdebock/galaxy-action@1.0.1 + with: + galaxy_api_key: ${{ secrets.galaxy_api_key }} diff --git a/roles/robertdebock.reboot/.github/workflows/molecule.yml b/roles/robertdebock.reboot/.github/workflows/molecule.yml new file mode 100644 index 0000000..355a68d --- /dev/null +++ b/roles/robertdebock.reboot/.github/workflows/molecule.yml @@ -0,0 +1,78 @@ +--- +# +# Ansible managed +# + +name: Ansible Molecule + +on: + push: + tags_ignore: + - '*' + pull_request: + schedule: + - cron: '18 18 18 * *' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: molecule + uses: robertdebock/molecule-action@2.6.1 + with: + command: lint + test: + needs: + - lint + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + config: + - image: "alpine" + tag: "latest" + - image: "alpine" + tag: "edge" + - image: "amazonlinux" + tag: "1" + - image: "centos" + tag: "7" + - image: "centos" + tag: "latest" + - image: "debian" + tag: "latest" + - image: "debian" + tag: "bullseye" + - image: "fedora" + tag: "31" + - image: "fedora" + tag: "latest" + - image: "opensuse" + tag: "latest" + - image: "ubuntu" + tag: "latest" + - image: "ubuntu" + tag: "bionic" + - image: "ubuntu" + tag: "xenial" + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: disable apparmor for mysql + run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + - name: parse apparmor for mysql + run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + - name: molecule + uses: robertdebock/molecule-action@2.6.1 + with: + image: ${{ matrix.config.image }} + tag: ${{ matrix.config.tag }} + options: "--parallel all" + env: + TOX_PARALLEL_NO_SPINNER: 1 diff --git a/roles/reboot/.gitignore b/roles/robertdebock.reboot/.gitignore similarity index 100% rename from roles/reboot/.gitignore rename to roles/robertdebock.reboot/.gitignore diff --git a/roles/robertdebock.reboot/.travis.yml b/roles/robertdebock.reboot/.travis.yml new file mode 100644 index 0000000..b82a0ab --- /dev/null +++ b/roles/robertdebock.reboot/.travis.yml @@ -0,0 +1,44 @@ +--- +# +# Ansible managed +# +language: python + +python: + - "3.8" + +services: + - docker + +env: + global: + namespace="robertdebock" + matrix: + - image="alpine" tag="latest" + - image="alpine" tag="edge" + - image="amazonlinux" tag="1" + - image="centos" tag="7" + - image="centos" tag="latest" + - image="debian" tag="latest" + - image="debian" tag="bullseye" + - image="fedora" tag="31" + - image="fedora" tag="latest" + - image="opensuse" tag="latest" + - image="ubuntu" tag="latest" + - image="ubuntu" tag="bionic" + - image="ubuntu" tag="xenial" + +cache: + - pip + +install: + - pip install --upgrade pip + - pip install tox + +script: + - function retry { counter=0 ; until "$@" ; do exit=$? ; counter=$(($counter + 1)) ; if [ $counter -ge 3 ] ; then return $exit ; fi ; done ; return 0; } ; retry tox --parallel all + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ + slack: "FEoY3mASqF90TCYAHL8TycD+EWHVn/qyrvQg6p/KNEd6Gq+g6Q2p5DgUez1Pd7218mkqptsn4DHOF/B9gywNmfHR4XAfJzpM7cW+tNH0LKtzRor6nuFR0CSvxUitVYA5ZhfLq7obuByFNYQK1mIq/E86R9H634FaMzAacp7z5Lxbml+QYx6G+G4P/uAXo9fgqO6lKs9F6YAf4X/Zoauk9R6jxfklx1Pl8iMlWddViigBgxUa9B2+MbGby4QHBv1TCVJMnx0EMqZ7Bar0lititnNtBHWt5m8u563mDlIdXv7ubU0dE0MYjd0tnkoR2gDxhJDWyLGpsePNyPBPRV+fgRiHVCT13TbA3fI/OWUPYEi1jODrsXrGqV1yEmx0iot+XCWYJkXD/nkuAj+AbwORYEZScnwm8H42E8UpsCL3+mXOxV+EWRcUqOc9W6AnrdSNHu42Klg7zJsrcxY0i/yOtsBdZl7MHQpetsUXJuJt1DjnXeqcPadi4K2WkHBFyO2HUbbPK0g3Uq+9NVvTq+1BlQ5Jz88HRRGtl+FtvgFowfatIX2GpDrjlNVAZTo2G3kOgnSom8w/A41yBHqI52QQab8BUxZIGLxEFtVmPjieeWU+C5M68kCMoZnz4iqkvgc6OVvHOpbQg3JOVxjlYf7o+gHEzSFzjy/nYguwe5nLS1g=" + email: false diff --git a/roles/ansible/.yamllint b/roles/robertdebock.reboot/.yamllint similarity index 97% rename from roles/ansible/.yamllint rename to roles/robertdebock.reboot/.yamllint index ad0be76..c5ae64b 100644 --- a/roles/ansible/.yamllint +++ b/roles/robertdebock.reboot/.yamllint @@ -1,3 +1,4 @@ +--- extends: default rules: diff --git a/roles/reboot/CODE_OF_CONDUCT.md b/roles/robertdebock.reboot/CODE_OF_CONDUCT.md similarity index 100% rename from roles/reboot/CODE_OF_CONDUCT.md rename to roles/robertdebock.reboot/CODE_OF_CONDUCT.md diff --git a/roles/robertdebock.reboot/CONTRIBUTING.md b/roles/robertdebock.reboot/CONTRIBUTING.md new file mode 100644 index 0000000..0c0afe0 --- /dev/null +++ b/roles/robertdebock.reboot/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# [Please contribute](#please-contribute) + +You can really make a difference by: + +- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) +- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. + +I'll try to help and take every contribution seriously. + +It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. + +## [Step by step](#step-by-step) + +Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. + +### [1. Make an issue.](#1-make-an-issue) + +When you spot an issue, [create an issue](https://github.com/robertdebock/ansible-role-reboot/issues). + +Making the issue help me and others to find similar problems in the future. + +### [2. Fork the project.](#2-fork-the-project) + +On the top right side of [the repository on GitHub](https://github.com/robertdebock/ansible-role-reboot), click `fork`. This copies everything to your GitHub namespace. + +### [3. Make the changes](#3-make-the-changes) + +In you own GitHub namespace, make the required changes. + +I typically do that by cloning the repository (in your namespace) locally: + +``` +git clone git@github.com:YOURNAMESPACE/ansible-role-reboot.git +``` + +Now you can start to edit on your laptop. + +### [4. Optionally: test your changes](#4-optionally-test-your-changes) + +Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): + +``` +pip install molecule tox ansible-lint docker +``` + +And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: + +``` +image=centos tag=7 molecule test +``` + +Once it start to work, you can test multiple version of Ansible: + +``` +image=centos tag=7 tox +``` + +### [5. Optionally: Regenerate all dynamic content](#5-optionally-regenerate-all-dynamic-content) + +You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. + +If you don't do it, I'll do it later for you. + +### [6. Make a pull request](#6-make-a-pull-request) + +[GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. + +In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. + +### [7. Wait](#7-wait) + +Now I'll get a message that you've added some code. Thank you, really. + +CI starts to test your changes. You can follow the progress on Travis. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.reboot/LICENSE b/roles/robertdebock.reboot/LICENSE new file mode 100644 index 0000000..bd15893 --- /dev/null +++ b/roles/robertdebock.reboot/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Robert de Bock (robert@meinit.nl) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/roles/reboot/README.md b/roles/robertdebock.reboot/README.md similarity index 55% rename from roles/reboot/README.md rename to roles/robertdebock.reboot/README.md index 273af57..c57f517 100644 --- a/roles/reboot/README.md +++ b/roles/robertdebock.reboot/README.md @@ -1,15 +1,14 @@ -reboot -========= - -Ansible logo - Build status +# [reboot](#reboot) The purpose of this role is to reboot your system. -Example Playbook ----------------- +|Travis|GitHub|Quality|Downloads|Version| +|------|------|-------|---------|-------| +|[![travis](https://travis-ci.com/robertdebock/ansible-role-reboot.svg?branch=master)](https://travis-ci.com/robertdebock/ansible-role-reboot)|[![github](https://github.com/robertdebock/ansible-role-reboot/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-reboot/actions)|[![quality](https://img.shields.io/ansible/quality/30570)](https://galaxy.ansible.com/robertdebock/reboot)|[![downloads](https://img.shields.io/ansible/role/d/30570)](https://galaxy.ansible.com/robertdebock/reboot)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-reboot.svg)](https://github.com/robertdebock/ansible-role-reboot/releases/)| -This example is taken from `molecule/resources/playbook.yml` and is tested on each push, pull request and release. +## [Example Playbook](#example-playbook) + +This example is taken from `molecule/resources/converge.yml` and is tested on each push, pull request and release. ```yaml --- - name: Converge @@ -18,10 +17,10 @@ This example is taken from `molecule/resources/playbook.yml` and is tested on ea gather_facts: yes roles: - - robertdebock.reboot + - role: robertdebock.reboot ``` -The machine you are running this on, may need to be prepared, I use this playbook to ensure everything is in place to let the role work. +The machine may need to be prepared using `molecule/resources/prepare.yml`: ```yaml --- - name: Prepare @@ -30,14 +29,25 @@ The machine you are running this on, may need to be prepared, I use this playboo become: yes roles: - - robertdebock.bootstrap + - role: robertdebock.bootstrap ``` +For verification `molecule/resources/verify.yml` run after the role has been applied. +```yaml +--- +- name: Verify + hosts: all + become: yes + gather_facts: yes + + tasks: + - name: check if connection still works + ping: +``` Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles. -Role Variables --------------- +## [Role Variables](#role-variables) These variables are set in `defaults/main.yml`: ```yaml @@ -58,8 +68,7 @@ reboot_up_delay: 8 reboot_message: "Ansible role robertdebock.reboot initiated a reboot." ``` -Requirements ------------- +## [Requirements](#requirements) - Access to a repository containing packages, likely on the internet. - A recent version of Ansible. (Tests run on the current, previous and next release of Ansible.) @@ -72,55 +81,38 @@ The following roles can be installed to ensure all requirements are met, using ` ``` -Context -------- +## [Context](#context) This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information. Here is an overview of related roles: ![dependencies](https://raw.githubusercontent.com/robertdebock/drawings/artifacts/reboot.png "Dependency") +## [Compatibility](#compatibility) -Compatibility -------------- +This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): -This role has been tested on these [container images](https://hub.docker.com/): +|container|tags| +|---------|----| +|alpine|all| +|amazon|2018.03| +|el|7, 8| +|debian|buster, bullseye| +|fedora|31, 32| +|opensuse|all| +|ubuntu|focal, bionic, xenial| -|container|tag|allow_failures| -|---------|---|--------------| -|alpine|latest|no| -|alpine|edge|yes| -|debian|unstable|yes| -|debian|latest|no| -|centos|7|no| -|redhat|7|no| -|centos|latest|no| -|redhat|latest|no| -|fedora|latest|no| -|fedora|rawhide|yes| -|opensuse|latest|no| -|ubuntu|latest|no| +The minimum version of Ansible required is 2.8 but tests have been done to: -This role has been tested on these Ansible versions: - -- ansible>=2.8, <2.9 -- ansible>=2.9 -- git+https://github.com/ansible/ansible.git@devel - -Exceptions ----------- - -Some variarations of the build matrix do not work. These are the variations and reasons why the build won't work: - -| variation | reason | -|---------------------------|------------------------| -| archlinux/base | New-style module did not handle its own exit | +- The previous version, on version lower. +- The current version. +- The development version. -Testing -------- -[Unit tests](https://travis-ci.org/robertdebock/ansible-role-reboot) are done on every commit, pull request, release and periodically. +## [Testing](#testing) + +[Unit tests](https://travis-ci.com/robertdebock/ansible-role-reboot) are done on every commit, pull request, release and periodically. If you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-reboot/issues) @@ -152,29 +144,19 @@ image="centos" tox image="debian" tag="stable" tox ``` -Modules -------- - -This role uses the following modules: -```yaml ---- -- command -- meta -- package -- pause -- setup -- shell -- stat -- wait_for_connection -``` - -License -------- +## [License](#license) Apache-2.0 +## [Contributors](#contributors) -Author Information ------------------- +I'd like to thank everybody that made contributions to this repository. It motivates me, improves the code and is just fun to collaborate. + +- [aisbergg](https://github.com/aisbergg) +- [richardlock](https://github.com/richardlock) + +## [Author Information](#author-information) [Robert de Bock](https://robertdebock.nl/) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/reboot/SECURITY.md b/roles/robertdebock.reboot/SECURITY.md similarity index 76% rename from roles/reboot/SECURITY.md rename to roles/robertdebock.reboot/SECURITY.md index 6293767..a25a3a8 100644 --- a/roles/reboot/SECURITY.md +++ b/roles/robertdebock.reboot/SECURITY.md @@ -1,8 +1,8 @@ -# Security Policy +# [Security Policy](#security-policy) This software implements other software, it's not very likely that this software introduces new vulnerabilities. -## Supported Versions +## [Supported Versions](#supported-versions) The current major version is supported. For example if the current version is 3.4.1: @@ -14,10 +14,12 @@ The current major version is supported. For example if the current version is 3. | 2.0.0 | :x: | | 1.0.0 | :x: | -## Reporting a Vulnerability +## [Reporting a Vulnerability](#reporting-a-vulnarability) Please [open an issue](https://github.com/robertdebock/ansible-role-reboot/issues) describing the vulnerability. Tell them where to go, how often they can expect to get an update on a reported vulnerability, what to expect if the vulnerability is accepted or declined, etc. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/reboot/defaults/main.yml b/roles/robertdebock.reboot/defaults/main.yml similarity index 100% rename from roles/reboot/defaults/main.yml rename to roles/robertdebock.reboot/defaults/main.yml diff --git a/roles/robertdebock.reboot/meta/.galaxy_install_info b/roles/robertdebock.reboot/meta/.galaxy_install_info new file mode 100644 index 0000000..badafb5 --- /dev/null +++ b/roles/robertdebock.reboot/meta/.galaxy_install_info @@ -0,0 +1,2 @@ +install_date: Mon Sep 28 09:37:03 2020 +version: 2.6.2 diff --git a/roles/reboot/meta/main.yml b/roles/robertdebock.reboot/meta/main.yml similarity index 79% rename from roles/reboot/meta/main.yml rename to roles/robertdebock.reboot/meta/main.yml index 668b055..8adbcda 100644 --- a/roles/reboot/meta/main.yml +++ b/roles/robertdebock.reboot/meta/main.yml @@ -11,27 +11,32 @@ galaxy_info: - name: Alpine versions: - all - - name: Debian + - name: Amazon versions: - - all + - 2018.03 - name: EL versions: - 7 - 8 + - name: Debian + versions: + - buster + - bullseye - name: Fedora versions: - - all + - 31 + - 32 - name: OpenSUSE versions: - all - name: Ubuntu versions: - - artful + - focal - bionic + - xenial galaxy_tags: - reboot - - archlinux - centos - redhat diff --git a/roles/robertdebock.reboot/meta/preferences.yml b/roles/robertdebock.reboot/meta/preferences.yml new file mode 100644 index 0000000..e7fdebf --- /dev/null +++ b/roles/robertdebock.reboot/meta/preferences.yml @@ -0,0 +1,2 @@ +--- +tox_parallel: yes diff --git a/roles/robertdebock.reboot/molecule/default/converge.yml b/roles/robertdebock.reboot/molecule/default/converge.yml new file mode 100644 index 0000000..f85ea78 --- /dev/null +++ b/roles/robertdebock.reboot/molecule/default/converge.yml @@ -0,0 +1,8 @@ +--- +- name: Converge + hosts: all + become: yes + gather_facts: yes + + roles: + - role: ansible-role-reboot diff --git a/roles/reboot/molecule/default/molecule.yml b/roles/robertdebock.reboot/molecule/default/molecule.yml similarity index 64% rename from roles/reboot/molecule/default/molecule.yml rename to roles/robertdebock.reboot/molecule/default/molecule.yml index 6c474e9..9340432 100644 --- a/roles/reboot/molecule/default/molecule.yml +++ b/roles/robertdebock.reboot/molecule/default/molecule.yml @@ -6,8 +6,10 @@ dependency: name: galaxy options: role-file: requirements.yml -lint: - name: yamllint +lint: | + PATH=${PATH} + yamllint molecule/default/converge.yml + ansible-lint molecule/default/converge.yml driver: name: docker platforms: @@ -20,5 +22,9 @@ platforms: pre_build_image: yes provisioner: name: ansible -scenario: - name: default + config_options: + defaults: + stdout_callback: yaml + bin_ansible_callbacks: yes +verifier: + name: ansible diff --git a/roles/epel/molecule/default/prepare.yml b/roles/robertdebock.reboot/molecule/default/prepare.yml similarity index 68% rename from roles/epel/molecule/default/prepare.yml rename to roles/robertdebock.reboot/molecule/default/prepare.yml index 1cda60c..feb7d81 100644 --- a/roles/epel/molecule/default/prepare.yml +++ b/roles/robertdebock.reboot/molecule/default/prepare.yml @@ -5,4 +5,4 @@ become: yes roles: - - robertdebock.bootstrap + - role: robertdebock.bootstrap diff --git a/roles/robertdebock.reboot/molecule/default/verify.yml b/roles/robertdebock.reboot/molecule/default/verify.yml new file mode 100644 index 0000000..6ab75cf --- /dev/null +++ b/roles/robertdebock.reboot/molecule/default/verify.yml @@ -0,0 +1,9 @@ +--- +- name: Verify + hosts: all + become: yes + gather_facts: yes + + tasks: + - name: check if connection still works + ping: diff --git a/roles/ruby/requirements.yml b/roles/robertdebock.reboot/requirements.yml similarity index 100% rename from roles/ruby/requirements.yml rename to roles/robertdebock.reboot/requirements.yml diff --git a/roles/robertdebock.reboot/tasks/assert.yml b/roles/robertdebock.reboot/tasks/assert.yml new file mode 100644 index 0000000..7545ed6 --- /dev/null +++ b/roles/robertdebock.reboot/tasks/assert.yml @@ -0,0 +1,30 @@ +--- +- name: test if reboot_always is set correctly + assert: + that: + - reboot_always is defined + - reboot_always | type_debug == "bool" + quiet: yes + +- name: test if reboot_delay is set correctly + assert: + that: + - reboot_delay is defined + - reboot_delay | int + - reboot_delay | int >= 0 + quiet: yes + +- name: test if reboot_up_delay is set correctly + assert: + that: + - reboot_up_delay is defined + - reboot_up_delay | int + - reboot_up_delay | int >= 0 + quiet: yes + +- name: test if reboot_message is set correctly + assert: + that: + - reboot_message is defined + - reboot_message | length > 0 + quiet: yes diff --git a/roles/robertdebock.reboot/tasks/main.yml b/roles/robertdebock.reboot/tasks/main.yml new file mode 100644 index 0000000..978ff5a --- /dev/null +++ b/roles/robertdebock.reboot/tasks/main.yml @@ -0,0 +1,49 @@ +--- +# tasks file for reboot +- name: include assert.yml + include_tasks: assert.yml + +- name: install requirements + package: + name: "{{ reboot_requirements }}" + state: present + +- when: + - ansible_connection != "docker" + - ansible_os_family == "RedHat" + block: + - name: check for needs-restarting executable (rhel) + stat: + path: /usr/bin/needs-restarting + register: reboot_rhel_needs_restarting_executable + + - name: see if a reboot is required (rhel) + command: needs-restarting -r + check_mode: no + register: reboot_rhel_needsrestarting + changed_when: reboot_rhel_needsrestarting.rc == 1 + failed_when: reboot_rhel_needsrestarting.rc not in [0,1] + when: reboot_rhel_needs_restarting_executable.stat.exists + +- when: + - ansible_connection != "docker" + - ansible_os_family == "Debian" + block: + - name: check for needrestart executable (debian) + stat: + path: /usr/sbin/needrestart + register: reboot_debian_needsrestart_executable + + - name: see if a reboot is required (debian) + command: needrestart -b + check_mode: no + register: reboot_debian_needrestarting + changed_when: "'NEEDRESTART-KSTA: 3' in reboot_debian_needrestarting.stdout_lines" + when: reboot_debian_needsrestart_executable.stat.exists + +- when: + - ansible_connection != "docker" + - (reboot_always | bool) + or (reboot_rhel_needsrestarting.changed | default(no)) + or (reboot_debian_needrestarting.changed | default(no)) + include_tasks: reboot.yml diff --git a/roles/robertdebock.reboot/tasks/reboot.yml b/roles/robertdebock.reboot/tasks/reboot.yml new file mode 100644 index 0000000..6ec6461 --- /dev/null +++ b/roles/robertdebock.reboot/tasks/reboot.yml @@ -0,0 +1,20 @@ +--- +- name: flush notified handlers + meta: flush_handlers + +- name: reboot the machine + shell: "(sleep {{ reboot_delay }} && {{ reboot_command }} &)" # noqa 301 This was before the reboot module existed. + async: 1 + poll: 0 + ignore_errors: yes + +- name: 1 wait for the start of reboot + pause: + seconds: "{{ reboot_delay }}" + +- name: 2 wait for the machine to be up + wait_for_connection: + delay: "{{ reboot_up_delay }}" + +- name: 3 gather facts after reboot + setup: diff --git a/roles/robertdebock.reboot/tox.ini b/roles/robertdebock.reboot/tox.ini new file mode 100644 index 0000000..c1bc1d4 --- /dev/null +++ b/roles/robertdebock.reboot/tox.ini @@ -0,0 +1,26 @@ +# +# Ansible managed +# +[tox] +minversion = 3.7 +# Disabled "next" because of: +# https://github.com/ansible-community/molecule/issues/2626. +# envlist = py{38}-ansible-{previous,current,next} +envlist = py{38}-ansible-{previous,current} +skipsdist = true + +[testenv] +deps = + previous: ansible>=2.8, <2.9 + current: ansible>=2.9 + next: git+https://github.com/ansible/ansible.git@devel + molecule[lint]>=3, <4 + docker>=4.2, <4.3 +commands = molecule test +setenv = + TOX_ENVNAME={envname} + MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} + PY_COLORS=1 + ANSIBLE_FORCE_COLOR=1 + +passenv = namespace image tag diff --git a/roles/reboot/vars/main.yml b/roles/robertdebock.reboot/vars/main.yml similarity index 57% rename from roles/reboot/vars/main.yml rename to roles/robertdebock.reboot/vars/main.yml index 3ae0173..2ca3545 100644 --- a/roles/reboot/vars/main.yml +++ b/roles/robertdebock.reboot/vars/main.yml @@ -1,18 +1,15 @@ --- # vars file for reboot + _reboot_requirements: default: [] + Debian: needrestart CentOS: yum-utils Fedora: dnf-utils + Ubuntu: needrestart reboot_requirements: "{{ _reboot_requirements[ansible_distribution] | default(_reboot_requirements['default']) }}" -_reboot_needs_restarting_command: - RedHat-7: needs-restarting -r - RedHat: needs-restarting - -reboot_needs_restarting_command: "{{ _reboot_needs_restarting_command[ansible_os_family ~ '-' ~ ansible_distribution_major_version] | default(_reboot_needs_restarting_command[ansible_os_family]) }}" - _reboot_command: default: shutdown -r now {{ reboot_message }} Alpine: reboot diff --git a/roles/robertdebock.ruby/.ansible-lint b/roles/robertdebock.ruby/.ansible-lint new file mode 100644 index 0000000..acb2d05 --- /dev/null +++ b/roles/robertdebock.ruby/.ansible-lint @@ -0,0 +1,6 @@ +# +# Ansible managed +# +exclude_paths: + - ./meta/preferences.yml + - ./molecule/default/verify.yml diff --git a/roles/robertdebock.ruby/.github/FUNDING.yml b/roles/robertdebock.ruby/.github/FUNDING.yml new file mode 100644 index 0000000..67320f0 --- /dev/null +++ b/roles/robertdebock.ruby/.github/FUNDING.yml @@ -0,0 +1,2 @@ +--- +github: robertdebock diff --git a/roles/robertdebock.ruby/.github/ISSUE_TEMPLATE/bug_report.md b/roles/robertdebock.ruby/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..f39b5dc --- /dev/null +++ b/roles/robertdebock.ruby/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a report to help me improve + +--- + +## Describe the bug +A clear and concise description of what the bug is. + +## Playbook + +Please paste the playbook you are using. (Consider `requirements.yml` and +optionally the command you've invoked.) + + +```yaml +--- +YOUR PLAYBOOK HERE +``` + +## Output + +Show at least the error, possible related output, maybe just all the output. + +## Environment + +- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) +- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) +- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.ruby/.github/ISSUE_TEMPLATE/feature_request.md b/roles/robertdebock.ruby/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..55a93c4 --- /dev/null +++ b/roles/robertdebock.ruby/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +## Proposed feature + +A clear and concise description of what you want to happen. + +## Rationale + +Why is this feature required? + +## Additional context + +Add any other context about the feature request here. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/ruby/PULL_REQUEST_TEMPLATE.md b/roles/robertdebock.ruby/.github/pull_request_template.md similarity index 100% rename from roles/ruby/PULL_REQUEST_TEMPLATE.md rename to roles/robertdebock.ruby/.github/pull_request_template.md diff --git a/roles/ruby/.github/settings.yml b/roles/robertdebock.ruby/.github/settings.yml similarity index 100% rename from roles/ruby/.github/settings.yml rename to roles/robertdebock.ruby/.github/settings.yml diff --git a/roles/robertdebock.ruby/.github/workflows/galaxy.yml b/roles/robertdebock.ruby/.github/workflows/galaxy.yml new file mode 100644 index 0000000..87ced73 --- /dev/null +++ b/roles/robertdebock.ruby/.github/workflows/galaxy.yml @@ -0,0 +1,22 @@ +--- +# +# Ansible managed +# + +name: Release to Ansible Galaxy + +on: + push: + tags: + - '*' + schedule: + - cron: '18 18 18 * *' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: galaxy + uses: robertdebock/galaxy-action@1.0.1 + with: + galaxy_api_key: ${{ secrets.galaxy_api_key }} diff --git a/roles/robertdebock.ruby/.github/workflows/molecule.yml b/roles/robertdebock.ruby/.github/workflows/molecule.yml new file mode 100644 index 0000000..355a68d --- /dev/null +++ b/roles/robertdebock.ruby/.github/workflows/molecule.yml @@ -0,0 +1,78 @@ +--- +# +# Ansible managed +# + +name: Ansible Molecule + +on: + push: + tags_ignore: + - '*' + pull_request: + schedule: + - cron: '18 18 18 * *' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: molecule + uses: robertdebock/molecule-action@2.6.1 + with: + command: lint + test: + needs: + - lint + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + config: + - image: "alpine" + tag: "latest" + - image: "alpine" + tag: "edge" + - image: "amazonlinux" + tag: "1" + - image: "centos" + tag: "7" + - image: "centos" + tag: "latest" + - image: "debian" + tag: "latest" + - image: "debian" + tag: "bullseye" + - image: "fedora" + tag: "31" + - image: "fedora" + tag: "latest" + - image: "opensuse" + tag: "latest" + - image: "ubuntu" + tag: "latest" + - image: "ubuntu" + tag: "bionic" + - image: "ubuntu" + tag: "xenial" + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: disable apparmor for mysql + run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + - name: parse apparmor for mysql + run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + - name: molecule + uses: robertdebock/molecule-action@2.6.1 + with: + image: ${{ matrix.config.image }} + tag: ${{ matrix.config.tag }} + options: "--parallel all" + env: + TOX_PARALLEL_NO_SPINNER: 1 diff --git a/roles/ruby/.gitignore b/roles/robertdebock.ruby/.gitignore similarity index 100% rename from roles/ruby/.gitignore rename to roles/robertdebock.ruby/.gitignore diff --git a/roles/robertdebock.ruby/.travis.yml b/roles/robertdebock.ruby/.travis.yml new file mode 100644 index 0000000..eae6e48 --- /dev/null +++ b/roles/robertdebock.ruby/.travis.yml @@ -0,0 +1,44 @@ +--- +# +# Ansible managed +# +language: python + +python: + - "3.8" + +services: + - docker + +env: + global: + namespace="robertdebock" + matrix: + - image="alpine" tag="latest" + - image="alpine" tag="edge" + - image="amazonlinux" tag="1" + - image="centos" tag="7" + - image="centos" tag="latest" + - image="debian" tag="latest" + - image="debian" tag="bullseye" + - image="fedora" tag="31" + - image="fedora" tag="latest" + - image="opensuse" tag="latest" + - image="ubuntu" tag="latest" + - image="ubuntu" tag="bionic" + - image="ubuntu" tag="xenial" + +cache: + - pip + +install: + - pip install --upgrade pip + - pip install tox + +script: + - function retry { counter=0 ; until "$@" ; do exit=$? ; counter=$(($counter + 1)) ; if [ $counter -ge 3 ] ; then return $exit ; fi ; done ; return 0; } ; retry tox --parallel all + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ + slack: "dr3U8w5uZK/8zr6PK0vkb8Mw2yINvH0F7UyftkVl8ex6M1qrO9ie5h8vvr5bEF9S/H5gpR+UBJfCBlRbXwEvTPyCBhinMBfMl7zfooOgShBcNYK/KpNHVcHui/dE8dMEWD5y1bkaA8D3EuGBQSRIBd+qNfT+C32jbkTJdn/JisOpXUeSJDeWubVs/pB0pq6i93VNgJGgs81mhUhZK15RaVzHhlbCn+uCyASy5jTnycA/MbzPBtRoMX2zqTHyMc4jcM2Dl3lRxzT6H7EeAyQE4fkGet2RLnsSzsVkcHArJpIXptsdj8VNJIYNALspb97LTkBwfGah5UQoMhXLA8wbU9ovjUNMAXtlODb8l2HEw4gQkj39/A6kVBqsIkob7TZu3T6OfilEb4g/bTBQJPtJLS9PhbUGDZsUPosFVumRWz8DCN9KyGM5S0u1wQr+9ShJ+0LgRuSeHtRIR8ccEsdqs5tg1FYlCyS3puJta4O0n0urUfekbs30gbBvujVKkIMK1g+LVFAXI7gBlcGCgP5vpyKa4xxF4Aw+0niOQbfJR8K6BrT8/FlzLqOBRhaM6HcHte5xC0eAJLKsnV3H8c/UUAcULAixFbtAcH5mIDyKQs1aV2pnto8/ZGdj0/sZkq36guAliDoAYY5aIm+YVBXUXQGvJs55HXz4itsNu9i73qo=" + email: false diff --git a/roles/ara/.yamllint b/roles/robertdebock.ruby/.yamllint similarity index 97% rename from roles/ara/.yamllint rename to roles/robertdebock.ruby/.yamllint index ad0be76..c5ae64b 100644 --- a/roles/ara/.yamllint +++ b/roles/robertdebock.ruby/.yamllint @@ -1,3 +1,4 @@ +--- extends: default rules: diff --git a/roles/ruby/CODE_OF_CONDUCT.md b/roles/robertdebock.ruby/CODE_OF_CONDUCT.md similarity index 100% rename from roles/ruby/CODE_OF_CONDUCT.md rename to roles/robertdebock.ruby/CODE_OF_CONDUCT.md diff --git a/roles/robertdebock.ruby/CONTRIBUTING.md b/roles/robertdebock.ruby/CONTRIBUTING.md new file mode 100644 index 0000000..c0df59e --- /dev/null +++ b/roles/robertdebock.ruby/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# [Please contribute](#please-contribute) + +You can really make a difference by: + +- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) +- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. + +I'll try to help and take every contribution seriously. + +It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. + +## [Step by step](#step-by-step) + +Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. + +### [1. Make an issue.](#1-make-an-issue) + +When you spot an issue, [create an issue](https://github.com/robertdebock/ansible-role-ruby/issues). + +Making the issue help me and others to find similar problems in the future. + +### [2. Fork the project.](#2-fork-the-project) + +On the top right side of [the repository on GitHub](https://github.com/robertdebock/ansible-role-ruby), click `fork`. This copies everything to your GitHub namespace. + +### [3. Make the changes](#3-make-the-changes) + +In you own GitHub namespace, make the required changes. + +I typically do that by cloning the repository (in your namespace) locally: + +``` +git clone git@github.com:YOURNAMESPACE/ansible-role-ruby.git +``` + +Now you can start to edit on your laptop. + +### [4. Optionally: test your changes](#4-optionally-test-your-changes) + +Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): + +``` +pip install molecule tox ansible-lint docker +``` + +And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: + +``` +image=centos tag=7 molecule test +``` + +Once it start to work, you can test multiple version of Ansible: + +``` +image=centos tag=7 tox +``` + +### [5. Optionally: Regenerate all dynamic content](#5-optionally-regenerate-all-dynamic-content) + +You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. + +If you don't do it, I'll do it later for you. + +### [6. Make a pull request](#6-make-a-pull-request) + +[GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. + +In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. + +### [7. Wait](#7-wait) + +Now I'll get a message that you've added some code. Thank you, really. + +CI starts to test your changes. You can follow the progress on Travis. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.ruby/LICENSE b/roles/robertdebock.ruby/LICENSE new file mode 100644 index 0000000..bd15893 --- /dev/null +++ b/roles/robertdebock.ruby/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Robert de Bock (robert@meinit.nl) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/roles/ruby/README.md b/roles/robertdebock.ruby/README.md similarity index 54% rename from roles/ruby/README.md rename to roles/robertdebock.ruby/README.md index 04f88ca..52ec45d 100644 --- a/roles/ruby/README.md +++ b/roles/robertdebock.ruby/README.md @@ -1,15 +1,14 @@ -ruby -========= - -Ansible logo - Build status +# [ruby](#ruby) Install ruby on your system. -Example Playbook ----------------- +|Travis|GitHub|Quality|Downloads|Version| +|------|------|-------|---------|-------| +|[![travis](https://travis-ci.com/robertdebock/ansible-role-ruby.svg?branch=master)](https://travis-ci.com/robertdebock/ansible-role-ruby)|[![github](https://github.com/robertdebock/ansible-role-ruby/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-ruby/actions)|[![quality](https://img.shields.io/ansible/quality/21976)](https://galaxy.ansible.com/robertdebock/ruby)|[![downloads](https://img.shields.io/ansible/role/d/21976)](https://galaxy.ansible.com/robertdebock/ruby)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-ruby.svg)](https://github.com/robertdebock/ansible-role-ruby/releases/)| -This example is taken from `molecule/resources/playbook.yml` and is tested on each push, pull request and release. +## [Example Playbook](#example-playbook) + +This example is taken from `molecule/resources/converge.yml` and is tested on each push, pull request and release. ```yaml --- - name: Converge @@ -18,10 +17,10 @@ This example is taken from `molecule/resources/playbook.yml` and is tested on ea gather_facts: yes roles: - - robertdebock.ruby + - role: robertdebock.ruby ``` -The machine you are running this on, may need to be prepared, I use this playbook to ensure everything is in place to let the role work. +The machine may need to be prepared using `molecule/resources/prepare.yml`: ```yaml --- - name: Prepare @@ -30,23 +29,26 @@ The machine you are running this on, may need to be prepared, I use this playboo gather_facts: no roles: - - robertdebock.bootstrap + - role: robertdebock.bootstrap ``` +For verification `molecule/resources/verify.yml` run after the role has been applied. +```yaml +--- +- name: Verify + hosts: all + become: yes + gather_facts: yes + + tasks: + - name: check if connection still works + ping: +``` Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles. -Role Variables --------------- -These variables are set in `defaults/main.yml`: -```yaml ---- -# defaults file for ruby -``` - -Requirements ------------- +## [Requirements](#requirements) - Access to a repository containing packages, likely on the internet. - A recent version of Ansible. (Tests run on the current, previous and next release of Ansible.) @@ -59,49 +61,38 @@ The following roles can be installed to ensure all requirements are met, using ` ``` -Context -------- +## [Context](#context) This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information. Here is an overview of related roles: ![dependencies](https://raw.githubusercontent.com/robertdebock/drawings/artifacts/ruby.png "Dependency") +## [Compatibility](#compatibility) -Compatibility -------------- +This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): -This role has been tested on these [container images](https://hub.docker.com/): +|container|tags| +|---------|----| +|alpine|all| +|amazon|2018.03| +|el|7, 8| +|debian|buster, bullseye| +|fedora|31, 32| +|opensuse|all| +|ubuntu|focal, bionic, xenial| -|container|tag|allow_failures| -|---------|---|--------------| -|amazonlinux|1|no| -|amazonlinux|latest|no| -|alpine|latest|no| -|alpine|edge|yes| -|debian|unstable|yes| -|debian|latest|no| -|centos|7|no| -|redhat|7|no| -|centos|latest|no| -|redhat|latest|no| -|fedora|latest|no| -|fedora|rawhide|yes| -|opensuse|latest|no| -|ubuntu|latest|no| +The minimum version of Ansible required is 2.8 but tests have been done to: -This role has been tested on these Ansible versions: - -- ansible>=2.8, <2.9 -- ansible>=2.9 -- git+https://github.com/ansible/ansible.git@devel +- The previous version, on version lower. +- The current version. +- The development version. -Testing -------- +## [Testing](#testing) -[Unit tests](https://travis-ci.org/robertdebock/ansible-role-ruby) are done on every commit, pull request, release and periodically. +[Unit tests](https://travis-ci.com/robertdebock/ansible-role-ruby) are done on every commit, pull request, release and periodically. If you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-ruby/issues) @@ -133,22 +124,13 @@ image="centos" tox image="debian" tag="stable" tox ``` -Modules -------- - -This role uses the following modules: -```yaml ---- -- package -``` - -License -------- +## [License](#license) Apache-2.0 -Author Information ------------------- +## [Author Information](#author-information) [Robert de Bock](https://robertdebock.nl/) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/ruby/SECURITY.md b/roles/robertdebock.ruby/SECURITY.md similarity index 76% rename from roles/ruby/SECURITY.md rename to roles/robertdebock.ruby/SECURITY.md index 0567db6..daef496 100644 --- a/roles/ruby/SECURITY.md +++ b/roles/robertdebock.ruby/SECURITY.md @@ -1,8 +1,8 @@ -# Security Policy +# [Security Policy](#security-policy) This software implements other software, it's not very likely that this software introduces new vulnerabilities. -## Supported Versions +## [Supported Versions](#supported-versions) The current major version is supported. For example if the current version is 3.4.1: @@ -14,10 +14,12 @@ The current major version is supported. For example if the current version is 3. | 2.0.0 | :x: | | 1.0.0 | :x: | -## Reporting a Vulnerability +## [Reporting a Vulnerability](#reporting-a-vulnarability) Please [open an issue](https://github.com/robertdebock/ansible-role-ruby/issues) describing the vulnerability. Tell them where to go, how often they can expect to get an update on a reported vulnerability, what to expect if the vulnerability is accepted or declined, etc. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.ruby/meta/.galaxy_install_info b/roles/robertdebock.ruby/meta/.galaxy_install_info new file mode 100644 index 0000000..e275765 --- /dev/null +++ b/roles/robertdebock.ruby/meta/.galaxy_install_info @@ -0,0 +1,2 @@ +install_date: Mon Sep 28 09:37:06 2020 +version: 2.2.9 diff --git a/roles/ruby/meta/main.yml b/roles/robertdebock.ruby/meta/main.yml similarity index 84% rename from roles/ruby/meta/main.yml rename to roles/robertdebock.ruby/meta/main.yml index 9dc4061..afc8b6e 100644 --- a/roles/ruby/meta/main.yml +++ b/roles/robertdebock.ruby/meta/main.yml @@ -8,32 +8,32 @@ galaxy_info: min_ansible_version: 2.8 platforms: - - name: Amazon - versions: - - all - name: Alpine versions: - all - - name: ArchLinux + - name: Amazon versions: - - all - - name: Debian - versions: - - all + - 2018.03 - name: EL versions: - 7 - 8 + - name: Debian + versions: + - buster + - bullseye - name: Fedora versions: - - all + - 31 + - 32 - name: OpenSUSE versions: - all - name: Ubuntu versions: - - artful + - focal - bionic + - xenial galaxy_tags: - ruby diff --git a/roles/robertdebock.ruby/meta/preferences.yml b/roles/robertdebock.ruby/meta/preferences.yml new file mode 100644 index 0000000..e7fdebf --- /dev/null +++ b/roles/robertdebock.ruby/meta/preferences.yml @@ -0,0 +1,2 @@ +--- +tox_parallel: yes diff --git a/roles/ara/molecule/default/playbook.yml b/roles/robertdebock.ruby/molecule/default/converge.yml similarity index 72% rename from roles/ara/molecule/default/playbook.yml rename to roles/robertdebock.ruby/molecule/default/converge.yml index 93cd084..b12ce21 100644 --- a/roles/ara/molecule/default/playbook.yml +++ b/roles/robertdebock.ruby/molecule/default/converge.yml @@ -5,4 +5,4 @@ gather_facts: yes roles: - - ansible-role-ara + - role: ansible-role-ruby diff --git a/roles/ruby/molecule/default/molecule.yml b/roles/robertdebock.ruby/molecule/default/molecule.yml similarity index 64% rename from roles/ruby/molecule/default/molecule.yml rename to roles/robertdebock.ruby/molecule/default/molecule.yml index d8e1763..50fce5f 100644 --- a/roles/ruby/molecule/default/molecule.yml +++ b/roles/robertdebock.ruby/molecule/default/molecule.yml @@ -6,8 +6,10 @@ dependency: name: galaxy options: role-file: requirements.yml -lint: - name: yamllint +lint: | + PATH=${PATH} + yamllint molecule/default/converge.yml + ansible-lint molecule/default/converge.yml driver: name: docker platforms: @@ -20,5 +22,9 @@ platforms: pre_build_image: yes provisioner: name: ansible -scenario: - name: default + config_options: + defaults: + stdout_callback: yaml + bin_ansible_callbacks: yes +verifier: + name: ansible diff --git a/roles/robertdebock.ruby/molecule/default/prepare.yml b/roles/robertdebock.ruby/molecule/default/prepare.yml new file mode 100644 index 0000000..f76c7bf --- /dev/null +++ b/roles/robertdebock.ruby/molecule/default/prepare.yml @@ -0,0 +1,8 @@ +--- +- name: Prepare + hosts: all + become: yes + gather_facts: no + + roles: + - role: robertdebock.bootstrap diff --git a/roles/robertdebock.ruby/molecule/default/verify.yml b/roles/robertdebock.ruby/molecule/default/verify.yml new file mode 100644 index 0000000..6ab75cf --- /dev/null +++ b/roles/robertdebock.ruby/molecule/default/verify.yml @@ -0,0 +1,9 @@ +--- +- name: Verify + hosts: all + become: yes + gather_facts: yes + + tasks: + - name: check if connection still works + ping: diff --git a/roles/service/requirements.yml b/roles/robertdebock.ruby/requirements.yml similarity index 100% rename from roles/service/requirements.yml rename to roles/robertdebock.ruby/requirements.yml diff --git a/roles/ruby/tasks/main.yml b/roles/robertdebock.ruby/tasks/main.yml similarity index 52% rename from roles/ruby/tasks/main.yml rename to roles/robertdebock.ruby/tasks/main.yml index c0bd17b..9817d7a 100644 --- a/roles/ruby/tasks/main.yml +++ b/roles/robertdebock.ruby/tasks/main.yml @@ -3,6 +3,3 @@ - name: install ruby package: name: "{{ ruby_packages }}" - register: ruby_install_ruby - until: ruby_install_ruby is succeeded - retries: 3 diff --git a/roles/robertdebock.ruby/tox.ini b/roles/robertdebock.ruby/tox.ini new file mode 100644 index 0000000..c1bc1d4 --- /dev/null +++ b/roles/robertdebock.ruby/tox.ini @@ -0,0 +1,26 @@ +# +# Ansible managed +# +[tox] +minversion = 3.7 +# Disabled "next" because of: +# https://github.com/ansible-community/molecule/issues/2626. +# envlist = py{38}-ansible-{previous,current,next} +envlist = py{38}-ansible-{previous,current} +skipsdist = true + +[testenv] +deps = + previous: ansible>=2.8, <2.9 + current: ansible>=2.9 + next: git+https://github.com/ansible/ansible.git@devel + molecule[lint]>=3, <4 + docker>=4.2, <4.3 +commands = molecule test +setenv = + TOX_ENVNAME={envname} + MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} + PY_COLORS=1 + ANSIBLE_FORCE_COLOR=1 + +passenv = namespace image tag diff --git a/roles/ruby/vars/main.yml b/roles/robertdebock.ruby/vars/main.yml similarity index 98% rename from roles/ruby/vars/main.yml rename to roles/robertdebock.ruby/vars/main.yml index 8245009..275d903 100644 --- a/roles/ruby/vars/main.yml +++ b/roles/robertdebock.ruby/vars/main.yml @@ -1,4 +1,5 @@ --- # vars file for ruby + ruby_packages: - ruby diff --git a/roles/robertdebock.service/.ansible-lint b/roles/robertdebock.service/.ansible-lint new file mode 100644 index 0000000..cb2872e --- /dev/null +++ b/roles/robertdebock.service/.ansible-lint @@ -0,0 +1,7 @@ +# +# Ansible managed +# +exclude_paths: + - ./meta/preferences.yml + - ./molecule/default/verify.yml + - ./.tox diff --git a/roles/robertdebock.service/.github/FUNDING.yml b/roles/robertdebock.service/.github/FUNDING.yml new file mode 100644 index 0000000..67320f0 --- /dev/null +++ b/roles/robertdebock.service/.github/FUNDING.yml @@ -0,0 +1,2 @@ +--- +github: robertdebock diff --git a/roles/robertdebock.service/.github/ISSUE_TEMPLATE/bug_report.md b/roles/robertdebock.service/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..f39b5dc --- /dev/null +++ b/roles/robertdebock.service/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a report to help me improve + +--- + +## Describe the bug +A clear and concise description of what the bug is. + +## Playbook + +Please paste the playbook you are using. (Consider `requirements.yml` and +optionally the command you've invoked.) + + +```yaml +--- +YOUR PLAYBOOK HERE +``` + +## Output + +Show at least the error, possible related output, maybe just all the output. + +## Environment + +- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) +- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) +- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.service/.github/ISSUE_TEMPLATE/feature_request.md b/roles/robertdebock.service/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..55a93c4 --- /dev/null +++ b/roles/robertdebock.service/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +## Proposed feature + +A clear and concise description of what you want to happen. + +## Rationale + +Why is this feature required? + +## Additional context + +Add any other context about the feature request here. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/service/PULL_REQUEST_TEMPLATE.md b/roles/robertdebock.service/.github/pull_request_template.md similarity index 100% rename from roles/service/PULL_REQUEST_TEMPLATE.md rename to roles/robertdebock.service/.github/pull_request_template.md diff --git a/roles/service/.github/settings.yml b/roles/robertdebock.service/.github/settings.yml similarity index 100% rename from roles/service/.github/settings.yml rename to roles/robertdebock.service/.github/settings.yml diff --git a/roles/robertdebock.service/.github/workflows/galaxy.yml b/roles/robertdebock.service/.github/workflows/galaxy.yml new file mode 100644 index 0000000..2912ff8 --- /dev/null +++ b/roles/robertdebock.service/.github/workflows/galaxy.yml @@ -0,0 +1,22 @@ +--- +# +# Ansible managed +# + +name: Release to Ansible Galaxy + +on: + push: + tags: + - '*' + schedule: + - cron: '19 19 19 * *' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: galaxy + uses: robertdebock/galaxy-action@1.0.1 + with: + galaxy_api_key: ${{ secrets.galaxy_api_key }} diff --git a/roles/robertdebock.service/.github/workflows/molecule.yml b/roles/robertdebock.service/.github/workflows/molecule.yml new file mode 100644 index 0000000..0c2da96 --- /dev/null +++ b/roles/robertdebock.service/.github/workflows/molecule.yml @@ -0,0 +1,78 @@ +--- +# +# Ansible managed +# + +name: Ansible Molecule + +on: + push: + tags_ignore: + - '*' + pull_request: + schedule: + - cron: '19 19 19 * *' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: molecule + uses: robertdebock/molecule-action@2.6.1 + with: + command: lint + test: + needs: + - lint + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + config: + - image: "alpine" + tag: "latest" + - image: "alpine" + tag: "edge" + - image: "amazonlinux" + tag: "1" + - image: "centos" + tag: "7" + - image: "centos" + tag: "latest" + - image: "debian" + tag: "latest" + - image: "debian" + tag: "bullseye" + - image: "fedora" + tag: "31" + - image: "fedora" + tag: "latest" + - image: "opensuse" + tag: "latest" + - image: "ubuntu" + tag: "latest" + - image: "ubuntu" + tag: "bionic" + - image: "ubuntu" + tag: "xenial" + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: disable apparmor for mysql + run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + - name: parse apparmor for mysql + run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + - name: molecule + uses: robertdebock/molecule-action@2.6.1 + with: + image: ${{ matrix.config.image }} + tag: ${{ matrix.config.tag }} + options: "--parallel all" + env: + TOX_PARALLEL_NO_SPINNER: 1 diff --git a/roles/service/.gitignore b/roles/robertdebock.service/.gitignore similarity index 100% rename from roles/service/.gitignore rename to roles/robertdebock.service/.gitignore diff --git a/roles/robertdebock.service/.travis.yml b/roles/robertdebock.service/.travis.yml new file mode 100644 index 0000000..8d33abd --- /dev/null +++ b/roles/robertdebock.service/.travis.yml @@ -0,0 +1,50 @@ +--- +# +# Ansible managed +# +language: python + +os: linux +dist: xenial + +python: + - "3.8" + +services: + - docker + +env: + global: + namespace="robertdebock" + jobs: + - image="alpine" tag="latest" + - image="alpine" tag="edge" + - image="amazonlinux" tag="1" + - image="centos" tag="7" + - image="centos" tag="latest" + - image="debian" tag="latest" + - image="debian" tag="bullseye" + - image="fedora" tag="31" + - image="fedora" tag="latest" + - image="opensuse" tag="latest" + - image="ubuntu" tag="latest" + - image="ubuntu" tag="bionic" + - image="ubuntu" tag="xenial" + +cache: + - pip + +install: + - pip install --upgrade pip + - pip install tox + +script: + - function retry { counter=0 ; until "$@" ; do exit=$? ; counter=$(($counter + 1)) ; if [ $counter -ge 3 ] ; then return $exit ; fi ; done ; return 0; } ; retry tox --parallel all + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ + slack: + secure: "gmZzWPhCQnjVNy1tspnMqRiyHiyQ7QJgqEXFHyuhxdlfF0lwi9beFfXDSZnP33hIK5cOwj8M8EETADVb8MTTtmY/lJQ+4exiPoyG44gfWkREjkzOz8UT2z1TXzecBfoRF+BQ3vIR9tkbOPPJFNI4+3vZ6p3tl8wbaxgl2Hthp0QjyieBpcpvQENCccy19g/xwAkEUKDQ8D4ojW70BJxd3WcUEVSONB4bSldEDP6gOlWgkgzdY9RJmyxF36WbQi5gc+j8Tht8cqT+IfCtIs94nugpQjK6x7xHloxDJHWJcSF4L86Ph5IYeoKvL8rB0yOeEqLIKzHa5SeRIJPs6rzgo44dQ4CMYUljO6vcBWxNrt+IuJPTaFiPXs6E+qeygAWUKjtGAzP/271DzCnzDOSx6lby2bECk3+8CGWCOm3B2taK10DS8xq+BL2/UCtVInsEgYBJAlX6uCgK2IjuyTVAcBFfcs5P30drd+77xfN4ESEoA9s08XRm+p+BSJWtfN7aUkcZj9aqX2LeiMUi+6ClbQJzG5c3vs8CtbNS1mukZqrNs4J6GrB86JmPYhsIg/CkiJgTMBKaQvEV2ZWoCUPnR/udpSTvz713BvJ0T9e7wGHTkVlosa66px25eASkEmJuHEw2Qs/7U1hVFEP+rDjd7zhyM0f1xKv0/i88LVoLirs=" + on_success: change + template: "%{result}: %{repository_slug}@%{branch}, build <%{build_url}|#%{build_number}> (<%{compare_url}|%{commit}>)" + email: false diff --git a/roles/robertdebock.service/.yamllint b/roles/robertdebock.service/.yamllint new file mode 100644 index 0000000..894450c --- /dev/null +++ b/roles/robertdebock.service/.yamllint @@ -0,0 +1,15 @@ +--- +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + line-length: disable + truthy: disable + +ignore: | + .tox/ diff --git a/roles/service/CODE_OF_CONDUCT.md b/roles/robertdebock.service/CODE_OF_CONDUCT.md similarity index 100% rename from roles/service/CODE_OF_CONDUCT.md rename to roles/robertdebock.service/CODE_OF_CONDUCT.md diff --git a/roles/robertdebock.service/CONTRIBUTING.md b/roles/robertdebock.service/CONTRIBUTING.md new file mode 100644 index 0000000..5b8c044 --- /dev/null +++ b/roles/robertdebock.service/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# [Please contribute](#please-contribute) + +You can really make a difference by: + +- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) +- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. + +I'll try to help and take every contribution seriously. + +It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. + +## [Step by step](#step-by-step) + +Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. + +### [1. Make an issue.](#1-make-an-issue) + +When you spot an issue, [create an issue](https://github.com/robertdebock/ansible-role-service/issues). + +Making the issue help me and others to find similar problems in the future. + +### [2. Fork the project.](#2-fork-the-project) + +On the top right side of [the repository on GitHub](https://github.com/robertdebock/ansible-role-service), click `fork`. This copies everything to your GitHub namespace. + +### [3. Make the changes](#3-make-the-changes) + +In you own GitHub namespace, make the required changes. + +I typically do that by cloning the repository (in your namespace) locally: + +``` +git clone git@github.com:YOURNAMESPACE/ansible-role-service.git +``` + +Now you can start to edit on your laptop. + +### [4. Optionally: test your changes](#4-optionally-test-your-changes) + +Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): + +``` +pip install molecule tox ansible-lint docker +``` + +And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: + +``` +image=centos tag=7 molecule test +``` + +Once it start to work, you can test multiple version of Ansible: + +``` +image=centos tag=7 tox +``` + +### [5. Optionally: Regenerate all dynamic content](#5-optionally-regenerate-all-dynamic-content) + +You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. + +If you don't do it, I'll do it later for you. + +### [6. Make a pull request](#6-make-a-pull-request) + +[GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. + +In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. + +### [7. Wait](#7-wait) + +Now I'll get a message that you've added some code. Thank you, really. + +CI starts to test your changes. You can follow the progress on Travis. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.service/LICENSE b/roles/robertdebock.service/LICENSE new file mode 100644 index 0000000..bd15893 --- /dev/null +++ b/roles/robertdebock.service/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Robert de Bock (robert@meinit.nl) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/roles/service/README.md b/roles/robertdebock.service/README.md similarity index 65% rename from roles/service/README.md rename to roles/robertdebock.service/README.md index 3291894..eb8c78e 100644 --- a/roles/service/README.md +++ b/roles/robertdebock.service/README.md @@ -1,15 +1,14 @@ -service -========= - -Ansible logo - Build status +# [service](#service) Add custom services to your Linux system. -Example Playbook ----------------- +|Travis|GitHub|Quality|Downloads|Version| +|------|------|-------|---------|-------| +|[![travis](https://travis-ci.com/robertdebock/ansible-role-service.svg?branch=master)](https://travis-ci.com/robertdebock/ansible-role-service)|[![github](https://github.com/robertdebock/ansible-role-service/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-service/actions)|[![quality](https://img.shields.io/ansible/quality/38040)](https://galaxy.ansible.com/robertdebock/service)|[![downloads](https://img.shields.io/ansible/role/d/38040)](https://galaxy.ansible.com/robertdebock/service)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-service.svg)](https://github.com/robertdebock/ansible-role-service/releases/)| -This example is taken from `molecule/resources/playbook.yml` and is tested on each push, pull request and release. +## [Example Playbook](#example-playbook) + +This example is taken from `molecule/resources/converge.yml` and is tested on each push, pull request and release. ```yaml --- - name: Converge @@ -49,12 +48,17 @@ This example is taken from `molecule/resources/playbook.yml` and is tested on ea description: Specific Status Pattern Service start_command: "{{ service_test_command }} 115200" status_pattern: 115200 + - name: variable-service + description: Service with environment variables + start_command: "{{ service_test_command }} ${time}" + environment_variables: + time: 230400 roles: - - robertdebock.service + - role: robertdebock.service ``` -The machine you are running this on, may need to be prepared, I use this playbook to ensure everything is in place to let the role work. +The machine may need to be prepared using `molecule/resources/prepare.yml`: ```yaml --- - name: Prepare @@ -67,7 +71,7 @@ The machine you are running this on, may need to be prepared, I use this playboo - role: robertdebock.bootstrap ``` -After running this role, this playbook runs to verify that everything works, this may be a good example how you can use this role. +For verification `molecule/resources/verify.yml` run after the role has been applied. ```yaml --- - name: Verify @@ -94,20 +98,18 @@ After running this role, this playbook runs to verify that everything works, thi service: name: simple-service state: restarted - ``` Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles. -Role Variables --------------- +## [Role Variables](#role-variables) These variables are set in `defaults/main.yml`: ```yaml --- # defaults file for service -# status_list can contain a list of services to add to the system. +# service_list can contain a list of services to add to the system. # The mandatory items for each item are: # - name: The (short) name of the service, i.e. "tomcat". # - description: A bit longer name, i.e. "Tomcat application server". @@ -123,10 +125,16 @@ These variables are set in `defaults/main.yml`: # program runs on the foreground, i.e. "nc -l 1234". Forking means the # program itself forks, i.e. "nc -l 12345 &" # - working_directory: The directory to cd into before starting the service. +# - environment_variables: A list for variables to set. for example: +# environment_variables: +# variable1: value1 +# variable2: value2 +# - after: Start after the mentioned service. +# - restart_mode: The mode to use, for example "always". +# - restart_seconds: The time to allow restart to finish. ``` -Requirements ------------- +## [Requirements](#requirements) - Access to a repository containing packages, likely on the internet. - A recent version of Ansible. (Tests run on the current, previous and next release of Ansible.) @@ -139,49 +147,38 @@ The following roles can be installed to ensure all requirements are met, using ` ``` -Context -------- +## [Context](#context) This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information. Here is an overview of related roles: ![dependencies](https://raw.githubusercontent.com/robertdebock/drawings/artifacts/service.png "Dependency") +## [Compatibility](#compatibility) -Compatibility -------------- +This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): -This role has been tested on these [container images](https://hub.docker.com/): +|container|tags| +|---------|----| +|alpine|all| +|amazon|2018.03| +|el|7, 8| +|debian|buster, bullseye| +|fedora|31, 32| +|opensuse|all| +|ubuntu|focal, bionic, xenial| -|container|tag|allow_failures| -|---------|---|--------------| -|amazonlinux|1|no| -|amazonlinux|latest|no| -|alpine|latest|no| -|alpine|edge|yes| -|debian|unstable|yes| -|debian|latest|no| -|centos|7|no| -|redhat|7|no| -|centos|latest|no| -|redhat|latest|no| -|fedora|latest|no| -|fedora|rawhide|yes| -|opensuse|latest|no| -|ubuntu|latest|no| +The minimum version of Ansible required is 2.8 but tests have been done to: -This role has been tested on these Ansible versions: - -- ansible>=2.8, <2.9 -- ansible>=2.9 -- git+https://github.com/ansible/ansible.git@devel +- The previous version, on version lower. +- The current version. +- The development version. -Testing -------- +## [Testing](#testing) -[Unit tests](https://travis-ci.org/robertdebock/ansible-role-service) are done on every commit, pull request, release and periodically. +[Unit tests](https://travis-ci.com/robertdebock/ansible-role-service) are done on every commit, pull request, release and periodically. If you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-service/issues) @@ -213,26 +210,18 @@ image="centos" tox image="debian" tag="stable" tox ``` -Modules -------- - -This role uses the following modules: -```yaml ---- -- meta -- package -- setup -- systemd -- template -``` - -License -------- +## [License](#license) Apache-2.0 +## [Contributors](#contributors) -Author Information ------------------- +I'd like to thank everybody that made contributions to this repository. It motivates me, improves the code and is just fun to collaborate. + +- [githengi](https://github.com/githengi) + +## [Author Information](#author-information) [Robert de Bock](https://robertdebock.nl/) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/service/SECURITY.md b/roles/robertdebock.service/SECURITY.md similarity index 76% rename from roles/service/SECURITY.md rename to roles/robertdebock.service/SECURITY.md index 8f2f545..d748264 100644 --- a/roles/service/SECURITY.md +++ b/roles/robertdebock.service/SECURITY.md @@ -1,8 +1,8 @@ -# Security Policy +# [Security Policy](#security-policy) This software implements other software, it's not very likely that this software introduces new vulnerabilities. -## Supported Versions +## [Supported Versions](#supported-versions) The current major version is supported. For example if the current version is 3.4.1: @@ -14,10 +14,12 @@ The current major version is supported. For example if the current version is 3. | 2.0.0 | :x: | | 1.0.0 | :x: | -## Reporting a Vulnerability +## [Reporting a Vulnerability](#reporting-a-vulnarability) Please [open an issue](https://github.com/robertdebock/ansible-role-service/issues) describing the vulnerability. Tell them where to go, how often they can expect to get an update on a reported vulnerability, what to expect if the vulnerability is accepted or declined, etc. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/service/defaults/main.yml b/roles/robertdebock.service/defaults/main.yml similarity index 71% rename from roles/service/defaults/main.yml rename to roles/robertdebock.service/defaults/main.yml index 6cdc0f6..3f8950a 100644 --- a/roles/service/defaults/main.yml +++ b/roles/robertdebock.service/defaults/main.yml @@ -1,7 +1,7 @@ --- # defaults file for service -# status_list can contain a list of services to add to the system. +# service_list can contain a list of services to add to the system. # The mandatory items for each item are: # - name: The (short) name of the service, i.e. "tomcat". # - description: A bit longer name, i.e. "Tomcat application server". @@ -17,3 +17,10 @@ # program runs on the foreground, i.e. "nc -l 1234". Forking means the # program itself forks, i.e. "nc -l 12345 &" # - working_directory: The directory to cd into before starting the service. +# - environment_variables: A list for variables to set. for example: +# environment_variables: +# variable1: value1 +# variable2: value2 +# - after: Start after the mentioned service. +# - restart_mode: The mode to use, for example "always". +# - restart_seconds: The time to allow restart to finish. diff --git a/roles/service/handlers/main.yml b/roles/robertdebock.service/handlers/main.yml similarity index 75% rename from roles/service/handlers/main.yml rename to roles/robertdebock.service/handlers/main.yml index ff6e15b..04de248 100644 --- a/roles/service/handlers/main.yml +++ b/roles/robertdebock.service/handlers/main.yml @@ -1,5 +1,8 @@ --- # handlers file for service +- name: gather facts + setup: + - name: systemctl daemon-reload systemd: daemon_reload: yes diff --git a/roles/robertdebock.service/meta/.galaxy_install_info b/roles/robertdebock.service/meta/.galaxy_install_info new file mode 100644 index 0000000..dc26d5a --- /dev/null +++ b/roles/robertdebock.service/meta/.galaxy_install_info @@ -0,0 +1,2 @@ +install_date: Mon Sep 28 09:34:22 2020 +version: 2.6.6 diff --git a/roles/service/meta/main.yml b/roles/robertdebock.service/meta/main.yml similarity index 82% rename from roles/service/meta/main.yml rename to roles/robertdebock.service/meta/main.yml index 0de41e9..a76e031 100644 --- a/roles/service/meta/main.yml +++ b/roles/robertdebock.service/meta/main.yml @@ -8,36 +8,35 @@ galaxy_info: min_ansible_version: 2.8 platforms: - - name: Amazon - versions: - - all - name: Alpine versions: - all - - name: ArchLinux + - name: Amazon versions: - - all - - name: Debian - versions: - - all + - 2018.03 - name: EL versions: - 7 - 8 + - name: Debian + versions: + - buster + - bullseye - name: Fedora versions: - - all + - 31 + - 32 - name: OpenSUSE versions: - all - name: Ubuntu versions: - - artful + - focal - bionic + - xenial galaxy_tags: - service - - archlinux - centos - redhat diff --git a/roles/robertdebock.service/meta/preferences.yml b/roles/robertdebock.service/meta/preferences.yml new file mode 100644 index 0000000..e7fdebf --- /dev/null +++ b/roles/robertdebock.service/meta/preferences.yml @@ -0,0 +1,2 @@ +--- +tox_parallel: yes diff --git a/roles/service/molecule/default/playbook.yml b/roles/robertdebock.service/molecule/default/converge.yml similarity index 85% rename from roles/service/molecule/default/playbook.yml rename to roles/robertdebock.service/molecule/default/converge.yml index ed1ad03..0dd764b 100644 --- a/roles/service/molecule/default/playbook.yml +++ b/roles/robertdebock.service/molecule/default/converge.yml @@ -36,6 +36,11 @@ description: Specific Status Pattern Service start_command: "{{ service_test_command }} 115200" status_pattern: 115200 + - name: variable-service + description: Service with environment variables + start_command: "{{ service_test_command }} ${time}" + environment_variables: + time: 230400 roles: - - ansible-role-service + - role: ansible-role-service diff --git a/roles/service/molecule/default/molecule.yml b/roles/robertdebock.service/molecule/default/molecule.yml similarity index 74% rename from roles/service/molecule/default/molecule.yml rename to roles/robertdebock.service/molecule/default/molecule.yml index 6452ba1..a1e72d6 100644 --- a/roles/service/molecule/default/molecule.yml +++ b/roles/robertdebock.service/molecule/default/molecule.yml @@ -6,8 +6,10 @@ dependency: name: galaxy options: role-file: requirements.yml -lint: - name: yamllint +lint: | + set -e + yamllint . + ansible-lint tasks/main.yml driver: name: docker platforms: @@ -20,10 +22,9 @@ platforms: pre_build_image: yes provisioner: name: ansible + config_options: + defaults: + stdout_callback: yaml + bin_ansible_callbacks: yes verifier: name: ansible - lint: - name: ansible-lint - enabled: no -scenario: - name: default diff --git a/roles/service/molecule/default/prepare.yml b/roles/robertdebock.service/molecule/default/prepare.yml similarity index 100% rename from roles/service/molecule/default/prepare.yml rename to roles/robertdebock.service/molecule/default/prepare.yml diff --git a/roles/service/molecule/default/verify.yml b/roles/robertdebock.service/molecule/default/verify.yml similarity index 95% rename from roles/service/molecule/default/verify.yml rename to roles/robertdebock.service/molecule/default/verify.yml index b18ac4d..a4d4773 100644 --- a/roles/service/molecule/default/verify.yml +++ b/roles/robertdebock.service/molecule/default/verify.yml @@ -2,7 +2,7 @@ - name: Verify hosts: all become: yes - gather_facts: yes + gather_facts: no vars: service_list: diff --git a/roles/update/requirements.yml b/roles/robertdebock.service/requirements.yml similarity index 56% rename from roles/update/requirements.yml rename to roles/robertdebock.service/requirements.yml index 4681079..46dec9d 100644 --- a/roles/update/requirements.yml +++ b/roles/robertdebock.service/requirements.yml @@ -1,3 +1,2 @@ --- - robertdebock.bootstrap -- robertdebock.reboot diff --git a/roles/robertdebock.service/tasks/assert.yml b/roles/robertdebock.service/tasks/assert.yml new file mode 100644 index 0000000..a447ced --- /dev/null +++ b/roles/robertdebock.service/tasks/assert.yml @@ -0,0 +1,114 @@ +--- +- name: test if service_list is set correctly + assert: + that: + - service_list | length > 0 + - service_list is iterable + quiet: yes + when: + - service_list is defined + +- name: test if item in service_list is set correctly + assert: + that: + - item.name is defined + - item.name | length > 0 + - item.description is defined + - item.description | length > 0 + - item.start_command is defined + - item.start_command | length > 0 + quiet: yes + loop: "{{ service_list }}" + loop_control: + label: "{{ item.name }}" + when: + - service_list is defined + +- name: test if stop_command in service_list is set correctly + assert: + that: + - item.stop_command | length > 0 + quiet: yes + loop: "{{ service_list }}" + loop_control: + label: "{{ item.name }}" + when: + - service_list is defined + - item.stop_command is defined + +- name: test if type in service_list is set correctly + assert: + that: + - item.type | length > 0 + - item.type in ["forking", "oneshot", "simple"] + quiet: yes + loop: "{{ service_list }}" + loop_control: + label: "{{ item.name }}" + when: + - service_list is defined + - item.type is defined + +- name: test if working_directory in service_list is set correctly + assert: + that: + - item.working_directory | length > 0 + quiet: yes + loop: "{{ service_list }}" + loop_control: + label: "{{ item.name }}" + when: + - service_list is defined + - item.working_directory is defined + +- name: test if environment_variables in service_list is set correctly + assert: + that: + - item.environment_variables | length > 0 + - item.environment_variables is iterable + quiet: yes + loop: "{{ service_list }}" + loop_control: + label: "{{ item.name }}" + when: + - service_list is defined + - item.environment_variables is defined + +- name: test if after in service_list is set correctly + assert: + that: + - item.after | length > 0 + quiet: yes + loop: "{{ service_list }}" + loop_control: + label: "{{ item.name }}" + when: + - service_list is defined + - item.after is defined + +- name: test if restart_mode in service_list is set correctly + assert: + that: + - item.restart_mode | length > 0 + - item.restart_mode in ["no", "on-success", "on-failure", "on-abnormal", "on-watchdog", "on-abort", "always"] + quiet: yes + loop: "{{ service_list }}" + loop_control: + label: "{{ item.name }}" + when: + - service_list is defined + - item.restart_mode is defined + +- name: test if restart_seconds in service_list is set correctly + assert: + that: + - item.seconds | length > 0 + - item.seconds | int + - item.seconds | int >= 0 + quiet: yes + loop: "{{ service_list }}" + loop_control: + label: "{{ item.name }}" + when: + - service_list is defined + - item.seconds is defined diff --git a/roles/service/tasks/main.yml b/roles/robertdebock.service/tasks/main.yml similarity index 76% rename from roles/service/tasks/main.yml rename to roles/robertdebock.service/tasks/main.yml index 1503a14..9f74df8 100644 --- a/roles/service/tasks/main.yml +++ b/roles/robertdebock.service/tasks/main.yml @@ -1,26 +1,25 @@ --- # tasks file for service +- name: include assert.yml + include_tasks: assert.yml + - name: install required packages package: name: "{{ service_required_packages }}" state: present - register: service_install_required_packages - until: service_install_required_packages is succeeded - retries: 3 - -- name: gather_facts - setup: + notify: + - gather facts - name: configure systemd service template: src: "systemd.j2" dest: "/etc/systemd/system/{{ item.name }}.service" + mode: "0644" when: - ansible_service_mgr == "systemd" notify: - systemctl daemon-reload - with_items: - - "{{ service_list }}" + loop: "{{ service_list }}" loop_control: label: "{{ item.name }}" @@ -33,8 +32,7 @@ - ansible_service_mgr == "sysvinit" or ansible_service_mgr == "upstart" or ansible_service_mgr == "openrc" - with_items: - - "{{ service_list }}" + loop: "{{ service_list }}" loop_control: label: "{{ item.name }}" diff --git a/roles/investigate/templates/.gitkeep b/roles/robertdebock.service/templates/.gitkeep similarity index 100% rename from roles/investigate/templates/.gitkeep rename to roles/robertdebock.service/templates/.gitkeep diff --git a/roles/service/templates/systemd.j2 b/roles/robertdebock.service/templates/systemd.j2 similarity index 58% rename from roles/service/templates/systemd.j2 rename to roles/robertdebock.service/templates/systemd.j2 index fa2f969..954e679 100644 --- a/roles/service/templates/systemd.j2 +++ b/roles/robertdebock.service/templates/systemd.j2 @@ -1,6 +1,9 @@ {{ ansible_managed | comment }} [Unit] Description={{ item.description }} +{% if item.after is defined %} +After={{ item.after }} +{% endif %} [Service] {% if item.type is defined and item.type != "simple" %} @@ -19,6 +22,17 @@ ExecStart={{ item.start_command }} {% if item.stop_command is defined %} ExecStop={{ item.stop_command }} {% endif %} +{% if item.environment_variables is defined %} +{% for key in item.environment_variables %} +Environment={{ key }}={{ item.environment_variables[key] }} +{% endfor %} +{% endif %} +{% if item.restart_mode is defined %} +Restart={{ item.restart_mode }} +{% endif %} +{% if item.restart_seconds is defined %} +RestartSec={{ item.restart_seconds }} +{% endif %} [Install] WantedBy=multi-user.target diff --git a/roles/service/templates/sysvinit.j2 b/roles/robertdebock.service/templates/sysvinit.j2 similarity index 77% rename from roles/service/templates/sysvinit.j2 rename to roles/robertdebock.service/templates/sysvinit.j2 index c00e9f0..0c8d39e 100644 --- a/roles/service/templates/sysvinit.j2 +++ b/roles/robertdebock.service/templates/sysvinit.j2 @@ -13,6 +13,12 @@ if [ -f /etc/init.d/functions ] ; then . /etc/init.d/functions fi +{% if environment_variables is defined %} +{% for key, value in environment_variables %} +export {{ key }}={{ value }} +{% endfor %} +{% endif %} + start() { {% if item.status_pattern is defined %} pgrep -f {{ item.status_pattern }} > /dev/null @@ -26,9 +32,9 @@ start() { cd {{ item.working_directory }} {% endif %} {% if item.type is defined and item.type != "simple" %} - {% if item.user_name is defined %}su - {{ item.user_name ~ ' ' }}{% endif %}{{ item.start_command }} + {% if item.user_name is defined %}su -c {% endif %}"{{ item.start_command }}"{% if item.user_name is defined %} {{ item.user_name }}{% endif %} {% else %} - ({% if item.user_name is defined %}su - {{ item.user_name ~ ' ' }}{% endif %}{{ item.start_command }} &) + ({% if item.user_name is defined %}su -c {% endif %}"{{ item.start_command }}"{% if item.user_name is defined %} {{ item.user_name }}{% endif %} &) {% endif %} returncode="${?}" touch /var/lock/subsys/{{ item.name }} @@ -48,6 +54,8 @@ stop() { echo -n "Shutting down {{ item.name }}: " {% if item.stop_command is defined %} {{ item.stop_command }} +{% elif item.status_pattern is defined %} + pkill -f {{ item.status_pattern }} {% else %} pkill -f {{ item.start_command | regex_replace(' .*') }} {% endif %} @@ -66,7 +74,7 @@ status() { {% endif %} returncode="${?}" if [ $returncode -gt 0 ] ; then - echo "{{ item.name }} is not running." ; exit ${returncode} + echo "{{ item.name }} is not running." ; exit 3 else echo "{{ item.name }} is running." ; exit ${returncode} fi diff --git a/roles/robertdebock.service/tox.ini b/roles/robertdebock.service/tox.ini new file mode 100644 index 0000000..c1bc1d4 --- /dev/null +++ b/roles/robertdebock.service/tox.ini @@ -0,0 +1,26 @@ +# +# Ansible managed +# +[tox] +minversion = 3.7 +# Disabled "next" because of: +# https://github.com/ansible-community/molecule/issues/2626. +# envlist = py{38}-ansible-{previous,current,next} +envlist = py{38}-ansible-{previous,current} +skipsdist = true + +[testenv] +deps = + previous: ansible>=2.8, <2.9 + current: ansible>=2.9 + next: git+https://github.com/ansible/ansible.git@devel + molecule[lint]>=3, <4 + docker>=4.2, <4.3 +commands = molecule test +setenv = + TOX_ENVNAME={envname} + MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} + PY_COLORS=1 + ANSIBLE_FORCE_COLOR=1 + +passenv = namespace image tag diff --git a/roles/service/vars/main.yml b/roles/robertdebock.service/vars/main.yml similarity index 91% rename from roles/service/vars/main.yml rename to roles/robertdebock.service/vars/main.yml index beee86f..c12bccd 100644 --- a/roles/service/vars/main.yml +++ b/roles/robertdebock.service/vars/main.yml @@ -1,9 +1,8 @@ --- # vars file for service + _service_required_packages: default: [] - Archlinux: - - psmisc Debian: - psmisc RedHat: diff --git a/roles/travis/.ansible-lint b/roles/robertdebock.travis/.ansible-lint similarity index 54% rename from roles/travis/.ansible-lint rename to roles/robertdebock.travis/.ansible-lint index f2934a8..ffceae6 100644 --- a/roles/travis/.ansible-lint +++ b/roles/robertdebock.travis/.ansible-lint @@ -1,4 +1,7 @@ +# +# Ansible managed +# exclude_paths: - - ./meta/version.yml - ./meta/exception.yml - ./meta/preferences.yml + - ./molecule/default/verify.yml diff --git a/roles/robertdebock.travis/.github/FUNDING.yml b/roles/robertdebock.travis/.github/FUNDING.yml new file mode 100644 index 0000000..67320f0 --- /dev/null +++ b/roles/robertdebock.travis/.github/FUNDING.yml @@ -0,0 +1,2 @@ +--- +github: robertdebock diff --git a/roles/robertdebock.travis/.github/ISSUE_TEMPLATE/bug_report.md b/roles/robertdebock.travis/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..f39b5dc --- /dev/null +++ b/roles/robertdebock.travis/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a report to help me improve + +--- + +## Describe the bug +A clear and concise description of what the bug is. + +## Playbook + +Please paste the playbook you are using. (Consider `requirements.yml` and +optionally the command you've invoked.) + + +```yaml +--- +YOUR PLAYBOOK HERE +``` + +## Output + +Show at least the error, possible related output, maybe just all the output. + +## Environment + +- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) +- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) +- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.travis/.github/ISSUE_TEMPLATE/feature_request.md b/roles/robertdebock.travis/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..55a93c4 --- /dev/null +++ b/roles/robertdebock.travis/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +## Proposed feature + +A clear and concise description of what you want to happen. + +## Rationale + +Why is this feature required? + +## Additional context + +Add any other context about the feature request here. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/travis/PULL_REQUEST_TEMPLATE.md b/roles/robertdebock.travis/.github/pull_request_template.md similarity index 100% rename from roles/travis/PULL_REQUEST_TEMPLATE.md rename to roles/robertdebock.travis/.github/pull_request_template.md diff --git a/roles/travis/.github/settings.yml b/roles/robertdebock.travis/.github/settings.yml similarity index 81% rename from roles/travis/.github/settings.yml rename to roles/robertdebock.travis/.github/settings.yml index fa13fa3..9cd2a21 100644 --- a/roles/travis/.github/settings.yml +++ b/roles/robertdebock.travis/.github/settings.yml @@ -1,4 +1,7 @@ --- +# +# Ansible managed +# repository: description: Installs travis on your system. homepage: https://robertdebock.nl/ diff --git a/roles/robertdebock.travis/.github/workflows/galaxy.yml b/roles/robertdebock.travis/.github/workflows/galaxy.yml new file mode 100644 index 0000000..08996ca --- /dev/null +++ b/roles/robertdebock.travis/.github/workflows/galaxy.yml @@ -0,0 +1,22 @@ +--- +# +# Ansible managed +# + +name: Release to Ansible Galaxy + +on: + push: + tags: + - '*' + schedule: + - cron: '20 20 20 * *' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: galaxy + uses: robertdebock/galaxy-action@1.0.1 + with: + galaxy_api_key: ${{ secrets.galaxy_api_key }} diff --git a/roles/robertdebock.travis/.github/workflows/molecule.yml b/roles/robertdebock.travis/.github/workflows/molecule.yml new file mode 100644 index 0000000..f122a19 --- /dev/null +++ b/roles/robertdebock.travis/.github/workflows/molecule.yml @@ -0,0 +1,70 @@ +--- +# +# Ansible managed +# + +name: Ansible Molecule + +on: + push: + tags_ignore: + - '*' + pull_request: + schedule: + - cron: '20 20 20 * *' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: molecule + uses: robertdebock/molecule-action@2.6.1 + with: + command: lint + test: + needs: + - lint + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + config: + - image: "alpine" + tag: "latest" + - image: "alpine" + tag: "edge" + - image: "centos" + tag: "latest" + - image: "debian" + tag: "latest" + - image: "debian" + tag: "bullseye" + - image: "opensuse" + tag: "latest" + - image: "ubuntu" + tag: "latest" + - image: "ubuntu" + tag: "bionic" + - image: "ubuntu" + tag: "xenial" + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: disable apparmor for mysql + run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + - name: parse apparmor for mysql + run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + - name: molecule + uses: robertdebock/molecule-action@2.6.1 + with: + image: ${{ matrix.config.image }} + tag: ${{ matrix.config.tag }} + options: "--parallel all" + env: + TOX_PARALLEL_NO_SPINNER: 1 diff --git a/roles/travis/.gitignore b/roles/robertdebock.travis/.gitignore similarity index 100% rename from roles/travis/.gitignore rename to roles/robertdebock.travis/.gitignore diff --git a/roles/robertdebock.travis/.travis.yml b/roles/robertdebock.travis/.travis.yml new file mode 100644 index 0000000..7d8be10 --- /dev/null +++ b/roles/robertdebock.travis/.travis.yml @@ -0,0 +1,40 @@ +--- +# +# Ansible managed +# +language: python + +python: + - "3.8" + +services: + - docker + +env: + global: + namespace="robertdebock" + matrix: + - image="alpine" tag="latest" + - image="alpine" tag="edge" + - image="centos" tag="latest" + - image="debian" tag="latest" + - image="debian" tag="bullseye" + - image="opensuse" tag="latest" + - image="ubuntu" tag="latest" + - image="ubuntu" tag="bionic" + - image="ubuntu" tag="xenial" + +cache: + - pip + +install: + - pip install --upgrade pip + - pip install tox + +script: + - function retry { counter=0 ; until "$@" ; do exit=$? ; counter=$(($counter + 1)) ; if [ $counter -ge 3 ] ; then return $exit ; fi ; done ; return 0; } ; retry tox --parallel all + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ + slack: "WbkXeeWn2ywEGhPRMZSKlQKhxxNNZcyavxonnRlj7ZqTPlf1xJ/VlNxs3hsFBNafCePnxNuVTrWaA+4oq4xQgTSHyX3Rxh4rqyY2FIYWYDoQP6hiUFfuunZ9Wa5utGIKRkX3YQWfYaUUqd18tiD6N1KQ1LrAZFywKjHx5RQwUXLPvCQ5WR48SrwaV6/PVYy4h59PljYb/GrItLJrQV44Eqzs9WqkdTfXBNLe6+0w90RmxZUeaCZkbmI+0NUCpJzHMGw4YSE0Ov5EuGPoeRdRBodTbzoDLe+MxVzQUAeUZV9IQf3PjYzdp4P7hDVsqYF9rQUU7lF1y5z0FeReRrb0nmPW3qRHj5EbcN54/kYILyqI+TFLRyxO/YUXzSb1dWTJjS2qCXhHYsd7bwzWJrnxSApmtLpz0dXcutdn+eJnNdZfmFG4wQjnIf0X1vJOW754FW3J+0Mdg3KNty7I9NbvvoOaalahm1s9DxV6emw3biNVuyPML0yDZHb5z7ztOCGgJuHmwUkc+wpoLBOy2XVXc8L2gcWM2IKnOytOklq8/mvwWnUCSbiic4w+Xi0yDEv85f36vlfkI9p6BxrsUBj2JMlF2y9J+453dkKBiU/ESnFMO1iagbtDqrEjyMlOY/paF+DtiP5Rij1UubQo0p3j8i4vtdrtLdM9iMoiv0HyISg=" + email: false diff --git a/roles/atom/.yamllint b/roles/robertdebock.travis/.yamllint similarity index 97% rename from roles/atom/.yamllint rename to roles/robertdebock.travis/.yamllint index ad0be76..c5ae64b 100644 --- a/roles/atom/.yamllint +++ b/roles/robertdebock.travis/.yamllint @@ -1,3 +1,4 @@ +--- extends: default rules: diff --git a/roles/travis/CODE_OF_CONDUCT.md b/roles/robertdebock.travis/CODE_OF_CONDUCT.md similarity index 100% rename from roles/travis/CODE_OF_CONDUCT.md rename to roles/robertdebock.travis/CODE_OF_CONDUCT.md diff --git a/roles/robertdebock.travis/CONTRIBUTING.md b/roles/robertdebock.travis/CONTRIBUTING.md new file mode 100644 index 0000000..4ae7fad --- /dev/null +++ b/roles/robertdebock.travis/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# [Please contribute](#please-contribute) + +You can really make a difference by: + +- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) +- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. + +I'll try to help and take every contribution seriously. + +It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. + +## [Step by step](#step-by-step) + +Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. + +### [1. Make an issue.](#1-make-an-issue) + +When you spot an issue, [create an issue](https://github.com/robertdebock/ansible-role-travis/issues). + +Making the issue help me and others to find similar problems in the future. + +### [2. Fork the project.](#2-fork-the-project) + +On the top right side of [the repository on GitHub](https://github.com/robertdebock/ansible-role-travis), click `fork`. This copies everything to your GitHub namespace. + +### [3. Make the changes](#3-make-the-changes) + +In you own GitHub namespace, make the required changes. + +I typically do that by cloning the repository (in your namespace) locally: + +``` +git clone git@github.com:YOURNAMESPACE/ansible-role-travis.git +``` + +Now you can start to edit on your laptop. + +### [4. Optionally: test your changes](#4-optionally-test-your-changes) + +Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): + +``` +pip install molecule tox ansible-lint docker +``` + +And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: + +``` +image=centos tag=7 molecule test +``` + +Once it start to work, you can test multiple version of Ansible: + +``` +image=centos tag=7 tox +``` + +### [5. Optionally: Regenerate all dynamic content](#5-optionally-regenerate-all-dynamic-content) + +You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. + +If you don't do it, I'll do it later for you. + +### [6. Make a pull request](#6-make-a-pull-request) + +[GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. + +In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. + +### [7. Wait](#7-wait) + +Now I'll get a message that you've added some code. Thank you, really. + +CI starts to test your changes. You can follow the progress on Travis. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.travis/LICENSE b/roles/robertdebock.travis/LICENSE new file mode 100644 index 0000000..bd15893 --- /dev/null +++ b/roles/robertdebock.travis/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Robert de Bock (robert@meinit.nl) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/roles/travis/README.md b/roles/robertdebock.travis/README.md similarity index 59% rename from roles/travis/README.md rename to roles/robertdebock.travis/README.md index 56702eb..a37f323 100644 --- a/roles/travis/README.md +++ b/roles/robertdebock.travis/README.md @@ -1,15 +1,14 @@ -travis -========= - -Ansible logo - Build status +# [travis](#travis) Installs travis on your system. -Example Playbook ----------------- +|Travis|GitHub|Quality|Downloads|Version| +|------|------|-------|---------|-------| +|[![travis](https://travis-ci.com/robertdebock/ansible-role-travis.svg?branch=master)](https://travis-ci.com/robertdebock/ansible-role-travis)|[![github](https://github.com/robertdebock/ansible-role-travis/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-travis/actions)|[![quality](https://img.shields.io/ansible/quality/35947)](https://galaxy.ansible.com/robertdebock/travis)|[![downloads](https://img.shields.io/ansible/role/d/35947)](https://galaxy.ansible.com/robertdebock/travis)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-travis.svg)](https://github.com/robertdebock/ansible-role-travis/releases/)| -This example is taken from `molecule/resources/playbook.yml` and is tested on each push, pull request and release. +## [Example Playbook](#example-playbook) + +This example is taken from `molecule/resources/converge.yml` and is tested on each push, pull request and release. ```yaml --- - name: Converge @@ -18,10 +17,10 @@ This example is taken from `molecule/resources/playbook.yml` and is tested on ea gather_facts: yes roles: - - robertdebock.travis + - role: robertdebock.travis ``` -The machine you are running this on, may need to be prepared, I use this playbook to ensure everything is in place to let the role work. +The machine may need to be prepared using `molecule/resources/prepare.yml`: ```yaml --- - name: Prepare @@ -35,20 +34,23 @@ The machine you are running this on, may need to be prepared, I use this playboo - role: robertdebock.ruby ``` +For verification `molecule/resources/verify.yml` run after the role has been applied. +```yaml +--- +- name: Verify + hosts: all + become: yes + gather_facts: yes + + tasks: + - name: check if connection still works + ping: +``` Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles. -Role Variables --------------- -These variables are set in `defaults/main.yml`: -```yaml ---- -# defaults file for travis -``` - -Requirements ------------- +## [Requirements](#requirements) - Access to a repository containing packages, likely on the internet. - A recent version of Ansible. (Tests run on the current, previous and next release of Ansible.) @@ -63,40 +65,32 @@ The following roles can be installed to ensure all requirements are met, using ` ``` -Context -------- +## [Context](#context) This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information. Here is an overview of related roles: ![dependencies](https://raw.githubusercontent.com/robertdebock/drawings/artifacts/travis.png "Dependency") +## [Compatibility](#compatibility) -Compatibility -------------- +This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): -This role has been tested on these [container images](https://hub.docker.com/): +|container|tags| +|---------|----| +|alpine|all| +|el|8| +|debian|buster, bullseye| +|opensuse|all| +|ubuntu|focal, bionic, xenial| -|container|tag|allow_failures| -|---------|---|--------------| -|amazonlinux|1|no| -|amazonlinux|latest|no| -|alpine|latest|no| -|alpine|edge|yes| -|debian|unstable|yes| -|debian|latest|no| -|centos|latest|no| -|opensuse|latest|no| -|ubuntu|latest|no| +The minimum version of Ansible required is 2.8 but tests have been done to: -This role has been tested on these Ansible versions: +- The previous version, on version lower. +- The current version. +- The development version. -- ansible>=2.8, <2.9 -- ansible>=2.9 -- git+https://github.com/ansible/ansible.git@devel - -Exceptions ----------- +## [Exceptions](#exceptions) Some variarations of the build matrix do not work. These are the variations and reasons why the build won't work: @@ -106,10 +100,9 @@ Some variarations of the build matrix do not work. These are the variations and | Fedora | extconf failed, exit code 1 | -Testing -------- +## [Testing](#testing) -[Unit tests](https://travis-ci.org/robertdebock/ansible-role-travis) are done on every commit, pull request, release and periodically. +[Unit tests](https://travis-ci.com/robertdebock/ansible-role-travis) are done on every commit, pull request, release and periodically. If you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-travis/issues) @@ -141,23 +134,13 @@ image="centos" tox image="debian" tag="stable" tox ``` -Modules -------- - -This role uses the following modules: -```yaml ---- -- gem -- package -``` - -License -------- +## [License](#license) Apache-2.0 -Author Information ------------------- +## [Author Information](#author-information) [Robert de Bock](https://robertdebock.nl/) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/travis/SECURITY.md b/roles/robertdebock.travis/SECURITY.md similarity index 76% rename from roles/travis/SECURITY.md rename to roles/robertdebock.travis/SECURITY.md index f743f6f..8d118be 100644 --- a/roles/travis/SECURITY.md +++ b/roles/robertdebock.travis/SECURITY.md @@ -1,8 +1,8 @@ -# Security Policy +# [Security Policy](#security-policy) This software implements other software, it's not very likely that this software introduces new vulnerabilities. -## Supported Versions +## [Supported Versions](#supported-versions) The current major version is supported. For example if the current version is 3.4.1: @@ -14,10 +14,12 @@ The current major version is supported. For example if the current version is 3. | 2.0.0 | :x: | | 1.0.0 | :x: | -## Reporting a Vulnerability +## [Reporting a Vulnerability](#reporting-a-vulnarability) Please [open an issue](https://github.com/robertdebock/ansible-role-travis/issues) describing the vulnerability. Tell them where to go, how often they can expect to get an update on a reported vulnerability, what to expect if the vulnerability is accepted or declined, etc. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.travis/meta/.galaxy_install_info b/roles/robertdebock.travis/meta/.galaxy_install_info new file mode 100644 index 0000000..8fd7767 --- /dev/null +++ b/roles/robertdebock.travis/meta/.galaxy_install_info @@ -0,0 +1,2 @@ +install_date: Mon Sep 28 09:37:08 2020 +version: 3.0.5 diff --git a/roles/travis/meta/exception.yml b/roles/robertdebock.travis/meta/exception.yml similarity index 100% rename from roles/travis/meta/exception.yml rename to roles/robertdebock.travis/meta/exception.yml diff --git a/roles/travis/meta/main.yml b/roles/robertdebock.travis/meta/main.yml similarity index 75% rename from roles/travis/meta/main.yml rename to roles/robertdebock.travis/meta/main.yml index 9896cf1..2aa1307 100644 --- a/roles/travis/meta/main.yml +++ b/roles/robertdebock.travis/meta/main.yml @@ -8,33 +8,27 @@ galaxy_info: min_ansible_version: 2.8 platforms: - - name: Amazon - versions: - - all - name: Alpine versions: - all - - name: ArchLinux - versions: - - all - - name: Debian - versions: - - all - name: EL versions: - 8 + - name: Debian + versions: + - buster + - bullseye - name: OpenSUSE versions: - all - name: Ubuntu versions: - - artful + - focal - bionic + - xenial galaxy_tags: - travis - - archlinux - centos - - rhel dependencies: [] diff --git a/roles/robertdebock.travis/meta/preferences.yml b/roles/robertdebock.travis/meta/preferences.yml new file mode 100644 index 0000000..e7fdebf --- /dev/null +++ b/roles/robertdebock.travis/meta/preferences.yml @@ -0,0 +1,2 @@ +--- +tox_parallel: yes diff --git a/roles/robertdebock.travis/molecule/default/converge.yml b/roles/robertdebock.travis/molecule/default/converge.yml new file mode 100644 index 0000000..3143587 --- /dev/null +++ b/roles/robertdebock.travis/molecule/default/converge.yml @@ -0,0 +1,8 @@ +--- +- name: Converge + hosts: all + become: yes + gather_facts: yes + + roles: + - role: ansible-role-travis diff --git a/roles/travis/molecule.yml b/roles/robertdebock.travis/molecule/default/molecule.yml similarity index 61% rename from roles/travis/molecule.yml rename to roles/robertdebock.travis/molecule/default/molecule.yml index 496cae0..9f74607 100644 --- a/roles/travis/molecule.yml +++ b/roles/robertdebock.travis/molecule/default/molecule.yml @@ -1,10 +1,15 @@ --- +# +# Ansible managed +# dependency: name: galaxy options: role-file: requirements.yml -lint: - name: yamllint +lint: | + PATH=${PATH} + yamllint molecule/default/converge.yml + ansible-lint molecule/default/converge.yml driver: name: docker platforms: @@ -17,5 +22,9 @@ platforms: pre_build_image: yes provisioner: name: ansible -scenario: - name: default + config_options: + defaults: + stdout_callback: yaml + bin_ansible_callbacks: yes +verifier: + name: ansible diff --git a/roles/travis/molecule/default/prepare.yml b/roles/robertdebock.travis/molecule/default/prepare.yml similarity index 100% rename from roles/travis/molecule/default/prepare.yml rename to roles/robertdebock.travis/molecule/default/prepare.yml diff --git a/roles/robertdebock.travis/molecule/default/verify.yml b/roles/robertdebock.travis/molecule/default/verify.yml new file mode 100644 index 0000000..6ab75cf --- /dev/null +++ b/roles/robertdebock.travis/molecule/default/verify.yml @@ -0,0 +1,9 @@ +--- +- name: Verify + hosts: all + become: yes + gather_facts: yes + + tasks: + - name: check if connection still works + ping: diff --git a/roles/travis/requirements.yml b/roles/robertdebock.travis/requirements.yml similarity index 100% rename from roles/travis/requirements.yml rename to roles/robertdebock.travis/requirements.yml diff --git a/roles/travis/tasks/main.yml b/roles/robertdebock.travis/tasks/main.yml similarity index 54% rename from roles/travis/tasks/main.yml rename to roles/robertdebock.travis/tasks/main.yml index 25971e4..b2e9e88 100644 --- a/roles/travis/tasks/main.yml +++ b/roles/robertdebock.travis/tasks/main.yml @@ -4,15 +4,9 @@ package: name: "{{ travis_requirements }}" state: present - register: travis_install_requirements - until: travis_install_requirements is succeeded - retries: 3 - name: install travis gem: name: "{{ travis_package }}" state: present user_install: no - register: travis_install_travis - until: travis_install_travis is succeeded - retries: 3 diff --git a/roles/robertdebock.travis/tox.ini b/roles/robertdebock.travis/tox.ini new file mode 100644 index 0000000..c1bc1d4 --- /dev/null +++ b/roles/robertdebock.travis/tox.ini @@ -0,0 +1,26 @@ +# +# Ansible managed +# +[tox] +minversion = 3.7 +# Disabled "next" because of: +# https://github.com/ansible-community/molecule/issues/2626. +# envlist = py{38}-ansible-{previous,current,next} +envlist = py{38}-ansible-{previous,current} +skipsdist = true + +[testenv] +deps = + previous: ansible>=2.8, <2.9 + current: ansible>=2.9 + next: git+https://github.com/ansible/ansible.git@devel + molecule[lint]>=3, <4 + docker>=4.2, <4.3 +commands = molecule test +setenv = + TOX_ENVNAME={envname} + MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} + PY_COLORS=1 + ANSIBLE_FORCE_COLOR=1 + +passenv = namespace image tag diff --git a/roles/travis/vars/main.yml b/roles/robertdebock.travis/vars/main.yml similarity index 92% rename from roles/travis/vars/main.yml rename to roles/robertdebock.travis/vars/main.yml index 2c4b8bb..97c1b65 100644 --- a/roles/travis/vars/main.yml +++ b/roles/robertdebock.travis/vars/main.yml @@ -1,11 +1,10 @@ --- # vars file for travis + _travis_requirements: default: [] Alpine: - ruby-dev - Archlinux: - - bash Debian: - ruby-dev RedHat: diff --git a/roles/vagrant/.ansible-lint b/roles/robertdebock.update/.ansible-lint similarity index 54% rename from roles/vagrant/.ansible-lint rename to roles/robertdebock.update/.ansible-lint index f2934a8..ffceae6 100644 --- a/roles/vagrant/.ansible-lint +++ b/roles/robertdebock.update/.ansible-lint @@ -1,4 +1,7 @@ +# +# Ansible managed +# exclude_paths: - - ./meta/version.yml - ./meta/exception.yml - ./meta/preferences.yml + - ./molecule/default/verify.yml diff --git a/roles/robertdebock.update/.github/FUNDING.yml b/roles/robertdebock.update/.github/FUNDING.yml new file mode 100644 index 0000000..67320f0 --- /dev/null +++ b/roles/robertdebock.update/.github/FUNDING.yml @@ -0,0 +1,2 @@ +--- +github: robertdebock diff --git a/roles/robertdebock.update/.github/ISSUE_TEMPLATE/bug_report.md b/roles/robertdebock.update/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..f39b5dc --- /dev/null +++ b/roles/robertdebock.update/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a report to help me improve + +--- + +## Describe the bug +A clear and concise description of what the bug is. + +## Playbook + +Please paste the playbook you are using. (Consider `requirements.yml` and +optionally the command you've invoked.) + + +```yaml +--- +YOUR PLAYBOOK HERE +``` + +## Output + +Show at least the error, possible related output, maybe just all the output. + +## Environment + +- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) +- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) +- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.update/.github/ISSUE_TEMPLATE/feature_request.md b/roles/robertdebock.update/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..55a93c4 --- /dev/null +++ b/roles/robertdebock.update/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +## Proposed feature + +A clear and concise description of what you want to happen. + +## Rationale + +Why is this feature required? + +## Additional context + +Add any other context about the feature request here. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/update/PULL_REQUEST_TEMPLATE.md b/roles/robertdebock.update/.github/pull_request_template.md similarity index 100% rename from roles/update/PULL_REQUEST_TEMPLATE.md rename to roles/robertdebock.update/.github/pull_request_template.md diff --git a/roles/update/.github/settings.yml b/roles/robertdebock.update/.github/settings.yml similarity index 100% rename from roles/update/.github/settings.yml rename to roles/robertdebock.update/.github/settings.yml diff --git a/roles/robertdebock.update/.github/workflows/galaxy.yml b/roles/robertdebock.update/.github/workflows/galaxy.yml new file mode 100644 index 0000000..5ec3062 --- /dev/null +++ b/roles/robertdebock.update/.github/workflows/galaxy.yml @@ -0,0 +1,22 @@ +--- +# +# Ansible managed +# + +name: Release to Ansible Galaxy + +on: + push: + tags: + - '*' + schedule: + - cron: '21 21 21 * *' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: galaxy + uses: robertdebock/galaxy-action@1.0.1 + with: + galaxy_api_key: ${{ secrets.galaxy_api_key }} diff --git a/roles/robertdebock.update/.github/workflows/molecule.yml b/roles/robertdebock.update/.github/workflows/molecule.yml new file mode 100644 index 0000000..d7a3e2c --- /dev/null +++ b/roles/robertdebock.update/.github/workflows/molecule.yml @@ -0,0 +1,78 @@ +--- +# +# Ansible managed +# + +name: Ansible Molecule + +on: + push: + tags_ignore: + - '*' + pull_request: + schedule: + - cron: '21 21 21 * *' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: molecule + uses: robertdebock/molecule-action@2.6.1 + with: + command: lint + test: + needs: + - lint + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + config: + - image: "alpine" + tag: "latest" + - image: "alpine" + tag: "edge" + - image: "amazonlinux" + tag: "1" + - image: "centos" + tag: "7" + - image: "centos" + tag: "latest" + - image: "debian" + tag: "latest" + - image: "debian" + tag: "bullseye" + - image: "fedora" + tag: "31" + - image: "fedora" + tag: "latest" + - image: "opensuse" + tag: "latest" + - image: "ubuntu" + tag: "latest" + - image: "ubuntu" + tag: "bionic" + - image: "ubuntu" + tag: "xenial" + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: disable apparmor for mysql + run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + - name: parse apparmor for mysql + run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + - name: molecule + uses: robertdebock/molecule-action@2.6.1 + with: + image: ${{ matrix.config.image }} + tag: ${{ matrix.config.tag }} + options: "--parallel all" + env: + TOX_PARALLEL_NO_SPINNER: 1 diff --git a/roles/update/.gitignore b/roles/robertdebock.update/.gitignore similarity index 100% rename from roles/update/.gitignore rename to roles/robertdebock.update/.gitignore diff --git a/roles/robertdebock.update/.travis.yml b/roles/robertdebock.update/.travis.yml new file mode 100644 index 0000000..24565ce --- /dev/null +++ b/roles/robertdebock.update/.travis.yml @@ -0,0 +1,44 @@ +--- +# +# Ansible managed +# +language: python + +python: + - "3.8" + +services: + - docker + +env: + global: + namespace="robertdebock" + matrix: + - image="alpine" tag="latest" + - image="alpine" tag="edge" + - image="amazonlinux" tag="1" + - image="centos" tag="7" + - image="centos" tag="latest" + - image="debian" tag="latest" + - image="debian" tag="bullseye" + - image="fedora" tag="31" + - image="fedora" tag="latest" + - image="opensuse" tag="latest" + - image="ubuntu" tag="latest" + - image="ubuntu" tag="bionic" + - image="ubuntu" tag="xenial" + +cache: + - pip + +install: + - pip install --upgrade pip + - pip install tox + +script: + - function retry { counter=0 ; until "$@" ; do exit=$? ; counter=$(($counter + 1)) ; if [ $counter -ge 3 ] ; then return $exit ; fi ; done ; return 0; } ; retry tox --parallel all + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ + slack: "dsx6/sONAWIAzC548G+A1c+VxICe/G3sEl2x3+eCJZnoAbtPFmGceAQN2PqVD1VhpNdS3kacO8v2+vp02xJlUskIO9CYbZjEsCyeH5ZU9fcnSQrq8pIGsq7907zhre6RBG+P0ZYJsZlP2/pC5M/RckfySPjL/NxEtKaI5J56fu7KMCwGoPBYBQet9zwhsOKKfrKkJnBTdECy+QzhRUHvjZTVzNDu4ISz/eh8AjqdqwWHGBKYswhgkUmkEssYwSIStu6o2PCMQLIWlm5b+twdmjDKt7Z6Z/UD7IloB2WC4jcQx/pPHMJferMEQMO3vaNBOVD6UzHMN7nEg6cSU6M5Gd4gdyS2/ZMypvL1HjyOAMxHM6jzqy/1ULqcaaHE9uwbVAUQTyK6RozG4f5f0h3eUeJlMO6pqWGpu0g0HDShk+3+q6907tJY0URr9SJ7wIB8pDHN9MrhCiPf03o9QFOxt7hVIv/iEYOj93ZbTVHANbDR4V+n8ndDcz+X3vFF9Bj1Ckj6vcwaucLxyR5+2ykB2Mbm4HSUngu31kQxf5C91jaAC0IGbaBZzVIcRNNlQacT/XkI1gPVNoA2M1NLdw00CRDKLSYhOsX/39a7hp75WDJdCSFEwX4190j9qy2EIRa7Tv0WePppRto+maXggTYDfyGHClVY01V6Wuc8DEYYYnA=" + email: false diff --git a/roles/ansible_lint/.yamllint b/roles/robertdebock.update/.yamllint similarity index 97% rename from roles/ansible_lint/.yamllint rename to roles/robertdebock.update/.yamllint index ad0be76..c5ae64b 100644 --- a/roles/ansible_lint/.yamllint +++ b/roles/robertdebock.update/.yamllint @@ -1,3 +1,4 @@ +--- extends: default rules: diff --git a/roles/update/CODE_OF_CONDUCT.md b/roles/robertdebock.update/CODE_OF_CONDUCT.md similarity index 100% rename from roles/update/CODE_OF_CONDUCT.md rename to roles/robertdebock.update/CODE_OF_CONDUCT.md diff --git a/roles/robertdebock.update/CONTRIBUTING.md b/roles/robertdebock.update/CONTRIBUTING.md new file mode 100644 index 0000000..bcf3d7c --- /dev/null +++ b/roles/robertdebock.update/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# [Please contribute](#please-contribute) + +You can really make a difference by: + +- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) +- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. + +I'll try to help and take every contribution seriously. + +It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. + +## [Step by step](#step-by-step) + +Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. + +### [1. Make an issue.](#1-make-an-issue) + +When you spot an issue, [create an issue](https://github.com/robertdebock/ansible-role-update/issues). + +Making the issue help me and others to find similar problems in the future. + +### [2. Fork the project.](#2-fork-the-project) + +On the top right side of [the repository on GitHub](https://github.com/robertdebock/ansible-role-update), click `fork`. This copies everything to your GitHub namespace. + +### [3. Make the changes](#3-make-the-changes) + +In you own GitHub namespace, make the required changes. + +I typically do that by cloning the repository (in your namespace) locally: + +``` +git clone git@github.com:YOURNAMESPACE/ansible-role-update.git +``` + +Now you can start to edit on your laptop. + +### [4. Optionally: test your changes](#4-optionally-test-your-changes) + +Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): + +``` +pip install molecule tox ansible-lint docker +``` + +And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: + +``` +image=centos tag=7 molecule test +``` + +Once it start to work, you can test multiple version of Ansible: + +``` +image=centos tag=7 tox +``` + +### [5. Optionally: Regenerate all dynamic content](#5-optionally-regenerate-all-dynamic-content) + +You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. + +If you don't do it, I'll do it later for you. + +### [6. Make a pull request](#6-make-a-pull-request) + +[GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. + +In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. + +### [7. Wait](#7-wait) + +Now I'll get a message that you've added some code. Thank you, really. + +CI starts to test your changes. You can follow the progress on Travis. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.update/LICENSE b/roles/robertdebock.update/LICENSE new file mode 100644 index 0000000..bd15893 --- /dev/null +++ b/roles/robertdebock.update/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Robert de Bock (robert@meinit.nl) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/roles/update/README.md b/roles/robertdebock.update/README.md similarity index 58% rename from roles/update/README.md rename to roles/robertdebock.update/README.md index 70996ad..d36a831 100644 --- a/roles/update/README.md +++ b/roles/robertdebock.update/README.md @@ -1,15 +1,14 @@ -update -========= - -Ansible logo - Build status +# [update](#update) Install updates on your system. -Example Playbook ----------------- +|Travis|GitHub|Quality|Downloads|Version| +|------|------|-------|---------|-------| +|[![travis](https://travis-ci.com/robertdebock/ansible-role-update.svg?branch=master)](https://travis-ci.com/robertdebock/ansible-role-update)|[![github](https://github.com/robertdebock/ansible-role-update/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-update/actions)|[![quality](https://img.shields.io/ansible/quality/22417)](https://galaxy.ansible.com/robertdebock/update)|[![downloads](https://img.shields.io/ansible/role/d/22417)](https://galaxy.ansible.com/robertdebock/update)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-update.svg)](https://github.com/robertdebock/ansible-role-update/releases/)| -This example is taken from `molecule/resources/playbook.yml` and is tested on each push, pull request and release. +## [Example Playbook](#example-playbook) + +This example is taken from `molecule/resources/converge.yml` and is tested on each push, pull request and release. ```yaml --- - name: Converge @@ -18,10 +17,10 @@ This example is taken from `molecule/resources/playbook.yml` and is tested on ea gather_facts: yes roles: - - robertdebock.update + - role: robertdebock.update ``` -The machine you are running this on, may need to be prepared, I use this playbook to ensure everything is in place to let the role work. +The machine may need to be prepared using `molecule/resources/prepare.yml`: ```yaml --- - name: Prepare @@ -30,14 +29,25 @@ The machine you are running this on, may need to be prepared, I use this playboo gather_facts: no roles: - - robertdebock.bootstrap + - role: robertdebock.bootstrap ``` +For verification `molecule/resources/verify.yml` run after the role has been applied. +```yaml +--- +- name: Verify + hosts: all + become: yes + gather_facts: yes + + tasks: + - name: check if connection still works + ping: +``` Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles. -Role Variables --------------- +## [Role Variables](#role-variables) These variables are set in `defaults/main.yml`: ```yaml @@ -50,7 +60,7 @@ update_autoremove: no # For APT (Debian/Ubuntu) only: apt_upgrade type which can be: dist, full, yes, or safe update_upgrade_command: dist -# For APT (Debian/Ubuntu) only: update the apt cache if it's older than the cache_valid_time. Set in seconds. +# For APT (Debian/Ubuntu) only: update the apt cache if it's older than the cache_valid_time. Set in seconds. update_cache_valid_time: 1 # When updating systems, a reboot may be required. Here you can select to: @@ -59,8 +69,7 @@ update_cache_valid_time: 1 update_reboot: yes ``` -Requirements ------------- +## [Requirements](#requirements) - Access to a repository containing packages, likely on the internet. - A recent version of Ansible. (Tests run on the current, previous and next release of Ansible.) @@ -70,49 +79,37 @@ The following roles can be installed to ensure all requirements are met, using ` ```yaml --- - robertdebock.bootstrap -- robertdebock.reboot ``` -Context -------- +## [Context](#context) This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information. Here is an overview of related roles: ![dependencies](https://raw.githubusercontent.com/robertdebock/drawings/artifacts/update.png "Dependency") +## [Compatibility](#compatibility) -Compatibility -------------- +This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): -This role has been tested on these [container images](https://hub.docker.com/): +|container|tags| +|---------|----| +|alpine|all| +|amazon|2018.03| +|el|7, 8| +|debian|buster, bullseye| +|fedora|31, 32| +|opensuse|all| +|ubuntu|focal, bionic, xenial| -|container|tag|allow_failures| -|---------|---|--------------| -|amazonlinux|1|no| -|amazonlinux|latest|no| -|alpine|latest|no| -|alpine|edge|yes| -|debian|unstable|yes| -|debian|latest|no| -|centos|7|no| -|redhat|7|no| -|centos|latest|no| -|redhat|latest|no| -|fedora|latest|no| -|fedora|rawhide|yes| -|opensuse|latest|no| -|ubuntu|latest|no| +The minimum version of Ansible required is 2.8 but tests have been done to: -This role has been tested on these Ansible versions: +- The previous version, on version lower. +- The current version. +- The development version. -- ansible>=2.8, <2.9 -- ansible>=2.9 -- git+https://github.com/ansible/ansible.git@devel - -Exceptions ----------- +## [Exceptions](#exceptions) Some variarations of the build matrix do not work. These are the variations and reasons why the build won't work: @@ -121,10 +118,9 @@ Some variarations of the build matrix do not work. These are the variations and | Archlinux & Ansible 2.7 | New-style module did not handle its own exit | -Testing -------- +## [Testing](#testing) -[Unit tests](https://travis-ci.org/robertdebock/ansible-role-update) are done on every commit, pull request, release and periodically. +[Unit tests](https://travis-ci.com/robertdebock/ansible-role-update) are done on every commit, pull request, release and periodically. If you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-update/issues) @@ -156,29 +152,18 @@ image="centos" tox image="debian" tag="stable" tox ``` -Modules -------- - -This role uses the following modules: -```yaml ---- -- apk -- apt -- dnf -- include_role -- package -- pacman -- yum -- zypper -``` - -License -------- +## [License](#license) Apache-2.0 +## [Contributors](#contributors) -Author Information ------------------- +I'd like to thank everybody that made contributions to this repository. It motivates me, improves the code and is just fun to collaborate. + +- [ahnooie](https://github.com/ahnooie) + +## [Author Information](#author-information) [Robert de Bock](https://robertdebock.nl/) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/update/SECURITY.md b/roles/robertdebock.update/SECURITY.md similarity index 76% rename from roles/update/SECURITY.md rename to roles/robertdebock.update/SECURITY.md index 7c0d834..c6f9279 100644 --- a/roles/update/SECURITY.md +++ b/roles/robertdebock.update/SECURITY.md @@ -1,8 +1,8 @@ -# Security Policy +# [Security Policy](#security-policy) This software implements other software, it's not very likely that this software introduces new vulnerabilities. -## Supported Versions +## [Supported Versions](#supported-versions) The current major version is supported. For example if the current version is 3.4.1: @@ -14,10 +14,12 @@ The current major version is supported. For example if the current version is 3. | 2.0.0 | :x: | | 1.0.0 | :x: | -## Reporting a Vulnerability +## [Reporting a Vulnerability](#reporting-a-vulnarability) Please [open an issue](https://github.com/robertdebock/ansible-role-update/issues) describing the vulnerability. Tell them where to go, how often they can expect to get an update on a reported vulnerability, what to expect if the vulnerability is accepted or declined, etc. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/update/defaults/main.yml b/roles/robertdebock.update/defaults/main.yml similarity index 92% rename from roles/update/defaults/main.yml rename to roles/robertdebock.update/defaults/main.yml index 4d645bd..1337c04 100644 --- a/roles/update/defaults/main.yml +++ b/roles/robertdebock.update/defaults/main.yml @@ -7,7 +7,7 @@ update_autoremove: no # For APT (Debian/Ubuntu) only: apt_upgrade type which can be: dist, full, yes, or safe update_upgrade_command: dist -# For APT (Debian/Ubuntu) only: update the apt cache if it's older than the cache_valid_time. Set in seconds. +# For APT (Debian/Ubuntu) only: update the apt cache if it's older than the cache_valid_time. Set in seconds. update_cache_valid_time: 1 # When updating systems, a reboot may be required. Here you can select to: diff --git a/roles/robertdebock.update/handlers/main.yml b/roles/robertdebock.update/handlers/main.yml new file mode 100644 index 0000000..b03c7c4 --- /dev/null +++ b/roles/robertdebock.update/handlers/main.yml @@ -0,0 +1,7 @@ +--- +# handlers file for update +- name: reboot + reboot: + when: + - update_reboot | bool + - ansible_connection != "docker" diff --git a/roles/robertdebock.update/meta/.galaxy_install_info b/roles/robertdebock.update/meta/.galaxy_install_info new file mode 100644 index 0000000..2270c1a --- /dev/null +++ b/roles/robertdebock.update/meta/.galaxy_install_info @@ -0,0 +1,2 @@ +install_date: Mon Sep 28 09:37:11 2020 +version: 2.3.3 diff --git a/roles/common/meta/exception.yml b/roles/robertdebock.update/meta/exception.yml similarity index 100% rename from roles/common/meta/exception.yml rename to roles/robertdebock.update/meta/exception.yml diff --git a/roles/update/meta/main.yml b/roles/robertdebock.update/meta/main.yml similarity index 78% rename from roles/update/meta/main.yml rename to roles/robertdebock.update/meta/main.yml index be817ab..750d1ea 100644 --- a/roles/update/meta/main.yml +++ b/roles/robertdebock.update/meta/main.yml @@ -8,37 +8,36 @@ galaxy_info: min_ansible_version: 2.8 platforms: - - name: Amazon - versions: - - all - name: Alpine versions: - all - - name: ArchLinux + - name: Amazon versions: - - all - - name: Debian - versions: - - all + - 2018.03 - name: EL versions: - 7 - 8 + - name: Debian + versions: + - buster + - bullseye - name: Fedora versions: - - all + - 31 + - 32 - name: OpenSUSE versions: - all - name: Ubuntu versions: - - artful + - focal - bionic + - xenial galaxy_tags: - update - centos - redhat -dependencies: - - robertdebock.reboot +dependencies: [] diff --git a/roles/robertdebock.update/meta/preferences.yml b/roles/robertdebock.update/meta/preferences.yml new file mode 100644 index 0000000..e7fdebf --- /dev/null +++ b/roles/robertdebock.update/meta/preferences.yml @@ -0,0 +1,2 @@ +--- +tox_parallel: yes diff --git a/roles/robertdebock.update/molecule/default/converge.yml b/roles/robertdebock.update/molecule/default/converge.yml new file mode 100644 index 0000000..b42ae1d --- /dev/null +++ b/roles/robertdebock.update/molecule/default/converge.yml @@ -0,0 +1,8 @@ +--- +- name: Converge + hosts: all + become: yes + gather_facts: yes + + roles: + - role: ansible-role-update diff --git a/roles/update/molecule/default/molecule.yml b/roles/robertdebock.update/molecule/default/molecule.yml similarity index 64% rename from roles/update/molecule/default/molecule.yml rename to roles/robertdebock.update/molecule/default/molecule.yml index 2b62ffa..b13ed58 100644 --- a/roles/update/molecule/default/molecule.yml +++ b/roles/robertdebock.update/molecule/default/molecule.yml @@ -6,8 +6,10 @@ dependency: name: galaxy options: role-file: requirements.yml -lint: - name: yamllint +lint: | + PATH=${PATH} + yamllint molecule/default/converge.yml + ansible-lint molecule/default/converge.yml driver: name: docker platforms: @@ -20,5 +22,9 @@ platforms: pre_build_image: yes provisioner: name: ansible -scenario: - name: default + config_options: + defaults: + stdout_callback: yaml + bin_ansible_callbacks: yes +verifier: + name: ansible diff --git a/roles/robertdebock.update/molecule/default/prepare.yml b/roles/robertdebock.update/molecule/default/prepare.yml new file mode 100644 index 0000000..f76c7bf --- /dev/null +++ b/roles/robertdebock.update/molecule/default/prepare.yml @@ -0,0 +1,8 @@ +--- +- name: Prepare + hosts: all + become: yes + gather_facts: no + + roles: + - role: robertdebock.bootstrap diff --git a/roles/robertdebock.update/molecule/default/verify.yml b/roles/robertdebock.update/molecule/default/verify.yml new file mode 100644 index 0000000..6ab75cf --- /dev/null +++ b/roles/robertdebock.update/molecule/default/verify.yml @@ -0,0 +1,9 @@ +--- +- name: Verify + hosts: all + become: yes + gather_facts: yes + + tasks: + - name: check if connection still works + ping: diff --git a/roles/common/requirements.yml b/roles/robertdebock.update/requirements.yml similarity index 56% rename from roles/common/requirements.yml rename to roles/robertdebock.update/requirements.yml index 4681079..46dec9d 100644 --- a/roles/common/requirements.yml +++ b/roles/robertdebock.update/requirements.yml @@ -1,3 +1,2 @@ --- - robertdebock.bootstrap -- robertdebock.reboot diff --git a/roles/robertdebock.update/tasks/assert.yml b/roles/robertdebock.update/tasks/assert.yml new file mode 100644 index 0000000..a25eb64 --- /dev/null +++ b/roles/robertdebock.update/tasks/assert.yml @@ -0,0 +1,30 @@ +--- +- name: test if update_autoremove is set correctly + assert: + that: + - update_autoremove is defined + - update_autoremove | type_debug == "bool" + quiet: yes + +- name: test if update_upgrade_command is set correctly + assert: + that: + - update_upgrade_command is defined + - update_upgrade_command | length > 0 + - update_upgrade_command in ["dist", "full", "yes", "safe"] + quiet: yes + +- name: test if update_cache_valid_time is set correctly + assert: + that: + - update_cache_valid_time is defined + - update_cache_valid_time | int + - update_cache_valid_time | int >= 0 + quiet: yes + +- name: test if update_reboot is set correctly + assert: + that: + - update_reboot is defined + - update_reboot | type_debug == "bool" + quiet: yes diff --git a/roles/update/tasks/main.yml b/roles/robertdebock.update/tasks/main.yml similarity index 60% rename from roles/update/tasks/main.yml rename to roles/robertdebock.update/tasks/main.yml index 270d15d..0121e82 100644 --- a/roles/update/tasks/main.yml +++ b/roles/robertdebock.update/tasks/main.yml @@ -1,34 +1,32 @@ --- # tasks file for update +- name: include assert.yml + include_tasks: assert.yml + - name: update cache (apk) apk: update_cache: yes when: - ansible_pkg_mgr == "apk" changed_when: no - register: update_update_cache_apk - until: update_update_cache_apk is succeeded - retries: 3 - name: update all software (apk) apk: upgrade: yes + notify: + - reboot when: - ansible_pkg_mgr == "apk" - register: update_update_all_software_apk - until: update_update_all_software_apk is succeeded - retries: 3 - name: update all software (apt) apt: update_cache: yes upgrade: "{{ update_upgrade_command }}" cache_valid_time: "{{ update_cache_valid_time }}" - register: update_all_software_apt + notify: + - reboot when: - ansible_pkg_mgr == "apt" - until: update_all_software_apt is succeeded - retries: 3 - name: apt autoremove (apt) apt: @@ -43,7 +41,8 @@ dnf: name: "*" state: latest - register: update_result_dnf + notify: + - reboot when: - ansible_pkg_mgr == "dnf" tags: @@ -53,7 +52,8 @@ pacman: update_cache: yes upgrade: yes - register: update_result_pacman + notify: + - reboot when: - ansible_pkg_mgr == "pacman" tags: @@ -63,23 +63,25 @@ yum: name: "*" state: latest + notify: + - reboot when: - ansible_pkg_mgr == "yum" - ansible_distribution_major_version == "6" tags: - skip_ansible_lint - register: update_result_yum_6 - name: update all software (yum/7) yum: name: "*" state: latest + notify: + - reboot when: - ansible_pkg_mgr == "yum" - ansible_distribution_major_version == "7" tags: - skip_ansible_lint - register: update_result_yum_7 - name: install yum-utils package: @@ -87,33 +89,14 @@ when: - ansible_pkg_mgr == "yum" - ansible_distribution_major_version == "7" - register: update_install_yum_utils - until: update_install_yum_utils is succeeded - retries: 3 - name: update all software (zypper) zypper: name: "*" state: latest + notify: + - reboot when: - ansible_pkg_mgr == "zypper" tags: - skip_ansible_lint - register: update_result_zypper - -- name: reboot for updates - include_role: - name: robertdebock.reboot - vars: - reboot_message: rebooting for robertdebock/ansible-role-update - when: - - update_update_all_software_apk.changed or - update_all_software_apt.changed or - update_result_dnf.changed or - update_result_pacman.changed or - update_result_yum_6.changed or - update_result_yum_7.changed or - update_result_zypper.changed - - update_reboot | bool - tags: - - skip_ansible_lint diff --git a/roles/robertdebock.update/tox.ini b/roles/robertdebock.update/tox.ini new file mode 100644 index 0000000..c1bc1d4 --- /dev/null +++ b/roles/robertdebock.update/tox.ini @@ -0,0 +1,26 @@ +# +# Ansible managed +# +[tox] +minversion = 3.7 +# Disabled "next" because of: +# https://github.com/ansible-community/molecule/issues/2626. +# envlist = py{38}-ansible-{previous,current,next} +envlist = py{38}-ansible-{previous,current} +skipsdist = true + +[testenv] +deps = + previous: ansible>=2.8, <2.9 + current: ansible>=2.9 + next: git+https://github.com/ansible/ansible.git@devel + molecule[lint]>=3, <4 + docker>=4.2, <4.3 +commands = molecule test +setenv = + TOX_ENVNAME={envname} + MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} + PY_COLORS=1 + ANSIBLE_FORCE_COLOR=1 + +passenv = namespace image tag diff --git a/roles/robertdebock.users/.ansible-lint b/roles/robertdebock.users/.ansible-lint new file mode 100644 index 0000000..cb2872e --- /dev/null +++ b/roles/robertdebock.users/.ansible-lint @@ -0,0 +1,7 @@ +# +# Ansible managed +# +exclude_paths: + - ./meta/preferences.yml + - ./molecule/default/verify.yml + - ./.tox diff --git a/roles/robertdebock.users/.github/FUNDING.yml b/roles/robertdebock.users/.github/FUNDING.yml new file mode 100644 index 0000000..67320f0 --- /dev/null +++ b/roles/robertdebock.users/.github/FUNDING.yml @@ -0,0 +1,2 @@ +--- +github: robertdebock diff --git a/roles/robertdebock.users/.github/ISSUE_TEMPLATE/bug_report.md b/roles/robertdebock.users/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..f39b5dc --- /dev/null +++ b/roles/robertdebock.users/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a report to help me improve + +--- + +## Describe the bug +A clear and concise description of what the bug is. + +## Playbook + +Please paste the playbook you are using. (Consider `requirements.yml` and +optionally the command you've invoked.) + + +```yaml +--- +YOUR PLAYBOOK HERE +``` + +## Output + +Show at least the error, possible related output, maybe just all the output. + +## Environment + +- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) +- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) +- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.users/.github/ISSUE_TEMPLATE/feature_request.md b/roles/robertdebock.users/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..55a93c4 --- /dev/null +++ b/roles/robertdebock.users/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +## Proposed feature + +A clear and concise description of what you want to happen. + +## Rationale + +Why is this feature required? + +## Additional context + +Add any other context about the feature request here. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/users/PULL_REQUEST_TEMPLATE.md b/roles/robertdebock.users/.github/pull_request_template.md similarity index 100% rename from roles/users/PULL_REQUEST_TEMPLATE.md rename to roles/robertdebock.users/.github/pull_request_template.md diff --git a/roles/users/.github/settings.yml b/roles/robertdebock.users/.github/settings.yml similarity index 100% rename from roles/users/.github/settings.yml rename to roles/robertdebock.users/.github/settings.yml diff --git a/roles/robertdebock.users/.github/workflows/galaxy.yml b/roles/robertdebock.users/.github/workflows/galaxy.yml new file mode 100644 index 0000000..5ec3062 --- /dev/null +++ b/roles/robertdebock.users/.github/workflows/galaxy.yml @@ -0,0 +1,22 @@ +--- +# +# Ansible managed +# + +name: Release to Ansible Galaxy + +on: + push: + tags: + - '*' + schedule: + - cron: '21 21 21 * *' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: galaxy + uses: robertdebock/galaxy-action@1.0.1 + with: + galaxy_api_key: ${{ secrets.galaxy_api_key }} diff --git a/roles/robertdebock.users/.github/workflows/molecule.yml b/roles/robertdebock.users/.github/workflows/molecule.yml new file mode 100644 index 0000000..d7a3e2c --- /dev/null +++ b/roles/robertdebock.users/.github/workflows/molecule.yml @@ -0,0 +1,78 @@ +--- +# +# Ansible managed +# + +name: Ansible Molecule + +on: + push: + tags_ignore: + - '*' + pull_request: + schedule: + - cron: '21 21 21 * *' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: molecule + uses: robertdebock/molecule-action@2.6.1 + with: + command: lint + test: + needs: + - lint + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + config: + - image: "alpine" + tag: "latest" + - image: "alpine" + tag: "edge" + - image: "amazonlinux" + tag: "1" + - image: "centos" + tag: "7" + - image: "centos" + tag: "latest" + - image: "debian" + tag: "latest" + - image: "debian" + tag: "bullseye" + - image: "fedora" + tag: "31" + - image: "fedora" + tag: "latest" + - image: "opensuse" + tag: "latest" + - image: "ubuntu" + tag: "latest" + - image: "ubuntu" + tag: "bionic" + - image: "ubuntu" + tag: "xenial" + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: disable apparmor for mysql + run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + - name: parse apparmor for mysql + run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + - name: molecule + uses: robertdebock/molecule-action@2.6.1 + with: + image: ${{ matrix.config.image }} + tag: ${{ matrix.config.tag }} + options: "--parallel all" + env: + TOX_PARALLEL_NO_SPINNER: 1 diff --git a/roles/users/.gitignore b/roles/robertdebock.users/.gitignore similarity index 100% rename from roles/users/.gitignore rename to roles/robertdebock.users/.gitignore diff --git a/roles/robertdebock.users/.travis.yml b/roles/robertdebock.users/.travis.yml new file mode 100644 index 0000000..c82859d --- /dev/null +++ b/roles/robertdebock.users/.travis.yml @@ -0,0 +1,50 @@ +--- +# +# Ansible managed +# +language: python + +os: linux +dist: xenial + +python: + - "3.8" + +services: + - docker + +env: + global: + namespace="robertdebock" + jobs: + - image="alpine" tag="latest" + - image="alpine" tag="edge" + - image="amazonlinux" tag="1" + - image="centos" tag="7" + - image="centos" tag="latest" + - image="debian" tag="latest" + - image="debian" tag="bullseye" + - image="fedora" tag="31" + - image="fedora" tag="latest" + - image="opensuse" tag="latest" + - image="ubuntu" tag="latest" + - image="ubuntu" tag="bionic" + - image="ubuntu" tag="xenial" + +cache: + - pip + +install: + - pip install --upgrade pip + - pip install tox + +script: + - function retry { counter=0 ; until "$@" ; do exit=$? ; counter=$(($counter + 1)) ; if [ $counter -ge 3 ] ; then return $exit ; fi ; done ; return 0; } ; retry tox --parallel all + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ + slack: + secure: "OmpxwNaBJqLyNSlkSO77DxH+hAndVfrb0cMgb2RYO68ziieK81r/cJpDGFJAWU+6/819G9PNmSgmREKJ8imuHDJx2PEJ9kCAwvUrGL2dmNjSiltQSdDCJDIWMLLDcsecC81C1FxMGnltMaDg2z/OhqwR+mA6z89RaiKeBLV3w/c9y75/Te4dtN2n1l6wQyIGmksjTYUmbZlwakyHEy3jls1tAc4rw9AoP1QBk/3opqMk2gGDsPRyoTsJSNWL6q0PILldcxdX9KHuFojPgmZnEgeBKrpABuLT6yjEcBvnKGt0jnkGRl52TjF0ARcYStKs5l0gvcGeQ3dwC26uQgEQL7RPVKmAwoWus57znOX6s3EN6mExVuf5+zbhDzcBeF07cbNYHGUcxpJdBDiEyb80icDBFOa0adgEcgykjiGbv7MiVK+05utSitgtfeeDxbyeXQGCh/vxFWBAWDNd4PE+NztPR05j4PpOLwheJalIRp/z21RiHRdbwldHptYC2NRGO59BI1o0pb6Ol9hYPXGfDpZ1KBdz76D0F6bfEvtvsdcXIAlarln9DE6o3VZSz910TdzmI0q6O5EDig6XOpfrdfW4JZp5RT2i51xOm/RDLnul84+n5rOG4LsVHI1MZp/IxFqsKv9FSgm22Ib44lPX+rkMScFX2uvjpy7UnC6uEcw=" + on_success: change + template: "%{result}: %{repository_slug}@%{branch}, build <%{build_url}|#%{build_number}> (<%{compare_url}|%{commit}>)" + email: false diff --git a/roles/robertdebock.users/.yamllint b/roles/robertdebock.users/.yamllint new file mode 100644 index 0000000..894450c --- /dev/null +++ b/roles/robertdebock.users/.yamllint @@ -0,0 +1,15 @@ +--- +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + line-length: disable + truthy: disable + +ignore: | + .tox/ diff --git a/roles/users/CODE_OF_CONDUCT.md b/roles/robertdebock.users/CODE_OF_CONDUCT.md similarity index 100% rename from roles/users/CODE_OF_CONDUCT.md rename to roles/robertdebock.users/CODE_OF_CONDUCT.md diff --git a/roles/robertdebock.users/CONTRIBUTING.md b/roles/robertdebock.users/CONTRIBUTING.md new file mode 100644 index 0000000..8fa77b4 --- /dev/null +++ b/roles/robertdebock.users/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# [Please contribute](#please-contribute) + +You can really make a difference by: + +- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) +- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. + +I'll try to help and take every contribution seriously. + +It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. + +## [Step by step](#step-by-step) + +Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. + +### [1. Make an issue.](#1-make-an-issue) + +When you spot an issue, [create an issue](https://github.com/robertdebock/ansible-role-users/issues). + +Making the issue help me and others to find similar problems in the future. + +### [2. Fork the project.](#2-fork-the-project) + +On the top right side of [the repository on GitHub](https://github.com/robertdebock/ansible-role-users), click `fork`. This copies everything to your GitHub namespace. + +### [3. Make the changes](#3-make-the-changes) + +In you own GitHub namespace, make the required changes. + +I typically do that by cloning the repository (in your namespace) locally: + +``` +git clone git@github.com:YOURNAMESPACE/ansible-role-users.git +``` + +Now you can start to edit on your laptop. + +### [4. Optionally: test your changes](#4-optionally-test-your-changes) + +Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): + +``` +pip install molecule tox ansible-lint docker +``` + +And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: + +``` +image=centos tag=7 molecule test +``` + +Once it start to work, you can test multiple version of Ansible: + +``` +image=centos tag=7 tox +``` + +### [5. Optionally: Regenerate all dynamic content](#5-optionally-regenerate-all-dynamic-content) + +You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. + +If you don't do it, I'll do it later for you. + +### [6. Make a pull request](#6-make-a-pull-request) + +[GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. + +In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. + +### [7. Wait](#7-wait) + +Now I'll get a message that you've added some code. Thank you, really. + +CI starts to test your changes. You can follow the progress on Travis. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.users/LICENSE b/roles/robertdebock.users/LICENSE new file mode 100644 index 0000000..bd15893 --- /dev/null +++ b/roles/robertdebock.users/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Robert de Bock (robert@meinit.nl) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/roles/robertdebock.users/README.md b/roles/robertdebock.users/README.md new file mode 100644 index 0000000..0ebabf7 --- /dev/null +++ b/roles/robertdebock.users/README.md @@ -0,0 +1,205 @@ +# [users](#users) + +The purpose of this role is to add users and groups on your system. + +|Travis|GitHub|Quality|Downloads|Version| +|------|------|-------|---------|-------| +|[![travis](https://travis-ci.com/robertdebock/ansible-role-users.svg?branch=master)](https://travis-ci.com/robertdebock/ansible-role-users)|[![github](https://github.com/robertdebock/ansible-role-users/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-users/actions)|[![quality](https://img.shields.io/ansible/quality/29201)](https://galaxy.ansible.com/robertdebock/users)|[![downloads](https://img.shields.io/ansible/role/d/29201)](https://galaxy.ansible.com/robertdebock/users)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-users.svg)](https://github.com/robertdebock/ansible-role-users/releases/)| + +## [Example Playbook](#example-playbook) + +This example is taken from `molecule/resources/converge.yml` and is tested on each push, pull request and release. +```yaml +--- +- name: Converge + hosts: all + become: yes + gather_facts: yes + + roles: + - role: robertdebock.users + users_group_list: + - name: robertdb + gid: 1024 + - name: users + - name: notgroup + state: absent + + users_user_list: + - name: root + cron_allow: yes + - name: robertdb + comment: Robert de Bock + uid: 1024 + group: robertdb + groups: users + cron_allow: yes + sudo_options: "ALL=(ALL) NOPASSWD: ALL" + authorized_keys: + - "ssh-rsa ABC123" + expires: -1 + password_validity_days: 9 + - name: notuser + state: absent + - name: keyuser + manage_ssh_key: yes + - name: privkeyuser + manage_ssh_key: yes + copy_private_key: yes + - name: multiplekeys + authorized_keys: + - "ssh-rsa ABC1234" + - "ssh-rsa ABC12345" + - name: passuser + password: "$6$mysecretsalt$qJbapG68nyRab3gxvKWPUcs2g3t0oMHSHMnSKecYNpSi3CuZm.GbBqXO8BE6EI6P1JUefhA0qvD7b5LSh./PU1" + update_password: on_create + - name: remotekey + authorized_keys: + - "https://raw.githubusercontent.com/shaanr/smdb/master/file.pub" +``` + +The machine may need to be prepared using `molecule/resources/prepare.yml`: +```yaml +--- +- name: Prepare + hosts: all + gather_facts: no + become: yes + + roles: + - role: robertdebock.bootstrap + - role: robertdebock.core_dependencies +``` + +For verification `molecule/resources/verify.yml` run after the role has been applied. +```yaml +--- +- name: Verify + hosts: all + become: yes + gather_facts: no + + tasks: + - name: record status of .ssh + stat: + path: /home/keyuser/.ssh + register: result + - name: check status of .ssh + assert: + that: + - result.stat.exists +``` + +Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles. + +## [Role Variables](#role-variables) + +These variables are set in `defaults/main.yml`: +```yaml +--- +# defaults file for users + +# The location to store ssh keys for user +users_ssh_key_directory: ssh_keys + +# The default shell if not overwritten. +users_shell: /bin/bash + +# manage cron permissions via /etc/cron.allow +users_cron_allow: yes +``` + +## [Requirements](#requirements) + +- Access to a repository containing packages, likely on the internet. +- A recent version of Ansible. (Tests run on the current, previous and next release of Ansible.) + +The following roles can be installed to ensure all requirements are met, using `ansible-galaxy install -r requirements.yml`: + +```yaml +--- +- robertdebock.bootstrap +- robertdebock.core_dependencies + +``` + +## [Context](#context) + +This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information. + +Here is an overview of related roles: +![dependencies](https://raw.githubusercontent.com/robertdebock/drawings/artifacts/users.png "Dependency") + +## [Compatibility](#compatibility) + +This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): + +|container|tags| +|---------|----| +|alpine|all| +|amazon|2018.03| +|el|7, 8| +|debian|buster, bullseye| +|fedora|31, 32| +|opensuse|all| +|ubuntu|focal, bionic, xenial| + +The minimum version of Ansible required is 2.8 but tests have been done to: + +- The previous version, on version lower. +- The current version. +- The development version. + + + +## [Testing](#testing) + +[Unit tests](https://travis-ci.com/robertdebock/ansible-role-users) are done on every commit, pull request, release and periodically. + +If you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-users/issues) + +Testing is done using [Tox](https://tox.readthedocs.io/en/latest/) and [Molecule](https://github.com/ansible/molecule): + +[Tox](https://tox.readthedocs.io/en/latest/) tests multiple ansible versions. +[Molecule](https://github.com/ansible/molecule) tests multiple distributions. + +To test using the defaults (any installed ansible version, namespace: `robertdebock`, image: `fedora`, tag: `latest`): + +``` +molecule test + +# Or select a specific image: +image=ubuntu molecule test +# Or select a specific image and a specific tag: +image="debian" tag="stable" tox +``` + +Or you can test multiple versions of Ansible, and select images: +Tox allows multiple versions of Ansible to be tested. To run the default (namespace: `robertdebock`, image: `fedora`, tag: `latest`) tests: + +``` +tox + +# To run CentOS (namespace: `robertdebock`, tag: `latest`) +image="centos" tox +# Or customize more: +image="debian" tag="stable" tox +``` + +## [License](#license) + +Apache-2.0 + +## [Contributors](#contributors) + +I'd like to thank everybody that made contributions to this repository. It motivates me, improves the code and is just fun to collaborate. + +- [aindenko](https://github.com/aindenko) +- [jkirk](https://github.com/jkirk) +- [icklers](https://github.com/icklers) + +## [Author Information](#author-information) + +[Robert de Bock](https://robertdebock.nl/) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/users/SECURITY.md b/roles/robertdebock.users/SECURITY.md similarity index 76% rename from roles/users/SECURITY.md rename to roles/robertdebock.users/SECURITY.md index 37b8c3c..03a835d 100644 --- a/roles/users/SECURITY.md +++ b/roles/robertdebock.users/SECURITY.md @@ -1,8 +1,8 @@ -# Security Policy +# [Security Policy](#security-policy) This software implements other software, it's not very likely that this software introduces new vulnerabilities. -## Supported Versions +## [Supported Versions](#supported-versions) The current major version is supported. For example if the current version is 3.4.1: @@ -14,10 +14,12 @@ The current major version is supported. For example if the current version is 3. | 2.0.0 | :x: | | 1.0.0 | :x: | -## Reporting a Vulnerability +## [Reporting a Vulnerability](#reporting-a-vulnarability) Please [open an issue](https://github.com/robertdebock/ansible-role-users/issues) describing the vulnerability. Tell them where to go, how often they can expect to get an update on a reported vulnerability, what to expect if the vulnerability is accepted or declined, etc. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.users/defaults/main.yml b/roles/robertdebock.users/defaults/main.yml new file mode 100644 index 0000000..dcf81ab --- /dev/null +++ b/roles/robertdebock.users/defaults/main.yml @@ -0,0 +1,11 @@ +--- +# defaults file for users + +# The location to store ssh keys for user +users_ssh_key_directory: ssh_keys + +# The default shell if not overwritten. +users_shell: /bin/bash + +# manage cron permissions via /etc/cron.allow +users_cron_allow: yes diff --git a/roles/robertdebock.users/meta/.galaxy_install_info b/roles/robertdebock.users/meta/.galaxy_install_info new file mode 100644 index 0000000..8669798 --- /dev/null +++ b/roles/robertdebock.users/meta/.galaxy_install_info @@ -0,0 +1,2 @@ +install_date: Mon Sep 28 09:37:14 2020 +version: 4.3.3 diff --git a/roles/users/meta/main.yml b/roles/robertdebock.users/meta/main.yml similarity index 85% rename from roles/users/meta/main.yml rename to roles/robertdebock.users/meta/main.yml index 640433b..2aa3103 100644 --- a/roles/users/meta/main.yml +++ b/roles/robertdebock.users/meta/main.yml @@ -8,32 +8,32 @@ galaxy_info: min_ansible_version: 2.8 platforms: - - name: Amazon - versions: - - all - name: Alpine versions: - all - - name: ArchLinux + - name: Amazon versions: - - all - - name: Debian - versions: - - all + - 2018.03 - name: EL versions: - 7 - 8 + - name: Debian + versions: + - buster + - bullseye - name: Fedora versions: - - all + - 31 + - 32 - name: OpenSUSE versions: - all - name: Ubuntu versions: - - artful + - focal - bionic + - xenial galaxy_tags: - users diff --git a/roles/robertdebock.users/meta/preferences.yml b/roles/robertdebock.users/meta/preferences.yml new file mode 100644 index 0000000..e7fdebf --- /dev/null +++ b/roles/robertdebock.users/meta/preferences.yml @@ -0,0 +1,2 @@ +--- +tox_parallel: yes diff --git a/roles/robertdebock.users/molecule/default/converge.yml b/roles/robertdebock.users/molecule/default/converge.yml new file mode 100644 index 0000000..af20f91 --- /dev/null +++ b/roles/robertdebock.users/molecule/default/converge.yml @@ -0,0 +1,46 @@ +--- +- name: Converge + hosts: all + become: yes + gather_facts: yes + + roles: + - role: ansible-role-users + users_group_list: + - name: robertdb + gid: 1024 + - name: users + - name: notgroup + state: absent + + users_user_list: + - name: root + cron_allow: yes + - name: robertdb + comment: Robert de Bock + uid: 1024 + group: robertdb + groups: users + cron_allow: yes + sudo_options: "ALL=(ALL) NOPASSWD: ALL" + authorized_keys: + - "ssh-rsa ABC123" + expires: -1 + password_validity_days: 9 + - name: notuser + state: absent + - name: keyuser + manage_ssh_key: yes + - name: privkeyuser + manage_ssh_key: yes + copy_private_key: yes + - name: multiplekeys + authorized_keys: + - "ssh-rsa ABC1234" + - "ssh-rsa ABC12345" + - name: passuser + password: "$6$mysecretsalt$qJbapG68nyRab3gxvKWPUcs2g3t0oMHSHMnSKecYNpSi3CuZm.GbBqXO8BE6EI6P1JUefhA0qvD7b5LSh./PU1" + update_password: on_create + - name: remotekey + authorized_keys: + - "https://raw.githubusercontent.com/shaanr/smdb/master/file.pub" diff --git a/roles/users/molecule/default/molecule.yml b/roles/robertdebock.users/molecule/default/molecule.yml similarity index 73% rename from roles/users/molecule/default/molecule.yml rename to roles/robertdebock.users/molecule/default/molecule.yml index f7cdcd5..361191f 100644 --- a/roles/users/molecule/default/molecule.yml +++ b/roles/robertdebock.users/molecule/default/molecule.yml @@ -6,8 +6,9 @@ dependency: name: galaxy options: role-file: requirements.yml -lint: - name: yamllint +lint: | + set -e + yamllint . driver: name: docker platforms: @@ -20,5 +21,9 @@ platforms: pre_build_image: yes provisioner: name: ansible -scenario: - name: default + config_options: + defaults: + stdout_callback: yaml + bin_ansible_callbacks: yes +verifier: + name: ansible diff --git a/roles/robertdebock.users/molecule/default/prepare.yml b/roles/robertdebock.users/molecule/default/prepare.yml new file mode 100644 index 0000000..193d278 --- /dev/null +++ b/roles/robertdebock.users/molecule/default/prepare.yml @@ -0,0 +1,9 @@ +--- +- name: Prepare + hosts: all + gather_facts: no + become: yes + + roles: + - role: robertdebock.bootstrap + - role: robertdebock.core_dependencies diff --git a/roles/users/molecule/default/ssh_keys/keyuser b/roles/robertdebock.users/molecule/default/ssh_keys/keyuser similarity index 100% rename from roles/users/molecule/default/ssh_keys/keyuser rename to roles/robertdebock.users/molecule/default/ssh_keys/keyuser diff --git a/roles/users/molecule/default/ssh_keys/keyuser.ppk b/roles/robertdebock.users/molecule/default/ssh_keys/keyuser.ppk similarity index 100% rename from roles/users/molecule/default/ssh_keys/keyuser.ppk rename to roles/robertdebock.users/molecule/default/ssh_keys/keyuser.ppk diff --git a/roles/users/molecule/default/ssh_keys/keyuser.pub b/roles/robertdebock.users/molecule/default/ssh_keys/keyuser.pub similarity index 100% rename from roles/users/molecule/default/ssh_keys/keyuser.pub rename to roles/robertdebock.users/molecule/default/ssh_keys/keyuser.pub diff --git a/roles/users/molecule/default/ssh_keys/privkeyuser b/roles/robertdebock.users/molecule/default/ssh_keys/privkeyuser similarity index 100% rename from roles/users/molecule/default/ssh_keys/privkeyuser rename to roles/robertdebock.users/molecule/default/ssh_keys/privkeyuser diff --git a/roles/users/molecule/default/ssh_keys/privkeyuser.ppk b/roles/robertdebock.users/molecule/default/ssh_keys/privkeyuser.ppk similarity index 100% rename from roles/users/molecule/default/ssh_keys/privkeyuser.ppk rename to roles/robertdebock.users/molecule/default/ssh_keys/privkeyuser.ppk diff --git a/roles/users/molecule/default/ssh_keys/privkeyuser.pub b/roles/robertdebock.users/molecule/default/ssh_keys/privkeyuser.pub similarity index 100% rename from roles/users/molecule/default/ssh_keys/privkeyuser.pub rename to roles/robertdebock.users/molecule/default/ssh_keys/privkeyuser.pub diff --git a/roles/robertdebock.users/molecule/default/verify.yml b/roles/robertdebock.users/molecule/default/verify.yml new file mode 100644 index 0000000..b9cd313 --- /dev/null +++ b/roles/robertdebock.users/molecule/default/verify.yml @@ -0,0 +1,15 @@ +--- +- name: Verify + hosts: all + become: yes + gather_facts: no + + tasks: + - name: record status of .ssh + stat: + path: /home/keyuser/.ssh + register: result + - name: check status of .ssh + assert: + that: + - result.stat.exists diff --git a/roles/users/requirements.yml b/roles/robertdebock.users/requirements.yml similarity index 100% rename from roles/users/requirements.yml rename to roles/robertdebock.users/requirements.yml diff --git a/roles/robertdebock.users/tasks/assert.yml b/roles/robertdebock.users/tasks/assert.yml new file mode 100644 index 0000000..45f67f8 --- /dev/null +++ b/roles/robertdebock.users/tasks/assert.yml @@ -0,0 +1,242 @@ +--- +- name: test if users_ssh_key_directory is set correctly + assert: + that: + - users_ssh_key_directory is defined + - users_ssh_key_directory | length > 0 + quiet: yes + +- name: test if users_shell is set correctly + assert: + that: + - users_shell is defined + - users_shell | length > 0 + quiet: yes + +- name: test if users_cron_allow is set correctly + assert: + that: + - users_cron_allow is defined + - users_cron_allow | type_debug == "bool" + quiet: yes + +- name: test if users_group_list is set correctly + assert: + that: + - users_group_list | length > 0 + - users_group_list is iterable + quiet: yes + when: + - users_group_list is defined + +- name: test if item.name in users_group_list is set correctly + assert: + that: + - item.name is defined + - item.name | length > 0 + quiet: yes + loop: "{{ users_group_list }}" + loop_control: + label: "{{ item.name }}" + when: + - users_group_list is defined + +- name: test if item.gid in users_group_list is set correctly + assert: + that: + - item.gid is defined + - item.gid | int + - item.gid | int > 0 + quiet: yes + loop: "{{ users_group_list }}" + loop_control: + label: "{{ item.name }}" + when: + - users_group_list is defined + - item.gid is defined + +- name: test if item.state in users_group_list is set correctly + assert: + that: + - item.state is defined + - item.state | length > 0 + - item.state in ["absent", "present"] + quiet: yes + loop: "{{ users_group_list }}" + loop_control: + label: "{{ item.name }}" + when: + - users_group_list is defined + - item.state is defined + +- name: test if users_user_list is set correctly + assert: + that: + - users_user_list | length > 0 + quiet: yes + loop: "{{ users_user_list }}" + loop_control: + label: "{{ item.name }}" + when: + - users_user_list is defined + +- name: test if item.name in users_user_list is set correctly + assert: + that: + - item.name is defined + - item.name | length > 0 + quiet: yes + loop: "{{ users_user_list }}" + loop_control: + label: "{{ item.name }}" + when: + - users_user_list is defined + +- name: test if item.cron_allow in users_user_list is set correctly + assert: + that: + - item.cron_allow | type_debug == "bool" + quiet: yes + loop: "{{ users_user_list }}" + loop_control: + label: "{{ item.name }}" + when: + - users_user_list is defined + - item.cron_allow is defined + +- name: test if item.comment in users_user_list is set correctly + assert: + that: + - item.comment | length > 0 + quiet: yes + loop: "{{ users_user_list }}" + loop_control: + label: "{{ item.name }}" + when: + - users_user_list is defined + - item.comment is defined + +- name: test if item.uid in users_user_list is set correctly + assert: + that: + - item.uid | int + - item.uid | int >= 0 + quiet: yes + loop: "{{ users_user_list }}" + loop_control: + label: "{{ item.name }}" + when: + - users_user_list is defined + - item.uid is defined + +- name: test if item.group in users_user_list is set correctly + assert: + that: + - item.group | length > 0 + quiet: yes + loop: "{{ users_user_list }}" + loop_control: + label: "{{ item.name }}" + when: + - users_user_list is defined + - item.group is defined + +- name: test if item.groups in users_user_list is set correctly + assert: + that: + - item.groups | length > 0 + quiet: yes + loop: "{{ users_user_list }}" + loop_control: + label: "{{ item.name }}" + when: + - users_user_list is defined + - item.groups is defined + +- name: test if item.sudo_options in users_user_list is set correctly + assert: + that: + - item.sudo_options | length > 0 + quiet: yes + loop: "{{ users_user_list }}" + loop_control: + label: "{{ item.name }}" + when: + - users_user_list is defined + - item.sudo_options is defined + +- name: test if item.authorized_keys in users_user_list is set correctly + assert: + that: + - item.authorized_keys | length > 0 + - item.authorized_keys is iterable + quiet: yes + loop: "{{ users_user_list }}" + loop_control: + label: "{{ item.name }}" + when: + - users_user_list is defined + - item.authorized_keys is defined + +- name: test if item.manage_ssh_key in users_user_list is set correctly + assert: + that: + - item.manage_ssh_key | type_debug == "bool" + quiet: yes + loop: "{{ users_user_list }}" + loop_control: + label: "{{ item.name }}" + when: + - users_user_list is defined + - item.manage_ssh_key is defined + +- name: test if item.password in users_user_list is set correctly + assert: + that: + - item.password | length > 0 + quiet: yes + loop: "{{ users_user_list }}" + loop_control: + label: "{{ item.name }}" + when: + - users_user_list is defined + - item.password is defined + +- name: test if item.update_password in users_user_list is set correctly + assert: + that: + - item.update_password | length > 0 + - item.update_password in ["always", "on_create"] + quiet: yes + loop: "{{ users_user_list }}" + loop_control: + label: "{{ item.name }}" + when: + - users_user_list is defined + - item.update_password is defined + +- name: test if item.exipres in users_user_list is set correctly + assert: + that: + - item.expires | int + - item.expires | int >= -1 + quiet: yes + loop: "{{ users_user_list }}" + loop_control: + label: "{{ item.name }}" + when: + - users_user_list is defined + - item.expires is defined + +- name: test if item.password_validity_days in users_user_list is set correctly + assert: + that: + - item.password_validity_days | int + - item.password_validity_days | int >= -1 + quiet: yes + loop: "{{ users_user_list }}" + loop_control: + label: "{{ item.name }}" + when: + - users_user_list is defined + - item.password_validity_days is defined diff --git a/roles/users/tasks/group.yml b/roles/robertdebock.users/tasks/group.yml similarity index 100% rename from roles/users/tasks/group.yml rename to roles/robertdebock.users/tasks/group.yml diff --git a/roles/users/tasks/main.yml b/roles/robertdebock.users/tasks/main.yml similarity index 67% rename from roles/users/tasks/main.yml rename to roles/robertdebock.users/tasks/main.yml index 1f67550..025db58 100644 --- a/roles/users/tasks/main.yml +++ b/roles/robertdebock.users/tasks/main.yml @@ -1,18 +1,16 @@ --- # tasks file for users -- name: create local ssh_key_directory - file: - path: "{{ users_ssh_key_directory }}" - state: directory - when: - - '"manage_ssh_key: yes" in users_user_list' - delegate_to: localhost - become: no +- name: include assert.yml + include_tasks: assert.yml + +- name: install required software + package: + name: "{{ users_requirements }}" + state: present - name: loop over users_group_list include: group.yml - with_items: - - "{{ users_group_list }}" + loop: "{{ users_group_list }}" loop_control: label: "{{ group.name }}" loop_var: group @@ -21,8 +19,7 @@ - name: loop over users_user_list include: user.yml - with_items: - - "{{ users_user_list }}" + loop: "{{ users_user_list }}" loop_control: label: "{{ user.name }}" loop_var: user @@ -33,6 +30,7 @@ template: src: cron.allow.j2 dest: /etc/cron.allow + mode: "0640" when: users_cron_allow|bool - name: check existence of /etc/cron.allow diff --git a/roles/users/tasks/user.yml b/roles/robertdebock.users/tasks/user.yml similarity index 70% rename from roles/users/tasks/user.yml rename to roles/robertdebock.users/tasks/user.yml index 1319d90..9e58187 100644 --- a/roles/users/tasks/user.yml +++ b/roles/robertdebock.users/tasks/user.yml @@ -1,5 +1,16 @@ --- # tasks file for users +- name: create local ssh_key_directory + file: + path: "{{ users_ssh_key_directory }}" + state: directory + mode: "0750" + when: + - user.manage_ssh_key is defined + - user.manage_ssh_key | bool + delegate_to: localhost + become: no + - name: manage users {{ user.name }} user: name: "{{ user.name }}" @@ -11,12 +22,14 @@ groups: "{{ user.groups | default(omit) }}" shell: "{{ user.shell | default(users_shell) }}" update_password: "{{ user.update_password | default(omit) }}" + expires: "{{ user.expires | default(omit) }}" register: users_manage_user - name: set sudo options for {{ user.name }} template: src: sudo.j2 dest: "/etc/sudoers.d/{{ user.name }}" + mode: "0640" when: - user.sudo_options is defined loop_control: @@ -55,18 +68,6 @@ delegate_to: localhost become: no -- name: read generated public ssh key for {{ user.name }} - command: cat "{{ users_ssh_key_directory }}/{{ user.name }}.pub" - when: - - user.manage_ssh_key is defined - - user.manage_ssh_key | bool - changed_when: no - register: ssh_public_key - delegate_to: localhost - become: no - loop_control: - label: "{{ user.name }}" - - name: convert ssh key to ppk for {{ user.name }} shell: > ssh-keygen -e -f "{{ users_ssh_key_directory }}/{{ user.name }}" @@ -82,61 +83,51 @@ - name: create .ssh directory for {{ user.name }} file: - path: "{{ user.home }}/.ssh" + path: "/home/{{ user.name }}/.ssh" state: directory - mode: "0700" + mode: "700" become: yes become_user: "{{ user.name }}" when: - - users_manage_user is defined - - user.home is defined + - user.manage_ssh_key is defined + - user.manage_ssh_key -- name: loop over authorized_key for {{ user.name }} +- name: loop over authorized_keys for {{ user.name }} include: user_authorized_key.yml - with_items: - - "{{ user.authorized_key }}" - loop_control: - label: "{{ user.name }}" - loop_var: authorized_key - when: - - user.authorized_key is defined - -- name: loop over authorized_keys for {{ user.name }} - include: user_authorized_key.yml - with_items: - - "{{ user.authorized_keys }}" + loop: "{{ user.authorized_keys }}" loop_control: label: "{{ user.name }}" loop_var: authorized_key when: - user.authorized_keys is defined -- name: place generated ssh_public_key for {{ user.name }} - authorized_key: - user: "{{ user.name }}" - state: present - key: "{{ item.stdout }}" - with_items: - - "{{ ssh_public_key }}" - when: - - ssh_public_key is defined - - user.manage_ssh_key is defined - - user.manage_ssh_key | bool - loop_control: - label: "{{ user.name }}" - - name: copy generated private ssh key for {{ user.name }} copy: - src: "{{ users_ssh_key_directory }}/{{ item.name }}" - dest: "{{ item.home }}/.ssh/id_rsa" - mode: "0400" - owner: "{{ item.name }}" - group: "{{ item.group }}" - with_items: - - "{{ users_manage_user }}" + src: "{{ users_ssh_key_directory }}/{{ user.name }}" + dest: "/home/{{ user.name }}/.ssh/id_rsa" + mode: "400" + owner: "{{ user.name }}" + group: "{{ user.group | default(omit) }}" + loop: "{{ lookup('dict', users_manage_user, wantlist=True) }}" when: - users_manage_user is defined - user.copy_private_key is defined - user.copy_private_key | bool loop_control: label: "{{ user.name }}" + +- name: check users password valid time + command: awk 'BEGIN { FS = ":" } $1 == "{{ user.name }}" { print $5 }' /etc/shadow + register: users_pw_valid + changed_when: no + check_mode: no + when: + - user.state is defined and user.state != "absent" or + user.state is not defined + +- name: set users password valid time + command: chage -M "{{ user.password_validity_days }}" "{{ user.name }}" + when: + - user.password_validity_days is defined + - users_pw_valid.stdout is defined + - users_pw_valid.stdout | int != user.password_validity_days | int diff --git a/roles/users/tasks/user_authorized_key.yml b/roles/robertdebock.users/tasks/user_authorized_key.yml similarity index 66% rename from roles/users/tasks/user_authorized_key.yml rename to roles/robertdebock.users/tasks/user_authorized_key.yml index 48aab3b..e746129 100644 --- a/roles/users/tasks/user_authorized_key.yml +++ b/roles/robertdebock.users/tasks/user_authorized_key.yml @@ -3,4 +3,5 @@ authorized_key: user: "{{ user.name }}" state: present - key: "{{ authorized_key }}" + key: "{{ item }}" + loop: "{{ user.authorized_keys }}" diff --git a/roles/service/templates/.gitkeep b/roles/robertdebock.users/templates/.gitkeep similarity index 100% rename from roles/service/templates/.gitkeep rename to roles/robertdebock.users/templates/.gitkeep diff --git a/roles/users/templates/cron.allow.j2 b/roles/robertdebock.users/templates/cron.allow.j2 similarity index 100% rename from roles/users/templates/cron.allow.j2 rename to roles/robertdebock.users/templates/cron.allow.j2 diff --git a/roles/users/templates/sudo.j2 b/roles/robertdebock.users/templates/sudo.j2 similarity index 100% rename from roles/users/templates/sudo.j2 rename to roles/robertdebock.users/templates/sudo.j2 diff --git a/roles/robertdebock.users/tox.ini b/roles/robertdebock.users/tox.ini new file mode 100644 index 0000000..c1bc1d4 --- /dev/null +++ b/roles/robertdebock.users/tox.ini @@ -0,0 +1,26 @@ +# +# Ansible managed +# +[tox] +minversion = 3.7 +# Disabled "next" because of: +# https://github.com/ansible-community/molecule/issues/2626. +# envlist = py{38}-ansible-{previous,current,next} +envlist = py{38}-ansible-{previous,current} +skipsdist = true + +[testenv] +deps = + previous: ansible>=2.8, <2.9 + current: ansible>=2.9 + next: git+https://github.com/ansible/ansible.git@devel + molecule[lint]>=3, <4 + docker>=4.2, <4.3 +commands = molecule test +setenv = + TOX_ENVNAME={envname} + MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} + PY_COLORS=1 + ANSIBLE_FORCE_COLOR=1 + +passenv = namespace image tag diff --git a/roles/users/vars/main.yml b/roles/robertdebock.users/vars/main.yml similarity index 58% rename from roles/users/vars/main.yml rename to roles/robertdebock.users/vars/main.yml index 5c07541..85127ff 100644 --- a/roles/users/vars/main.yml +++ b/roles/robertdebock.users/vars/main.yml @@ -1,4 +1,14 @@ --- # vars file for users + +_users_requirements: + default: [] + Amazon: + - shadow + Suse: + - shadow + +users_requirements: "{{ _users_requirements[ansible_os_family] | default(_users_requirements['default']) }}" + users_ssh_keygen_command: ssh-keygen -f {{ users_ssh_key_directory }}/{{ user.name }} -N "" -C "Generated by Ansible role robertdebock.users" users_ssh_keygen_pubkey_command: ssh-keygen -y -f {{ users_ssh_key_directory }}/{{ user.name }} diff --git a/roles/robertdebock.vagrant/.ansible-lint b/roles/robertdebock.vagrant/.ansible-lint new file mode 100644 index 0000000..eba57d1 --- /dev/null +++ b/roles/robertdebock.vagrant/.ansible-lint @@ -0,0 +1,8 @@ +# +# Ansible managed +# +exclude_paths: + - ./meta/exception.yml + - ./meta/preferences.yml + - ./molecule/default/verify.yml + - ./.tox diff --git a/roles/robertdebock.vagrant/.github/FUNDING.yml b/roles/robertdebock.vagrant/.github/FUNDING.yml new file mode 100644 index 0000000..67320f0 --- /dev/null +++ b/roles/robertdebock.vagrant/.github/FUNDING.yml @@ -0,0 +1,2 @@ +--- +github: robertdebock diff --git a/roles/robertdebock.vagrant/.github/ISSUE_TEMPLATE/bug_report.md b/roles/robertdebock.vagrant/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..f39b5dc --- /dev/null +++ b/roles/robertdebock.vagrant/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: Create a report to help me improve + +--- + +## Describe the bug +A clear and concise description of what the bug is. + +## Playbook + +Please paste the playbook you are using. (Consider `requirements.yml` and +optionally the command you've invoked.) + + +```yaml +--- +YOUR PLAYBOOK HERE +``` + +## Output + +Show at least the error, possible related output, maybe just all the output. + +## Environment + +- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) +- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) +- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.vagrant/.github/ISSUE_TEMPLATE/feature_request.md b/roles/robertdebock.vagrant/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..55a93c4 --- /dev/null +++ b/roles/robertdebock.vagrant/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +## Proposed feature + +A clear and concise description of what you want to happen. + +## Rationale + +Why is this feature required? + +## Additional context + +Add any other context about the feature request here. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/vagrant/PULL_REQUEST_TEMPLATE.md b/roles/robertdebock.vagrant/.github/pull_request_template.md similarity index 100% rename from roles/vagrant/PULL_REQUEST_TEMPLATE.md rename to roles/robertdebock.vagrant/.github/pull_request_template.md diff --git a/roles/vagrant/.github/settings.yml b/roles/robertdebock.vagrant/.github/settings.yml similarity index 81% rename from roles/vagrant/.github/settings.yml rename to roles/robertdebock.vagrant/.github/settings.yml index d250bb0..2e9c8e3 100644 --- a/roles/vagrant/.github/settings.yml +++ b/roles/robertdebock.vagrant/.github/settings.yml @@ -1,4 +1,7 @@ --- +# +# Ansible managed +# repository: description: Install vagrant on your system. homepage: https://robertdebock.nl/ diff --git a/roles/robertdebock.vagrant/.github/workflows/galaxy.yml b/roles/robertdebock.vagrant/.github/workflows/galaxy.yml new file mode 100644 index 0000000..73891df --- /dev/null +++ b/roles/robertdebock.vagrant/.github/workflows/galaxy.yml @@ -0,0 +1,22 @@ +--- +# +# Ansible managed +# + +name: Release to Ansible Galaxy + +on: + push: + tags: + - '*' + schedule: + - cron: '23 22 22 * *' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: galaxy + uses: robertdebock/galaxy-action@1.0.1 + with: + galaxy_api_key: ${{ secrets.galaxy_api_key }} diff --git a/roles/robertdebock.vagrant/.github/workflows/molecule.yml b/roles/robertdebock.vagrant/.github/workflows/molecule.yml new file mode 100644 index 0000000..391fad5 --- /dev/null +++ b/roles/robertdebock.vagrant/.github/workflows/molecule.yml @@ -0,0 +1,72 @@ +--- +# +# Ansible managed +# + +name: Ansible Molecule + +on: + push: + tags_ignore: + - '*' + pull_request: + schedule: + - cron: '23 22 22 * *' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: molecule + uses: robertdebock/molecule-action@2.6.1 + with: + command: lint + test: + needs: + - lint + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + config: + - image: "centos" + tag: "7" + - image: "centos" + tag: "latest" + - image: "debian" + tag: "latest" + - image: "debian" + tag: "bullseye" + - image: "fedora" + tag: "31" + - image: "fedora" + tag: "latest" + - image: "opensuse" + tag: "latest" + - image: "ubuntu" + tag: "latest" + - image: "ubuntu" + tag: "bionic" + - image: "ubuntu" + tag: "xenial" + steps: + - name: checkout + uses: actions/checkout@v2 + with: + path: "${{ github.repository }}" + - name: disable apparmor for mysql + run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + - name: parse apparmor for mysql + run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + - name: molecule + uses: robertdebock/molecule-action@2.6.1 + with: + image: ${{ matrix.config.image }} + tag: ${{ matrix.config.tag }} + options: "--parallel all" + env: + TOX_PARALLEL_NO_SPINNER: 1 diff --git a/roles/vagrant/.gitignore b/roles/robertdebock.vagrant/.gitignore similarity index 100% rename from roles/vagrant/.gitignore rename to roles/robertdebock.vagrant/.gitignore diff --git a/roles/robertdebock.vagrant/.travis.yml b/roles/robertdebock.vagrant/.travis.yml new file mode 100644 index 0000000..0a93975 --- /dev/null +++ b/roles/robertdebock.vagrant/.travis.yml @@ -0,0 +1,47 @@ +--- +# +# Ansible managed +# +language: python + +os: linux +dist: xenial + +python: + - "3.8" + +services: + - docker + +env: + global: + namespace="robertdebock" + jobs: + - image="centos" tag="7" + - image="centos" tag="latest" + - image="debian" tag="latest" + - image="debian" tag="bullseye" + - image="fedora" tag="31" + - image="fedora" tag="latest" + - image="opensuse" tag="latest" + - image="ubuntu" tag="latest" + - image="ubuntu" tag="bionic" + - image="ubuntu" tag="xenial" + +cache: + - pip + +install: + - pip install --upgrade pip + - pip install tox + +script: + - function retry { counter=0 ; until "$@" ; do exit=$? ; counter=$(($counter + 1)) ; if [ $counter -ge 3 ] ; then return $exit ; fi ; done ; return 0; } ; retry tox --parallel all + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ + slack: + secure: "CZQepN54bErWdWZHEhqKAo5IrJ7uO87Wy2oLylwR66VsxoqNWp8GCPuhFYu3lUMWsAGeh2qu/N+3JRzgWeZp/7DBNrVPi6LV/tsGekQYEe0Orx5r794qci2Ped79wXPMDmoqXzobzb78ZoagnnQU2UiRWuMKo7/ipFjaWU14eOVV1Sh31YLwXXJS9k23ZvPhG/s5jzMZtk07n5SRbuAnjsQs5cegmco0X7X2SXZYEVy8fTiq2mNisOq6J2FH94dSPAwS7T8ACnFCqSPoQ0MMT77i+RD4AHe4e1tQLj+dQ6lSkhcdLsevBbMrYmtopMwgZOERmUvtzkdWPVG2SlN1Tu33ybqRgDw04+pEmmPH/hdEYMgv7S8dh1ACFpw5+dLNz8YIAF0sLTxjyVUeUnrSwWc5Nm1TAVvnVeQnVpMYQQwhZfDefP1gx5XnwK4UkdKtcEEj80qSxiX3Of4cYV4NSRurj583r15ADsR9Wepb0VmBHk5h5+tpY2HibayW6DY3WpbG3luanE5+4R1MVDVdm0uIe+k8wKY11/NidqhYn1AIlYoPz2+hEOTMBI25lXVzdBq5RcDfYYM7/CQbsDHOP20dSN4giv6MBrip83o+TfadmGmg2NnJkeUZPghh6sWzIXDralqAEkbNzm4UiFsXu8WiSxbwqibKKbjAZZ0KZUQ=" + on_success: change + template: "%{result}: %{repository_slug}@%{branch}, build <%{build_url}|#%{build_number}> (<%{compare_url}|%{commit}>)" + email: false diff --git a/roles/robertdebock.vagrant/.yamllint b/roles/robertdebock.vagrant/.yamllint new file mode 100644 index 0000000..894450c --- /dev/null +++ b/roles/robertdebock.vagrant/.yamllint @@ -0,0 +1,15 @@ +--- +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + line-length: disable + truthy: disable + +ignore: | + .tox/ diff --git a/roles/vagrant/CODE_OF_CONDUCT.md b/roles/robertdebock.vagrant/CODE_OF_CONDUCT.md similarity index 100% rename from roles/vagrant/CODE_OF_CONDUCT.md rename to roles/robertdebock.vagrant/CODE_OF_CONDUCT.md diff --git a/roles/robertdebock.vagrant/CONTRIBUTING.md b/roles/robertdebock.vagrant/CONTRIBUTING.md new file mode 100644 index 0000000..24df189 --- /dev/null +++ b/roles/robertdebock.vagrant/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# [Please contribute](#please-contribute) + +You can really make a difference by: + +- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) +- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. + +I'll try to help and take every contribution seriously. + +It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. + +## [Step by step](#step-by-step) + +Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. + +### [1. Make an issue.](#1-make-an-issue) + +When you spot an issue, [create an issue](https://github.com/robertdebock/ansible-role-vagrant/issues). + +Making the issue help me and others to find similar problems in the future. + +### [2. Fork the project.](#2-fork-the-project) + +On the top right side of [the repository on GitHub](https://github.com/robertdebock/ansible-role-vagrant), click `fork`. This copies everything to your GitHub namespace. + +### [3. Make the changes](#3-make-the-changes) + +In you own GitHub namespace, make the required changes. + +I typically do that by cloning the repository (in your namespace) locally: + +``` +git clone git@github.com:YOURNAMESPACE/ansible-role-vagrant.git +``` + +Now you can start to edit on your laptop. + +### [4. Optionally: test your changes](#4-optionally-test-your-changes) + +Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): + +``` +pip install molecule tox ansible-lint docker +``` + +And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: + +``` +image=centos tag=7 molecule test +``` + +Once it start to work, you can test multiple version of Ansible: + +``` +image=centos tag=7 tox +``` + +### [5. Optionally: Regenerate all dynamic content](#5-optionally-regenerate-all-dynamic-content) + +You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. + +If you don't do it, I'll do it later for you. + +### [6. Make a pull request](#6-make-a-pull-request) + +[GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. + +In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. + +### [7. Wait](#7-wait) + +Now I'll get a message that you've added some code. Thank you, really. + +CI starts to test your changes. You can follow the progress on Travis. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/robertdebock.vagrant/LICENSE b/roles/robertdebock.vagrant/LICENSE new file mode 100644 index 0000000..bd15893 --- /dev/null +++ b/roles/robertdebock.vagrant/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Robert de Bock (robert@meinit.nl) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/roles/vagrant/README.md b/roles/robertdebock.vagrant/README.md similarity index 61% rename from roles/vagrant/README.md rename to roles/robertdebock.vagrant/README.md index 78b1a9d..9b67b85 100644 --- a/roles/vagrant/README.md +++ b/roles/robertdebock.vagrant/README.md @@ -1,15 +1,14 @@ -vagrant -========= - -Ansible logo - Build status +# [vagrant](#vagrant) Install vagrant on your system. -Example Playbook ----------------- +|Travis|GitHub|Quality|Downloads|Version| +|------|------|-------|---------|-------| +|[![travis](https://travis-ci.com/robertdebock/ansible-role-vagrant.svg?branch=master)](https://travis-ci.com/robertdebock/ansible-role-vagrant)|[![github](https://github.com/robertdebock/ansible-role-vagrant/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-vagrant/actions)|[![quality](https://img.shields.io/ansible/quality/36246)](https://galaxy.ansible.com/robertdebock/vagrant)|[![downloads](https://img.shields.io/ansible/role/d/36246)](https://galaxy.ansible.com/robertdebock/vagrant)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-vagrant.svg)](https://github.com/robertdebock/ansible-role-vagrant/releases/)| -This example is taken from `molecule/resources/playbook.yml` and is tested on each push, pull request and release. +## [Example Playbook](#example-playbook) + +This example is taken from `molecule/resources/converge.yml` and is tested on each push, pull request and release. ```yaml --- - name: Converge @@ -18,10 +17,10 @@ This example is taken from `molecule/resources/playbook.yml` and is tested on ea gather_facts: yes roles: - - robertdebock.vagrant + - role: robertdebock.vagrant ``` -The machine you are running this on, may need to be prepared, I use this playbook to ensure everything is in place to let the role work. +The machine may need to be prepared using `molecule/resources/prepare.yml`: ```yaml --- - name: Prepare @@ -37,11 +36,22 @@ The machine you are running this on, may need to be prepared, I use this playboo - role: robertdebock.python_pip ``` +For verification `molecule/resources/verify.yml` run after the role has been applied. +```yaml +--- +- name: Verify + hosts: all + become: yes + gather_facts: no + + tasks: + - name: try vagrant + command: vagrant --version +``` Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles. -Role Variables --------------- +## [Role Variables](#role-variables) These variables are set in `defaults/main.yml`: ```yaml @@ -49,14 +59,13 @@ These variables are set in `defaults/main.yml`: # defaults file for vagrant # The version of vagrant to install. See https://releases.hashicorp.com/vagrant/ . -vagrant_version: 2.2.3 +vagrant_version: 2.2.9 # The location to unpack the .tar.xz, if applicable. vagrant_unarchive_dest: /usr/local/bin ``` -Requirements ------------- +## [Requirements](#requirements) - Access to a repository containing packages, likely on the internet. - A recent version of Ansible. (Tests run on the current, previous and next release of Ansible.) @@ -66,48 +75,39 @@ The following roles can be installed to ensure all requirements are met, using ` ```yaml --- - robertdebock.bootstrap -- robertdebock.core_dependencies - robertdebock.buildtools +- robertdebock.core_dependencies - robertdebock.epel - robertdebock.python_pip ``` -Context -------- +## [Context](#context) This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information. Here is an overview of related roles: ![dependencies](https://raw.githubusercontent.com/robertdebock/drawings/artifacts/vagrant.png "Dependency") +## [Compatibility](#compatibility) -Compatibility -------------- +This role has been tested on these [container images](https://hub.docker.com/u/robertdebock): -This role has been tested on these [container images](https://hub.docker.com/): +|container|tags| +|---------|----| +|el|7, 8| +|debian|buster, bullseye| +|fedora|31, 32| +|opensuse|all| +|ubuntu|focal, bionic, xenial| -|container|tag|allow_failures| -|---------|---|--------------| -|alpine|latest|no| -|alpine|edge|yes| -|debian|unstable|yes| -|debian|latest|no| -|centos|7|no| -|centos|latest|no| -|fedora|latest|no| -|fedora|rawhide|yes| -|opensuse|latest|no| -|ubuntu|latest|no| +The minimum version of Ansible required is 2.8 but tests have been done to: -This role has been tested on these Ansible versions: +- The previous version, on version lower. +- The current version. +- The development version. -- ansible>=2.8, <2.9 -- ansible>=2.9 -- git+https://github.com/ansible/ansible.git@devel - -Exceptions ----------- +## [Exceptions](#exceptions) Some variarations of the build matrix do not work. These are the variations and reasons why the build won't work: @@ -116,10 +116,9 @@ Some variarations of the build matrix do not work. These are the variations and | alpine | Dependency not available: python_pip | -Testing -------- +## [Testing](#testing) -[Unit tests](https://travis-ci.org/robertdebock/ansible-role-vagrant) are done on every commit, pull request, release and periodically. +[Unit tests](https://travis-ci.com/robertdebock/ansible-role-vagrant) are done on every commit, pull request, release and periodically. If you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-vagrant/issues) @@ -151,28 +150,13 @@ image="centos" tox image="debian" tag="stable" tox ``` -Modules -------- - -This role uses the following modules: -```yaml ---- -- apt -- get_url -- package -- pip -- service -- unarchive -- zypper -``` - -License -------- +## [License](#license) Apache-2.0 -Author Information ------------------- +## [Author Information](#author-information) [Robert de Bock](https://robertdebock.nl/) + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/vagrant/SECURITY.md b/roles/robertdebock.vagrant/SECURITY.md similarity index 76% rename from roles/vagrant/SECURITY.md rename to roles/robertdebock.vagrant/SECURITY.md index 326a3a2..bdf2b60 100644 --- a/roles/vagrant/SECURITY.md +++ b/roles/robertdebock.vagrant/SECURITY.md @@ -1,8 +1,8 @@ -# Security Policy +# [Security Policy](#security-policy) This software implements other software, it's not very likely that this software introduces new vulnerabilities. -## Supported Versions +## [Supported Versions](#supported-versions) The current major version is supported. For example if the current version is 3.4.1: @@ -14,10 +14,12 @@ The current major version is supported. For example if the current version is 3. | 2.0.0 | :x: | | 1.0.0 | :x: | -## Reporting a Vulnerability +## [Reporting a Vulnerability](#reporting-a-vulnarability) Please [open an issue](https://github.com/robertdebock/ansible-role-vagrant/issues) describing the vulnerability. Tell them where to go, how often they can expect to get an update on a reported vulnerability, what to expect if the vulnerability is accepted or declined, etc. + +Please consider [sponsoring me](https://github.com/sponsors/robertdebock). diff --git a/roles/vagrant/defaults/main.yml b/roles/robertdebock.vagrant/defaults/main.yml similarity index 90% rename from roles/vagrant/defaults/main.yml rename to roles/robertdebock.vagrant/defaults/main.yml index 4e0555e..43a0472 100644 --- a/roles/vagrant/defaults/main.yml +++ b/roles/robertdebock.vagrant/defaults/main.yml @@ -2,7 +2,7 @@ # defaults file for vagrant # The version of vagrant to install. See https://releases.hashicorp.com/vagrant/ . -vagrant_version: 2.2.3 +vagrant_version: 2.2.9 # The location to unpack the .tar.xz, if applicable. vagrant_unarchive_dest: /usr/local/bin diff --git a/roles/robertdebock.vagrant/meta/.galaxy_install_info b/roles/robertdebock.vagrant/meta/.galaxy_install_info new file mode 100644 index 0000000..e8570e2 --- /dev/null +++ b/roles/robertdebock.vagrant/meta/.galaxy_install_info @@ -0,0 +1,2 @@ +install_date: Mon Sep 28 09:37:16 2020 +version: 3.2.0 diff --git a/roles/vagrant/meta/exception.yml b/roles/robertdebock.vagrant/meta/exception.yml similarity index 100% rename from roles/vagrant/meta/exception.yml rename to roles/robertdebock.vagrant/meta/exception.yml diff --git a/roles/vagrant/meta/main.yml b/roles/robertdebock.vagrant/meta/main.yml similarity index 73% rename from roles/vagrant/meta/main.yml rename to roles/robertdebock.vagrant/meta/main.yml index 01491b9..f1edc0e 100644 --- a/roles/vagrant/meta/main.yml +++ b/roles/robertdebock.vagrant/meta/main.yml @@ -8,34 +8,29 @@ galaxy_info: min_ansible_version: 2.8 platforms: - - name: Alpine - versions: - - all - - name: ArchLinux - versions: - - all - - name: Debian - versions: - - all - name: EL versions: - 7 - 8 + - name: Debian + versions: + - buster + - bullseye - name: Fedora versions: - - all + - 31 + - 32 - name: OpenSUSE versions: - all - name: Ubuntu versions: - - artful + - focal - bionic + - xenial galaxy_tags: - vagrant - - archlinux - centos - - rhel dependencies: [] diff --git a/roles/robertdebock.vagrant/meta/preferences.yml b/roles/robertdebock.vagrant/meta/preferences.yml new file mode 100644 index 0000000..e7fdebf --- /dev/null +++ b/roles/robertdebock.vagrant/meta/preferences.yml @@ -0,0 +1,2 @@ +--- +tox_parallel: yes diff --git a/roles/robertdebock.vagrant/molecule/default/converge.yml b/roles/robertdebock.vagrant/molecule/default/converge.yml new file mode 100644 index 0000000..1fd5d5d --- /dev/null +++ b/roles/robertdebock.vagrant/molecule/default/converge.yml @@ -0,0 +1,8 @@ +--- +- name: Converge + hosts: all + become: yes + gather_facts: yes + + roles: + - role: ansible-role-vagrant diff --git a/roles/vagrant/molecule.yml b/roles/robertdebock.vagrant/molecule/default/molecule.yml similarity index 69% rename from roles/vagrant/molecule.yml rename to roles/robertdebock.vagrant/molecule/default/molecule.yml index e13e499..9cc4588 100644 --- a/roles/vagrant/molecule.yml +++ b/roles/robertdebock.vagrant/molecule/default/molecule.yml @@ -1,10 +1,14 @@ --- +# +# Ansible managed +# dependency: name: galaxy options: role-file: requirements.yml -lint: - name: yamllint +lint: | + set -e + yamllint . driver: name: docker platforms: @@ -17,5 +21,9 @@ platforms: pre_build_image: yes provisioner: name: ansible -scenario: - name: default + config_options: + defaults: + stdout_callback: yaml + bin_ansible_callbacks: yes +verifier: + name: ansible diff --git a/roles/robertdebock.vagrant/molecule/default/prepare.yml b/roles/robertdebock.vagrant/molecule/default/prepare.yml new file mode 100644 index 0000000..0d6f180 --- /dev/null +++ b/roles/robertdebock.vagrant/molecule/default/prepare.yml @@ -0,0 +1,12 @@ +--- +- name: Prepare + hosts: all + gather_facts: no + become: yes + + roles: + - role: robertdebock.bootstrap + - role: robertdebock.core_dependencies + - role: robertdebock.buildtools + - role: robertdebock.epel + - role: robertdebock.python_pip diff --git a/roles/robertdebock.vagrant/molecule/default/verify.yml b/roles/robertdebock.vagrant/molecule/default/verify.yml new file mode 100644 index 0000000..e71561d --- /dev/null +++ b/roles/robertdebock.vagrant/molecule/default/verify.yml @@ -0,0 +1,9 @@ +--- +- name: Verify + hosts: all + become: yes + gather_facts: no + + tasks: + - name: try vagrant + command: vagrant --version diff --git a/roles/vagrant/requirements.yml b/roles/robertdebock.vagrant/requirements.yml similarity index 100% rename from roles/vagrant/requirements.yml rename to roles/robertdebock.vagrant/requirements.yml index ee11b6a..38b9b85 100644 --- a/roles/vagrant/requirements.yml +++ b/roles/robertdebock.vagrant/requirements.yml @@ -1,6 +1,6 @@ --- - robertdebock.bootstrap -- robertdebock.core_dependencies - robertdebock.buildtools +- robertdebock.core_dependencies - robertdebock.epel - robertdebock.python_pip diff --git a/roles/robertdebock.vagrant/tasks/assert.yml b/roles/robertdebock.vagrant/tasks/assert.yml new file mode 100644 index 0000000..6fbdc65 --- /dev/null +++ b/roles/robertdebock.vagrant/tasks/assert.yml @@ -0,0 +1,14 @@ +--- +- name: test if vagrant_version is set correctly + assert: + that: + - vagrant_version is defined + - vagrant_version | length > 0 + quiet: yes + +- name: test if vagrant_unarchive_dest is set correctly + assert: + that: + - vagrant_unarchive_dest is defined + - vagrant_unarchive_dest | length > 0 + quiet: yes diff --git a/roles/vagrant/tasks/main.yml b/roles/robertdebock.vagrant/tasks/main.yml similarity index 65% rename from roles/vagrant/tasks/main.yml rename to roles/robertdebock.vagrant/tasks/main.yml index f48df7c..4c625f2 100644 --- a/roles/vagrant/tasks/main.yml +++ b/roles/robertdebock.vagrant/tasks/main.yml @@ -1,20 +1,18 @@ --- # tasks file for vagrant +- name: include assert.yml + include_tasks: assert.yml + - name: download vagrant get_url: url: "{{ vagrant_package }}" dest: /tmp - register: vagrant_download_vagrant - until: vagrant_download_vagrant is succeeded - retries: 3 - name: install vagrant rpm using package package: name: "/tmp/{{ vagrant_package | basename }}" state: present - register: vagrant_install_vagrant_rpm_using_package - until: vagrant_install_vagrant_rpm_using_package is succeeded - retries: 3 + disable_gpg_check: yes when: - ansible_pkg_mgr == "yum" or ansible_pkg_mgr == "dnf" @@ -24,9 +22,6 @@ name: "/tmp/{{ vagrant_package | basename }}" state: present disable_gpg_check: yes - register: vagrant_install_vagrant_rpm_using_zypper - until: vagrant_install_vagrant_rpm_using_zypper is succeeded - retries: 3 when: - ansible_pkg_mgr == "zypper" @@ -34,9 +29,6 @@ apt: deb: "/tmp/{{ vagrant_package | basename }}" state: present - register: vagrant_install_vagrant_deb - until: vagrant_install_vagrant_deb is succeeded - retries: 3 when: - ansible_pkg_mgr == "apt" @@ -46,6 +38,7 @@ dest: "{{ vagrant_unarchive_dest }}" creates: "{{ vagrant_unarchive_dest }}/vagrant" remote_src: yes + mode: "0755" when: - ansible_pkg_mgr != "apt" - ansible_pkg_mgr != "yum" @@ -56,6 +49,3 @@ pip: name: "{{ vagrant_pip_packages }}" state: present - register: vagrant_install_pip_requirements - until: vagrant_install_pip_requirements is succeeded - retries: 3 diff --git a/roles/robertdebock.vagrant/tox.ini b/roles/robertdebock.vagrant/tox.ini new file mode 100644 index 0000000..c1bc1d4 --- /dev/null +++ b/roles/robertdebock.vagrant/tox.ini @@ -0,0 +1,26 @@ +# +# Ansible managed +# +[tox] +minversion = 3.7 +# Disabled "next" because of: +# https://github.com/ansible-community/molecule/issues/2626. +# envlist = py{38}-ansible-{previous,current,next} +envlist = py{38}-ansible-{previous,current} +skipsdist = true + +[testenv] +deps = + previous: ansible>=2.8, <2.9 + current: ansible>=2.9 + next: git+https://github.com/ansible/ansible.git@devel + molecule[lint]>=3, <4 + docker>=4.2, <4.3 +commands = molecule test +setenv = + TOX_ENVNAME={envname} + MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} + PY_COLORS=1 + ANSIBLE_FORCE_COLOR=1 + +passenv = namespace image tag diff --git a/roles/vagrant/vars/main.yml b/roles/robertdebock.vagrant/vars/main.yml similarity index 99% rename from roles/vagrant/vars/main.yml rename to roles/robertdebock.vagrant/vars/main.yml index 3eab161..bf24db5 100644 --- a/roles/vagrant/vars/main.yml +++ b/roles/robertdebock.vagrant/vars/main.yml @@ -1,5 +1,6 @@ --- # vars file for vagrant + vagrant_release_url: "https://releases.hashicorp.com/vagrant/{{ vagrant_version }}" _vagrant_package: diff --git a/roles/ruby/.ansible-lint b/roles/ruby/.ansible-lint deleted file mode 100644 index 788f1ce..0000000 --- a/roles/ruby/.ansible-lint +++ /dev/null @@ -1,3 +0,0 @@ -# -# Ansible managed -# diff --git a/roles/ruby/.github/ISSUE_TEMPLATE/bug_report.md b/roles/ruby/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index c695b98..0000000 --- a/roles/ruby/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**Playbook** -Please paste the playbook you are using. (Consider `requirements.yml` and -optionally the command you've invoked.) - - -```yaml -YOUR PLAYBOOK HERE -``` - -**Output** -Show at least the error, possible related output, maybe just all the output. - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Environment** -- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) -- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) -- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) diff --git a/roles/ruby/.github/ISSUE_TEMPLATE/feature_request.md b/roles/ruby/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 066b2d9..0000000 --- a/roles/ruby/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/roles/ruby/.travis.yml b/roles/ruby/.travis.yml deleted file mode 100644 index c22196e..0000000 --- a/roles/ruby/.travis.yml +++ /dev/null @@ -1,53 +0,0 @@ ---- -# -# Ansible managed -# -language: python - -python: - - "3.7" - -services: - - docker - -env: - global: - namespace="robertdebock" - matrix: - - image="amazonlinux" tag="1" - - image="amazonlinux" - - image="alpine" - - image="alpine" tag="edge" - # - namespace="archlinux" image="base" - - image="debian" tag="unstable" - - image="debian" - - image="centos" tag="7" - - image="redhat" tag="7" - - image="centos" - - image="redhat" - - image="fedora" - - image="fedora" tag="rawhide" - - image="opensuse" - - image="ubuntu" - -matrix: - allow_failures: - - env: image="alpine" tag="edge" - - env: image="debian" tag="unstable" - - env: image="fedora" tag="rawhide" - -cache: - - pip - -install: - - pip install --upgrade pip - - pip install tox - -script: - - tox --parallel all - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ - slack: - secure: "VFUXKZ3ZK4S858FeA1ynlaMi2HWx34weehc92wXsqsFnYL2NEdV0KObpAUknmsXTWhem862eP2Vk+vYj61Ut6wK3fS42g8z1xuZhlu9ITG0Sctp7DSH1wq1L331O0v3gzy31D5Wb/blPto0DIkdgjOyLFcM1Rt0HFLekEypv3Bwuqo8I1GXnYjRY9eY8Pkw8qFjRhm/gDjfOCeq8wIj9vBCw5TKFNC+EqU2Ugn5sKICuVclrKmvrWhyAjuJOOdhOQbBVoG1dljZdk2XE2gVzxgYsv0vA0Qc0uZCl/c2QSZKAaaxy8tQiyy44qmeLhlsBRPMRTbi1p7uJNn6ktmbgNl5CN2IhOMoYLnTc/4dZMKWYy6bZgGd7wSD+S3w02sSk1Z/RpAwpvqB7LrZMmPCjvQsytQXQvhWo6lI6CuHSEURTdSv68Po16hgwxsnKbo0mSY6GTZr/hRUh6omooYagV8UmjeDNTU02GoUZwzrCIsQfh/VGZ36xmpTpA47esuVLNZYiUOkGYYv6eB3o/OLZx85syaXF0QEdlgU8NCjiyTN0HCD6Yc+vj4JCmez5KVV9c9+mXsotWDu14MH18+GASb5a5MDYviKC2CmDCeaVL2UC0Z+mOAQ+QK+sqNFkOHdOSQ8UXPq5ti5LS1VYJxv2iQVqv1D20RRe1rOSPRFADBQ=" - email: false diff --git a/roles/ruby/.yamllint b/roles/ruby/.yamllint deleted file mode 100644 index ad0be76..0000000 --- a/roles/ruby/.yamllint +++ /dev/null @@ -1,11 +0,0 @@ -extends: default - -rules: - braces: - max-spaces-inside: 1 - level: error - brackets: - max-spaces-inside: 1 - level: error - line-length: disable - truthy: disable diff --git a/roles/ruby/CONTRIBUTING.md b/roles/ruby/CONTRIBUTING.md deleted file mode 100644 index 75b2f37..0000000 --- a/roles/ruby/CONTRIBUTING.md +++ /dev/null @@ -1,74 +0,0 @@ -# Please contribute - -You can really make a difference by: - -- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) -- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. - -I'll try to help and take every contribution seriously. - -It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. - -## Step by step - -Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. - -### 1. Make an issue. - -When you spot an issue, [create an issue](https://github.com/robertdebock/ruby/issues). - -Making the issue help me and others to find similar problems in the future. - -### 2. Fork the project. - -On the top right side of [the repository on GitHub](https://github.com/robertdebock/ruby), click `fork`. This copies everything to your GitHub namespace. - -### 3. Make the changes - -In you own GitHub namespace, make the required changes. - -I typically do that by cloning the repository (in your namespace) locally: - -``` -git clone git@github.com:YOURNAMESPACE/ruby.git -``` - -Now you can start to edit on your laptop. - -### 4. Optionally: test your changes - -Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): - -``` -pip install molecule tox -``` - -And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: - -``` -image=centos tag=7 molecule test -``` - -Once it start to work, you can test multiple version of Ansible: - -``` -image=centos tag=7 tox -``` - -### 6. Optionally: Regenerate all dynamic content - -You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. - -If you don't do it, I'll do it later for you. - -### 7. Make a pull request - -[GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. - -In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. - -### 8. Wait - -Now I'll get a message that you've added some code. Thank you, really. - -CI starts to test your changes. You can follow the progress on Travis. diff --git a/roles/ruby/LICENSE b/roles/ruby/LICENSE deleted file mode 100644 index 744118c..0000000 --- a/roles/ruby/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 Robert de Bock (robert@meinit.nl) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/roles/ruby/defaults/main.yml b/roles/ruby/defaults/main.yml deleted file mode 100644 index 9d9d7d7..0000000 --- a/roles/ruby/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# defaults file for ruby diff --git a/roles/ruby/meta/.galaxy_install_info b/roles/ruby/meta/.galaxy_install_info deleted file mode 100644 index 5fd5702..0000000 --- a/roles/ruby/meta/.galaxy_install_info +++ /dev/null @@ -1,2 +0,0 @@ -install_date: Mon Dec 16 06:45:43 2019 -version: 2.1.2 diff --git a/roles/ruby/molecule/default/playbook.yml b/roles/ruby/molecule/default/playbook.yml deleted file mode 100644 index 4fbbe31..0000000 --- a/roles/ruby/molecule/default/playbook.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: Converge - hosts: all - become: yes - gather_facts: yes - - roles: - - ansible-role-ruby diff --git a/roles/ruby/molecule/default/prepare.yml b/roles/ruby/molecule/default/prepare.yml deleted file mode 100644 index 4298ff8..0000000 --- a/roles/ruby/molecule/default/prepare.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: Prepare - hosts: all - become: yes - gather_facts: no - - roles: - - robertdebock.bootstrap diff --git a/roles/ruby/tox.ini b/roles/ruby/tox.ini deleted file mode 100644 index a902e16..0000000 --- a/roles/ruby/tox.ini +++ /dev/null @@ -1,22 +0,0 @@ -# -# Ansible managed -# -[tox] -minversion = 3.7 -envlist = py{37}-ansible-{previous,current,next} -skipsdist = true - -[testenv] -deps = - previous: ansible>=2.8, <2.9 - current: ansible>=2.9 - next: git+https://github.com/ansible/ansible.git@devel - docker - molecule -commands = - molecule test -setenv = - TOX_ENVNAME={envname} - MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} - -passenv = namespace image tag diff --git a/roles/service/.ansible-lint b/roles/service/.ansible-lint deleted file mode 100644 index 788f1ce..0000000 --- a/roles/service/.ansible-lint +++ /dev/null @@ -1,3 +0,0 @@ -# -# Ansible managed -# diff --git a/roles/service/.github/ISSUE_TEMPLATE/bug_report.md b/roles/service/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index c695b98..0000000 --- a/roles/service/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**Playbook** -Please paste the playbook you are using. (Consider `requirements.yml` and -optionally the command you've invoked.) - - -```yaml -YOUR PLAYBOOK HERE -``` - -**Output** -Show at least the error, possible related output, maybe just all the output. - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Environment** -- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) -- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) -- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) diff --git a/roles/service/.github/ISSUE_TEMPLATE/feature_request.md b/roles/service/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 066b2d9..0000000 --- a/roles/service/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/roles/service/.travis.yml b/roles/service/.travis.yml deleted file mode 100644 index 2b8226e..0000000 --- a/roles/service/.travis.yml +++ /dev/null @@ -1,53 +0,0 @@ ---- -# -# Ansible managed -# -language: python - -python: - - "3.7" - -services: - - docker - -env: - global: - namespace="robertdebock" - matrix: - - image="amazonlinux" tag="1" - - image="amazonlinux" - - image="alpine" - - image="alpine" tag="edge" - # - namespace="archlinux" image="base" - - image="debian" tag="unstable" - - image="debian" - - image="centos" tag="7" - - image="redhat" tag="7" - - image="centos" - - image="redhat" - - image="fedora" - - image="fedora" tag="rawhide" - - image="opensuse" - - image="ubuntu" - -matrix: - allow_failures: - - env: image="alpine" tag="edge" - - env: image="debian" tag="unstable" - - env: image="fedora" tag="rawhide" - -cache: - - pip - -install: - - pip install --upgrade pip - - pip install tox - -script: - - tox --parallel all - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ - slack: - secure: "qaGtGqE0v0I1bzGWPPW2lLOesDQQ4g4l0fW3I7iJMf3f1YASWi3QXN/0H6i3lcO3VGok+k2yGXlZyG6dwMUPkz0jCv8iFsbKCiNnewVBbMX2L/gGhinl5n6rzw/Udkg/k+/CKZ7k+Bem/JDSgmIGVAyxzdmkRK0RxuhCurFQnlEUSEDNFekIKybuTccja6zbsuyX/gWZjEDxRdODpBPAslTFJSK/V5BOz49RGpka3kOvwt8PmoJZVkZwVMLcRzvyQORN3aUylivtl5kjxehA8dMLPgZTGd9g4oagDRsk5y9yFmUeV3XVYTBEec0QvCzsJ54M5D133ButcXutFfzlsIr5bpcizD46eRS9L6dmRuB9Xi9l5tVPponlJPG1kVJTJA8TsbDHWC4Dn3M8tOPNxGovy0c2V6Y0O2T6fG4PxmuBPAecrnxZg+pmWoZcR5KuaqHFdGhef+gKuM2r6JrBwPyytt0zz74/o+kiWp7koiRh2S5DIR6d65LKOf9j688AGitJJWsDqgcvNYZcWUsghtOVLbGd4KGq1PscJsAQGUW5yXtrbyUhu3pSDr/EmWH9JA69J9J1JdcczgZfX9lW7uNUVLWo53on2I64snOxlkXi/lWje2DujqE6tVYGsrHFq9eVw1s8aaIwVs2t0GgdJQJqgDhnbNFjio9CbFcHKy8=" - email: false diff --git a/roles/service/.yamllint b/roles/service/.yamllint deleted file mode 100644 index ad0be76..0000000 --- a/roles/service/.yamllint +++ /dev/null @@ -1,11 +0,0 @@ -extends: default - -rules: - braces: - max-spaces-inside: 1 - level: error - brackets: - max-spaces-inside: 1 - level: error - line-length: disable - truthy: disable diff --git a/roles/service/CONTRIBUTING.md b/roles/service/CONTRIBUTING.md deleted file mode 100644 index 84134c7..0000000 --- a/roles/service/CONTRIBUTING.md +++ /dev/null @@ -1,74 +0,0 @@ -# Please contribute - -You can really make a difference by: - -- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) -- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. - -I'll try to help and take every contribution seriously. - -It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. - -## Step by step - -Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. - -### 1. Make an issue. - -When you spot an issue, [create an issue](https://github.com/robertdebock/service/issues). - -Making the issue help me and others to find similar problems in the future. - -### 2. Fork the project. - -On the top right side of [the repository on GitHub](https://github.com/robertdebock/service), click `fork`. This copies everything to your GitHub namespace. - -### 3. Make the changes - -In you own GitHub namespace, make the required changes. - -I typically do that by cloning the repository (in your namespace) locally: - -``` -git clone git@github.com:YOURNAMESPACE/service.git -``` - -Now you can start to edit on your laptop. - -### 4. Optionally: test your changes - -Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): - -``` -pip install molecule tox -``` - -And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: - -``` -image=centos tag=7 molecule test -``` - -Once it start to work, you can test multiple version of Ansible: - -``` -image=centos tag=7 tox -``` - -### 6. Optionally: Regenerate all dynamic content - -You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. - -If you don't do it, I'll do it later for you. - -### 7. Make a pull request - -[GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. - -In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. - -### 8. Wait - -Now I'll get a message that you've added some code. Thank you, really. - -CI starts to test your changes. You can follow the progress on Travis. diff --git a/roles/service/LICENSE b/roles/service/LICENSE deleted file mode 100644 index 744118c..0000000 --- a/roles/service/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 Robert de Bock (robert@meinit.nl) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/roles/service/meta/.galaxy_install_info b/roles/service/meta/.galaxy_install_info deleted file mode 100644 index b076268..0000000 --- a/roles/service/meta/.galaxy_install_info +++ /dev/null @@ -1,2 +0,0 @@ -install_date: Mon Dec 16 06:45:49 2019 -version: 2.2.8 diff --git a/roles/service/tox.ini b/roles/service/tox.ini deleted file mode 100644 index a902e16..0000000 --- a/roles/service/tox.ini +++ /dev/null @@ -1,22 +0,0 @@ -# -# Ansible managed -# -[tox] -minversion = 3.7 -envlist = py{37}-ansible-{previous,current,next} -skipsdist = true - -[testenv] -deps = - previous: ansible>=2.8, <2.9 - current: ansible>=2.9 - next: git+https://github.com/ansible/ansible.git@devel - docker - molecule -commands = - molecule test -setenv = - TOX_ENVNAME={envname} - MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} - -passenv = namespace image tag diff --git a/roles/travis/.github/ISSUE_TEMPLATE/bug_report.md b/roles/travis/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index c695b98..0000000 --- a/roles/travis/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**Playbook** -Please paste the playbook you are using. (Consider `requirements.yml` and -optionally the command you've invoked.) - - -```yaml -YOUR PLAYBOOK HERE -``` - -**Output** -Show at least the error, possible related output, maybe just all the output. - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Environment** -- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) -- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) -- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) diff --git a/roles/travis/.github/ISSUE_TEMPLATE/feature_request.md b/roles/travis/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 066b2d9..0000000 --- a/roles/travis/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/roles/travis/.travis.yml b/roles/travis/.travis.yml deleted file mode 100644 index 01efc7c..0000000 --- a/roles/travis/.travis.yml +++ /dev/null @@ -1,44 +0,0 @@ ---- -language: python - -python: - - "3.7" - -services: - - docker - -env: - global: - namespace="robertdebock" - matrix: - - image="amazonlinux" tag="1" - - image="amazonlinux" - - image="alpine" - - image="alpine" tag="edge" - # - namespace="archlinux" image="base" - - image="debian" tag="unstable" - - image="debian" - - image="centos" - - image="opensuse" - - image="ubuntu" - -matrix: - allow_failures: - - env: image="alpine" tag="edge" - - env: image="debian" tag="unstable" - -cache: - - pip - -install: - - pip install --upgrade pip - - pip install tox - -script: - - tox --parallel all - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ - slack: - secure: "cz++inNU0QUAIv7TDKUbjbaktTGufnHQERxjDtUSc7KhAiBdvfqzr8aFqYu+B3z1M24qrDXs1WZH0MGjMWQRfxO9NiU7my626bZWKecomzPCK3WRe90DvwVnz1Jk6ZTVTXq3195PuPrkm0Wsf23KgpHeTGBkznchOn7tZN91cPS7OQ+daL31TZrHkX+d+mu2CxDBLfsJvmVH9s7se0rJpzIARzAAHKbJhMVaUTJG61gyO47raXxP48PrUmJRFQ/QYTl54nga+RZCdRN/ig5jToU5VDWy5yYQBO4+StYDDuXSNCj+ypDBt7eqUDOCp1cx5LQkZFA34Dfz3vNSAs2lKoM3fQ3P2r6HTIZZjWAmhorLtcNGS1FIXzyTU5oHYBWKiUPWeOOvFrKtNHH74C+Y44lMwqZ/ocxNOtJTg7TFDHzOPOqu7G3x69nE0A0xbSUmMpcWnGKdSpd+rEfRpXzTZKNf/LFaUWryUrRXd4aJVbShVprobSAoZ7gGjhfSt/7J7Y5+860wrIOK5JRTlDyNLJ8nRz46aiZWBMmvJXS2cmRi2SzAGQPIu74U0Y+sZU/4zwJOhP4LK9HF/Fq5qdEh4mKwqr/bzLkIxApUpDgBBPvgl2H655jvox4xfUfVjMgE3wjhGDVy0sMZ7NaNA48IOiqfJTVG/pYUX5pR+OWAQO0=" - email: false diff --git a/roles/travis/.yamllint b/roles/travis/.yamllint deleted file mode 100644 index ad0be76..0000000 --- a/roles/travis/.yamllint +++ /dev/null @@ -1,11 +0,0 @@ -extends: default - -rules: - braces: - max-spaces-inside: 1 - level: error - brackets: - max-spaces-inside: 1 - level: error - line-length: disable - truthy: disable diff --git a/roles/travis/CONTRIBUTING.md b/roles/travis/CONTRIBUTING.md deleted file mode 100644 index 3209430..0000000 --- a/roles/travis/CONTRIBUTING.md +++ /dev/null @@ -1,10 +0,0 @@ -# Please contribute - -You can really make a difference by: - -- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) -- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. - -I'll try to help and take every contribution seriously. - -It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. diff --git a/roles/travis/LICENSE b/roles/travis/LICENSE deleted file mode 100644 index 744118c..0000000 --- a/roles/travis/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 Robert de Bock (robert@meinit.nl) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/roles/travis/defaults/main.yml b/roles/travis/defaults/main.yml deleted file mode 100644 index bf3be98..0000000 --- a/roles/travis/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# defaults file for travis diff --git a/roles/travis/meta/.galaxy_install_info b/roles/travis/meta/.galaxy_install_info deleted file mode 100644 index 226fe81..0000000 --- a/roles/travis/meta/.galaxy_install_info +++ /dev/null @@ -1,2 +0,0 @@ -install_date: Mon Dec 16 06:45:52 2019 -version: 2.1.2 diff --git a/roles/travis/molecule/default/molecule.yml b/roles/travis/molecule/default/molecule.yml deleted file mode 100644 index 496cae0..0000000 --- a/roles/travis/molecule/default/molecule.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -dependency: - name: galaxy - options: - role-file: requirements.yml -lint: - name: yamllint -driver: - name: docker -platforms: - - name: "travis-${image:-fedora}-${tag:-latest}${TOX_ENVNAME}" - image: "${namespace:-robertdebock}/${image:-fedora}:${tag:-latest}" - command: /sbin/init - volumes: - - /sys/fs/cgroup:/sys/fs/cgroup:ro - privileged: yes - pre_build_image: yes -provisioner: - name: ansible -scenario: - name: default diff --git a/roles/travis/molecule/default/playbook.yml b/roles/travis/molecule/default/playbook.yml deleted file mode 100644 index 0bf19eb..0000000 --- a/roles/travis/molecule/default/playbook.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: Converge - hosts: all - become: yes - gather_facts: yes - - roles: - - ansible-role-travis diff --git a/roles/travis/tox.ini b/roles/travis/tox.ini deleted file mode 100644 index f1cb9a1..0000000 --- a/roles/travis/tox.ini +++ /dev/null @@ -1,19 +0,0 @@ -[tox] -minversion = 3.7 -envlist = py{37}-ansible-{previous,current,next} -skipsdist = true - -[testenv] -deps = - previous: ansible>=2.8, <2.9 - current: ansible>=2.9 - next: git+https://github.com/ansible/ansible.git@devel - docker - molecule -commands = - molecule test -setenv = - TOX_ENVNAME={envname} - MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} - -passenv = namespace image tag diff --git a/roles/update/.ansible-lint b/roles/update/.ansible-lint deleted file mode 100644 index 5f770c6..0000000 --- a/roles/update/.ansible-lint +++ /dev/null @@ -1,5 +0,0 @@ -# -# Ansible managed -# -exclude_paths: - - ./meta/exception.yml diff --git a/roles/update/.github/ISSUE_TEMPLATE/bug_report.md b/roles/update/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index c695b98..0000000 --- a/roles/update/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**Playbook** -Please paste the playbook you are using. (Consider `requirements.yml` and -optionally the command you've invoked.) - - -```yaml -YOUR PLAYBOOK HERE -``` - -**Output** -Show at least the error, possible related output, maybe just all the output. - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Environment** -- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) -- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) -- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) diff --git a/roles/update/.github/ISSUE_TEMPLATE/feature_request.md b/roles/update/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 066b2d9..0000000 --- a/roles/update/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/roles/update/.travis.yml b/roles/update/.travis.yml deleted file mode 100644 index 76ac3b6..0000000 --- a/roles/update/.travis.yml +++ /dev/null @@ -1,53 +0,0 @@ ---- -# -# Ansible managed -# -language: python - -python: - - "3.7" - -services: - - docker - -env: - global: - namespace="robertdebock" - matrix: - - image="amazonlinux" tag="1" - - image="amazonlinux" - - image="alpine" - - image="alpine" tag="edge" - # - namespace="archlinux" image="base" - - image="debian" tag="unstable" - - image="debian" - - image="centos" tag="7" - - image="redhat" tag="7" - - image="centos" - - image="redhat" - - image="fedora" - - image="fedora" tag="rawhide" - - image="opensuse" - - image="ubuntu" - -matrix: - allow_failures: - - env: image="alpine" tag="edge" - - env: image="debian" tag="unstable" - - env: image="fedora" tag="rawhide" - -cache: - - pip - -install: - - pip install --upgrade pip - - pip install tox - -script: - - tox --parallel all - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ - slack: - secure: "AWHru2ap8OQdUHCYCKa7KxfIXZALrCtkLjiBGiyo7PEEe4PEaJ6Ys5HOEuZF5BEPTwSyhZgbi/zX3fPwJTYZU24sFcqq7IKY7DxyW0LrIv4+ekKR18YtrliIVirisQUHq12/gI0KmyPKN1llhktEFkB9e5xo2ujWwc/eVReYX2WFtzdfEe7qPSlJcc/GstK+Iz6F5hAiDxXAfDIrCzSZDNGM43x8fLapBP0W4sSBE+We/EEhi8ltKD+40SyGXZMyXEn9LZw3Yr2P2rQ25DdgYtqQoLjb86gj4D8Cwe8VyNI7/GHuPtbRFuEWLJm5izcbEgzECs0lNue/TgQT6AOCF9ctbyiMrNWNGXiQVTt0CPwjQDHEqQu/8KxcCFiLCA44HYYOoWFRLdv1/wyx541AfkmLgEEURqY0VFGP2WBHQI7gQf+ED/9RsZ3+75D6e4tBKgBa8QpLtSoQzlCH/1o/ORWWbRJAQ6n8yv7pjVT6vkrGufQ00z4e5U3eAgTnitEwWJ7VufgO6Cj+jqHDYd+cXiRP6TuHfP7PaaClozqTzZL5ZLLreA5M9yHkkCWkpRBWPXKmIDPtn2w9YUm6BFQdc7aqo6SCQoa7TEw9ZrhtmNGiblbBeFUQPo/nEa93SLklJCa/0ahPd2DR1r8XU9VtW6hL5sAei7UrgDfeWVZ41Ws=" - email: false diff --git a/roles/update/.yamllint b/roles/update/.yamllint deleted file mode 100644 index ad0be76..0000000 --- a/roles/update/.yamllint +++ /dev/null @@ -1,11 +0,0 @@ -extends: default - -rules: - braces: - max-spaces-inside: 1 - level: error - brackets: - max-spaces-inside: 1 - level: error - line-length: disable - truthy: disable diff --git a/roles/update/CONTRIBUTING.md b/roles/update/CONTRIBUTING.md deleted file mode 100644 index 503b463..0000000 --- a/roles/update/CONTRIBUTING.md +++ /dev/null @@ -1,74 +0,0 @@ -# Please contribute - -You can really make a difference by: - -- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) -- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. - -I'll try to help and take every contribution seriously. - -It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. - -## Step by step - -Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. - -### 1. Make an issue. - -When you spot an issue, [create an issue](https://github.com/robertdebock/update/issues). - -Making the issue help me and others to find similar problems in the future. - -### 2. Fork the project. - -On the top right side of [the repository on GitHub](https://github.com/robertdebock/update), click `fork`. This copies everything to your GitHub namespace. - -### 3. Make the changes - -In you own GitHub namespace, make the required changes. - -I typically do that by cloning the repository (in your namespace) locally: - -``` -git clone git@github.com:YOURNAMESPACE/update.git -``` - -Now you can start to edit on your laptop. - -### 4. Optionally: test your changes - -Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): - -``` -pip install molecule tox -``` - -And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: - -``` -image=centos tag=7 molecule test -``` - -Once it start to work, you can test multiple version of Ansible: - -``` -image=centos tag=7 tox -``` - -### 6. Optionally: Regenerate all dynamic content - -You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. - -If you don't do it, I'll do it later for you. - -### 7. Make a pull request - -[GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. - -In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. - -### 8. Wait - -Now I'll get a message that you've added some code. Thank you, really. - -CI starts to test your changes. You can follow the progress on Travis. diff --git a/roles/update/LICENSE b/roles/update/LICENSE deleted file mode 100644 index 744118c..0000000 --- a/roles/update/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 Robert de Bock (robert@meinit.nl) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/roles/update/meta/.galaxy_install_info b/roles/update/meta/.galaxy_install_info deleted file mode 100644 index 7e71854..0000000 --- a/roles/update/meta/.galaxy_install_info +++ /dev/null @@ -1,2 +0,0 @@ -install_date: Mon Dec 16 06:45:57 2019 -version: 2.1.1 diff --git a/roles/update/meta/exception.yml b/roles/update/meta/exception.yml deleted file mode 100644 index 6da44d3..0000000 --- a/roles/update/meta/exception.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -exceptions: - - variation: Archlinux & Ansible 2.7 - reason: New-style module did not handle its own exit diff --git a/roles/update/molecule/default/playbook.yml b/roles/update/molecule/default/playbook.yml deleted file mode 100644 index 8bfc88c..0000000 --- a/roles/update/molecule/default/playbook.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: Converge - hosts: all - become: yes - gather_facts: yes - - roles: - - ansible-role-update diff --git a/roles/update/molecule/default/prepare.yml b/roles/update/molecule/default/prepare.yml deleted file mode 100644 index 4298ff8..0000000 --- a/roles/update/molecule/default/prepare.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: Prepare - hosts: all - become: yes - gather_facts: no - - roles: - - robertdebock.bootstrap diff --git a/roles/update/tox.ini b/roles/update/tox.ini deleted file mode 100644 index a902e16..0000000 --- a/roles/update/tox.ini +++ /dev/null @@ -1,22 +0,0 @@ -# -# Ansible managed -# -[tox] -minversion = 3.7 -envlist = py{37}-ansible-{previous,current,next} -skipsdist = true - -[testenv] -deps = - previous: ansible>=2.8, <2.9 - current: ansible>=2.9 - next: git+https://github.com/ansible/ansible.git@devel - docker - molecule -commands = - molecule test -setenv = - TOX_ENVNAME={envname} - MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} - -passenv = namespace image tag diff --git a/roles/users/.ansible-lint b/roles/users/.ansible-lint deleted file mode 100644 index 788f1ce..0000000 --- a/roles/users/.ansible-lint +++ /dev/null @@ -1,3 +0,0 @@ -# -# Ansible managed -# diff --git a/roles/users/.github/ISSUE_TEMPLATE/bug_report.md b/roles/users/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index c695b98..0000000 --- a/roles/users/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**Playbook** -Please paste the playbook you are using. (Consider `requirements.yml` and -optionally the command you've invoked.) - - -```yaml -YOUR PLAYBOOK HERE -``` - -**Output** -Show at least the error, possible related output, maybe just all the output. - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Environment** -- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) -- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) -- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) diff --git a/roles/users/.github/ISSUE_TEMPLATE/feature_request.md b/roles/users/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 066b2d9..0000000 --- a/roles/users/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/roles/users/.travis.yml b/roles/users/.travis.yml deleted file mode 100644 index dcd63a9..0000000 --- a/roles/users/.travis.yml +++ /dev/null @@ -1,53 +0,0 @@ ---- -# -# Ansible managed -# -language: python - -python: - - "3.7" - -services: - - docker - -env: - global: - namespace="robertdebock" - matrix: - - image="amazonlinux" tag="1" - - image="amazonlinux" - - image="alpine" - - image="alpine" tag="edge" - # - namespace="archlinux" image="base" - - image="debian" tag="unstable" - - image="debian" - - image="centos" tag="7" - - image="redhat" tag="7" - - image="centos" - - image="redhat" - - image="fedora" - - image="fedora" tag="rawhide" - - image="opensuse" - - image="ubuntu" - -matrix: - allow_failures: - - env: image="alpine" tag="edge" - - env: image="debian" tag="unstable" - - env: image="fedora" tag="rawhide" - -cache: - - pip - -install: - - pip install --upgrade pip - - pip install tox - -script: - - tox --parallel all - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ - slack: - secure: "D+mNeObKmTP+19Y1thU13eDdS0VdsUWj1L+Fs8k9ZGM0MG1kKjoQN5lzhBnn5G4KTAtK7h6H6LkFcHlRMPC7zQVKThsOlCYcDa1HDRdUAwBzk+KwmU5FwsGm2u/iYg1/P7eF/EcdB8FruhREfeYJKU/yxrYu/JKw7wSe70iTK3Xxs1R54cV9Ofyrr7UCr5lmkYyjb4OQGxPbaXPiFECFARD14H+bfDtLmu6wQp4k3qtyDsBcIoGeRQWp9dKJOaLPSh+9JRqT5RPjzQGkcbRW8PyGistnvhnEGoaPemg91koLHkYTKX+29o1NC5KlQNXqLuzSDydwExKsZ6NZfabK8oYS00rF8EVA1JPTVKEjpxJWQ003uVZfzH8TuAWSl5ZC2lRVZDQQ/DRmq4lav67ASB1gdSdNdaCDSa9vfG+RES6WKYXgoTqOkUVnAUcNs8zr+41UFr5vdJcKr2PG1uKAkqurQaIRZxJUL26pUljoqmkRhTndJiphEf52OHeZpU2h4pS1q71TTzinOtFM6Cf6nqnDD6BlzF/XLpxMkZkpMChombOqFfZuSYfHkpJ+uqzduqZ0oMJnWjnb//T02zYonQquAZTBC9rJAP0onCa9PRKcnhncWcyOILG8v6eADCOPTz4A8rQEpCpp8gE4hFvs2PTS5xduUxaf4uth4phBEFA=" - email: false diff --git a/roles/users/.yamllint b/roles/users/.yamllint deleted file mode 100644 index ad0be76..0000000 --- a/roles/users/.yamllint +++ /dev/null @@ -1,11 +0,0 @@ -extends: default - -rules: - braces: - max-spaces-inside: 1 - level: error - brackets: - max-spaces-inside: 1 - level: error - line-length: disable - truthy: disable diff --git a/roles/users/CONTRIBUTING.md b/roles/users/CONTRIBUTING.md deleted file mode 100644 index 9fedcc7..0000000 --- a/roles/users/CONTRIBUTING.md +++ /dev/null @@ -1,74 +0,0 @@ -# Please contribute - -You can really make a difference by: - -- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) -- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. - -I'll try to help and take every contribution seriously. - -It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. - -## Step by step - -Here is how you can help, a lot of steps are related to GitHub, not specifically my roles. - -### 1. Make an issue. - -When you spot an issue, [create an issue](https://github.com/robertdebock/users/issues). - -Making the issue help me and others to find similar problems in the future. - -### 2. Fork the project. - -On the top right side of [the repository on GitHub](https://github.com/robertdebock/users), click `fork`. This copies everything to your GitHub namespace. - -### 3. Make the changes - -In you own GitHub namespace, make the required changes. - -I typically do that by cloning the repository (in your namespace) locally: - -``` -git clone git@github.com:YOURNAMESPACE/users.git -``` - -Now you can start to edit on your laptop. - -### 4. Optionally: test your changes - -Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/): - -``` -pip install molecule tox -``` - -And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`: - -``` -image=centos tag=7 molecule test -``` - -Once it start to work, you can test multiple version of Ansible: - -``` -image=centos tag=7 tox -``` - -### 6. Optionally: Regenerate all dynamic content - -You can use [Ansible Generator](https://github.com/robertdebock/ansible-generator) to regenerate all dynamic content. - -If you don't do it, I'll do it later for you. - -### 7. Make a pull request - -[GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) on pull requests. - -In the comment-box, you can [refer to the issue number](https://help.github.com/en/github/writing-on-github/autolinked-references-and-urls) by using #123, where 123 is the issue number. - -### 8. Wait - -Now I'll get a message that you've added some code. Thank you, really. - -CI starts to test your changes. You can follow the progress on Travis. diff --git a/roles/users/LICENSE b/roles/users/LICENSE deleted file mode 100644 index 744118c..0000000 --- a/roles/users/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 Robert de Bock (robert@meinit.nl) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/roles/users/README.md b/roles/users/README.md deleted file mode 100644 index 2855a8a..0000000 --- a/roles/users/README.md +++ /dev/null @@ -1,235 +0,0 @@ -users -========= - -Ansible logo - Build status - -The purpose of this role is to add users and groups on your system. - -Example Playbook ----------------- - -This example is taken from `molecule/resources/playbook.yml` and is tested on each push, pull request and release. -```yaml ---- -- name: Converge - hosts: all - become: yes - gather_facts: yes - - vars: - users_group_list: - - name: robertdb - gid: 1024 - - name: users - - name: notgroup - state: absent - - users_user_list: - - name: root - cron_allow: yes - - name: robertdb - comment: Robert de Bock - uid: 1024 - group: robertdb - groups: users - cron_allow: yes - sudo_options: "ALL=(ALL) NOPASSWD: ALL" - authorized_key: "ssh-rsa ABC123" - - name: notuser - state: absent - - name: keyuser - manage_ssh_key: yes - - name: privkeyuser - manage_ssh_key: yes - copy_private_key: yes - - name: multiplekeys - authorized_keys: - - "ssh-rsa ABC1234" - - "ssh-rsa ABC12345" - - name: mixedkeys - authorized_key: "ssh-rsa ABC123456" - authorized_keys: - - "ssh-rsa ABC1234567" - - "ssh-rsa ABC12345678" - - name: passuser - password: "$6$mysecretsalt$qJbapG68nyRab3gxvKWPUcs2g3t0oMHSHMnSKecYNpSi3CuZm.GbBqXO8BE6EI6P1JUefhA0qvD7b5LSh./PU1" - update_password: on_create - - roles: - - robertdebock.users -``` - -The machine you are running this on, may need to be prepared, I use this playbook to ensure everything is in place to let the role work. -```yaml ---- -- name: Prepare - hosts: all - gather_facts: no - become: yes - - roles: - - robertdebock.bootstrap - - robertdebock.core_dependencies -``` - - -Also see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles. - -Role Variables --------------- - -These variables are set in `defaults/main.yml`: -```yaml ---- -# defaults file for users - -# The location to store ssh keys for user -users_ssh_key_directory: ssh_keys - -# The default shell if not overwritten. -users_shell: /bin/bash - -# manage cron permissions via /etc/cron.allow -users_cron_allow: true - -# A list of groups and properties. -# users_group_list: -# - name: robertdb -# gid: 1024 -# - name: notgroup -# state: absent - -# A list of users and properties. -# users_user_list: -# - name: root -# cron_allow: yes -# - name: robertdb -# comment: Robert de Bock -# uid: 1024 -# group: robertdb -# groups: users,wheel -# cron_allow: yes -# sudo_options: "ALL=(ALL) NOPASSWD: ALL" -# authorized_key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCWswOogkZz/ihQA0lENCwDwSzmtmBWtFwzIzDlfa+eb4rBt6rZBg7enKeMqYtStI/NDneBwZUFBDIMu5zJTbvg7A60/WDhWXZmU21tZnm8K7KREFYOUndc6h//QHig6IIaIwwBZHF1NgXLtZ0qrUUlNU5JSEhDJsObMlPHtE4vFP8twPnfc7hxAnYma5+knU6qTMCDvhBE5tGJdor4UGeAhu+SwSVDloYtt1vGTmnFn8M/OD/fRMksusPefxyshJ37jpB4jY/Z9vzaNHwcj33prwl1b/xRfxr/+KRJsyq+ZKs9u2TVw9g4p+XLdfDtzZ8thR2P3x3MFrZOdFmCbo/5" -# authorized_keys: -# - "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCWswOogkZz/ihQA0lENCwDwSzmtmBWtFwzIzDlfa+eb4rBt6rZBg7enKeMqYtStI/NDneBwZUFBDIMu5zJTbvg7A60/WDhWXZmU21tZnm8K7KREFYOUndc6h//QHig6IIaIwwBZHF1NgXLtZ0qrUUlNU5JSEhDJsObMlPHtE4vFP8twPnfc7hxAnYma5+knU6qTMCDvhBE5tGJdor4UGeAhu+SwSVDloYtt1vGTmnFn8M/OD/fRMksusPefxyshJ37jpB4jY/Z9vzaNHwcj33prwl1b/xRfxr/+KRJsyq+ZKs9u2TVw9g4p+XLdfDtzZ8thR2P3x3MFrZOdFmCbo/5" -# copy_private_key: yes -# - name: notuser -# state: absent -# - name: keyuser -# manage_ssh_key: yes -# - name: specificshell -# shell: "/bin/ksh" -``` - -Requirements ------------- - -- Access to a repository containing packages, likely on the internet. -- A recent version of Ansible. (Tests run on the current, previous and next release of Ansible.) - -The following roles can be installed to ensure all requirements are met, using `ansible-galaxy install -r requirements.yml`: - -```yaml ---- -- robertdebock.bootstrap -- robertdebock.core_dependencies - -``` - -Context -------- - -This role is a part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information. - -Here is an overview of related roles: -![dependencies](https://raw.githubusercontent.com/robertdebock/drawings/artifacts/users.png "Dependency") - - -Compatibility -------------- - -This role has been tested on these [container images](https://hub.docker.com/): - -|container|tags| -|---------|----| -|amazon|all| -|alpine|all| -|archlinux|all| -|debian|all| -|el|7, 8| -|fedora|all| -|opensuse|all| -|ubuntu|artful, bionic| - -The minimum version of Ansible required is 2.8 but tests have been done to: - -- The previous version, on version lower. -- The current version. -- The development version. - - - -Testing -------- - -[Unit tests](https://travis-ci.org/robertdebock/ansible-role-users) are done on every commit, pull request, release and periodically. - -If you find issues, please register them in [GitHub](https://github.com/robertdebock/ansible-role-users/issues) - -Testing is done using [Tox](https://tox.readthedocs.io/en/latest/) and [Molecule](https://github.com/ansible/molecule): - -[Tox](https://tox.readthedocs.io/en/latest/) tests multiple ansible versions. -[Molecule](https://github.com/ansible/molecule) tests multiple distributions. - -To test using the defaults (any installed ansible version, namespace: `robertdebock`, image: `fedora`, tag: `latest`): - -``` -molecule test - -# Or select a specific image: -image=ubuntu molecule test -# Or select a specific image and a specific tag: -image="debian" tag="stable" tox -``` - -Or you can test multiple versions of Ansible, and select images: -Tox allows multiple versions of Ansible to be tested. To run the default (namespace: `robertdebock`, image: `fedora`, tag: `latest`) tests: - -``` -tox - -# To run CentOS (namespace: `robertdebock`, tag: `latest`) -image="centos" tox -# Or customize more: -image="debian" tag="stable" tox -``` - -Modules -------- - -This role uses the following modules: -```yaml ---- -- authorized_key -- command -- copy -- file -- group -- include -- shell -- template -- user -``` - -License -------- - -Apache-2.0 - - -Author Information ------------------- - -[Robert de Bock](https://robertdebock.nl/) diff --git a/roles/users/defaults/main.yml b/roles/users/defaults/main.yml deleted file mode 100644 index 7e984d0..0000000 --- a/roles/users/defaults/main.yml +++ /dev/null @@ -1,40 +0,0 @@ ---- -# defaults file for users - -# The location to store ssh keys for user -users_ssh_key_directory: ssh_keys - -# The default shell if not overwritten. -users_shell: /bin/bash - -# manage cron permissions via /etc/cron.allow -users_cron_allow: true - -# A list of groups and properties. -# users_group_list: -# - name: robertdb -# gid: 1024 -# - name: notgroup -# state: absent - -# A list of users and properties. -# users_user_list: -# - name: root -# cron_allow: yes -# - name: robertdb -# comment: Robert de Bock -# uid: 1024 -# group: robertdb -# groups: users,wheel -# cron_allow: yes -# sudo_options: "ALL=(ALL) NOPASSWD: ALL" -# authorized_key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCWswOogkZz/ihQA0lENCwDwSzmtmBWtFwzIzDlfa+eb4rBt6rZBg7enKeMqYtStI/NDneBwZUFBDIMu5zJTbvg7A60/WDhWXZmU21tZnm8K7KREFYOUndc6h//QHig6IIaIwwBZHF1NgXLtZ0qrUUlNU5JSEhDJsObMlPHtE4vFP8twPnfc7hxAnYma5+knU6qTMCDvhBE5tGJdor4UGeAhu+SwSVDloYtt1vGTmnFn8M/OD/fRMksusPefxyshJ37jpB4jY/Z9vzaNHwcj33prwl1b/xRfxr/+KRJsyq+ZKs9u2TVw9g4p+XLdfDtzZ8thR2P3x3MFrZOdFmCbo/5" -# authorized_keys: -# - "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCWswOogkZz/ihQA0lENCwDwSzmtmBWtFwzIzDlfa+eb4rBt6rZBg7enKeMqYtStI/NDneBwZUFBDIMu5zJTbvg7A60/WDhWXZmU21tZnm8K7KREFYOUndc6h//QHig6IIaIwwBZHF1NgXLtZ0qrUUlNU5JSEhDJsObMlPHtE4vFP8twPnfc7hxAnYma5+knU6qTMCDvhBE5tGJdor4UGeAhu+SwSVDloYtt1vGTmnFn8M/OD/fRMksusPefxyshJ37jpB4jY/Z9vzaNHwcj33prwl1b/xRfxr/+KRJsyq+ZKs9u2TVw9g4p+XLdfDtzZ8thR2P3x3MFrZOdFmCbo/5" -# copy_private_key: yes -# - name: notuser -# state: absent -# - name: keyuser -# manage_ssh_key: yes -# - name: specificshell -# shell: "/bin/ksh" diff --git a/roles/users/meta/.galaxy_install_info b/roles/users/meta/.galaxy_install_info deleted file mode 100644 index 27e6b79..0000000 --- a/roles/users/meta/.galaxy_install_info +++ /dev/null @@ -1,2 +0,0 @@ -install_date: Mon Dec 16 06:46:02 2019 -version: 3.2.2 diff --git a/roles/users/molecule/default/playbook.yml b/roles/users/molecule/default/playbook.yml deleted file mode 100644 index 589263b..0000000 --- a/roles/users/molecule/default/playbook.yml +++ /dev/null @@ -1,47 +0,0 @@ ---- -- name: Converge - hosts: all - become: yes - gather_facts: yes - - vars: - users_group_list: - - name: robertdb - gid: 1024 - - name: users - - name: notgroup - state: absent - - users_user_list: - - name: root - cron_allow: yes - - name: robertdb - comment: Robert de Bock - uid: 1024 - group: robertdb - groups: users - cron_allow: yes - sudo_options: "ALL=(ALL) NOPASSWD: ALL" - authorized_key: "ssh-rsa ABC123" - - name: notuser - state: absent - - name: keyuser - manage_ssh_key: yes - - name: privkeyuser - manage_ssh_key: yes - copy_private_key: yes - - name: multiplekeys - authorized_keys: - - "ssh-rsa ABC1234" - - "ssh-rsa ABC12345" - - name: mixedkeys - authorized_key: "ssh-rsa ABC123456" - authorized_keys: - - "ssh-rsa ABC1234567" - - "ssh-rsa ABC12345678" - - name: passuser - password: "$6$mysecretsalt$qJbapG68nyRab3gxvKWPUcs2g3t0oMHSHMnSKecYNpSi3CuZm.GbBqXO8BE6EI6P1JUefhA0qvD7b5LSh./PU1" - update_password: on_create - - roles: - - ansible-role-users diff --git a/roles/users/molecule/default/prepare.yml b/roles/users/molecule/default/prepare.yml deleted file mode 100644 index 6e172dc..0000000 --- a/roles/users/molecule/default/prepare.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -- name: Prepare - hosts: all - gather_facts: no - become: yes - - roles: - - robertdebock.bootstrap - - robertdebock.core_dependencies diff --git a/roles/users/templates/.gitkeep b/roles/users/templates/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/roles/users/tox.ini b/roles/users/tox.ini deleted file mode 100644 index a902e16..0000000 --- a/roles/users/tox.ini +++ /dev/null @@ -1,22 +0,0 @@ -# -# Ansible managed -# -[tox] -minversion = 3.7 -envlist = py{37}-ansible-{previous,current,next} -skipsdist = true - -[testenv] -deps = - previous: ansible>=2.8, <2.9 - current: ansible>=2.9 - next: git+https://github.com/ansible/ansible.git@devel - docker - molecule -commands = - molecule test -setenv = - TOX_ENVNAME={envname} - MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} - -passenv = namespace image tag diff --git a/roles/vagrant/.github/ISSUE_TEMPLATE/bug_report.md b/roles/vagrant/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index c695b98..0000000 --- a/roles/vagrant/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**Playbook** -Please paste the playbook you are using. (Consider `requirements.yml` and -optionally the command you've invoked.) - - -```yaml -YOUR PLAYBOOK HERE -``` - -**Output** -Show at least the error, possible related output, maybe just all the output. - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Environment** -- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`) -- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`) -- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`) diff --git a/roles/vagrant/.github/ISSUE_TEMPLATE/feature_request.md b/roles/vagrant/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 066b2d9..0000000 --- a/roles/vagrant/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/roles/vagrant/.travis.yml b/roles/vagrant/.travis.yml deleted file mode 100644 index 22c19e3..0000000 --- a/roles/vagrant/.travis.yml +++ /dev/null @@ -1,46 +0,0 @@ ---- -language: python - -python: - - "3.7" - -services: - - docker - -env: - global: - namespace="robertdebock" - matrix: - - image="alpine" - - image="alpine" tag="edge" - # - namespace="archlinux" image="base" - - image="debian" tag="unstable" - - image="debian" - - image="centos" tag="7" - - image="centos" - - image="fedora" - - image="fedora" tag="rawhide" - - image="opensuse" - - image="ubuntu" - -matrix: - allow_failures: - - env: image="alpine" tag="edge" - - env: image="debian" tag="unstable" - - env: image="fedora" tag="rawhide" - -cache: - - pip - -install: - - pip install --upgrade pip - - pip install tox - -script: - - tox --parallel all - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ - slack: - secure: "LmW+3578U7MAUOTYbf4ZcZclQWVlh6j9aKr7DbyHSG9OiVqfgb2U4aea3rLTRAw8EE/WgQRL61Pm8YJ/F0yCRcVlaeOEUNmOjkVTKrWGd3XXK079Ek+lPYFL3ozsnUv4tpP71wtkLzzCAkJABBW+Z9pUN+02IOQV2Lu9VXprxppWZEuNfNjfWhwUZwpfUok7WD93/59zoKNHU9wnI/xVNVFpBIsViGoSTx5TU9+mVPhXKKmDPL2EulJQn1QFiwAfcnWdQuECGCvuZa7d8z1JLFfcWksJ7mk2bHL/5WJt3lddT3l9sWXDZ1SP8RbYsoseT5/YwHGc6ubILGuOtzOV34MdAYIR9Y8X5FMbVbTlDfPQVbVyv6bvp6hq4G/WLFA0o591rM1P+wQ0BEGsHs06z2j/YJSveLblRQeKZeMURcG1d6tfknp4pvQFpG80Efbm3Ux0iE/ST03MYXbyktP+jhpkSeRG+KopgxNqgEeicpsIa6L4rctSDFuQqtZfVBQCmrGsEG9Iv727EMw7565n5uJJmwRz0PaCQkqhu+fUPPvpw+itBvGrvtUX8h9IjuDk7C3NiL20baJ6OMvbklHOF8b20DqE5BwHcoDESxA6aQat1yo/dwushXhAfP+vSfG22HSNXIDj2Tq0PRrtZqUTkWFJe8skt67XgxUyfKkcABE=" - email: false diff --git a/roles/vagrant/.yamllint b/roles/vagrant/.yamllint deleted file mode 100644 index ad0be76..0000000 --- a/roles/vagrant/.yamllint +++ /dev/null @@ -1,11 +0,0 @@ -extends: default - -rules: - braces: - max-spaces-inside: 1 - level: error - brackets: - max-spaces-inside: 1 - level: error - line-length: disable - truthy: disable diff --git a/roles/vagrant/CONTRIBUTING.md b/roles/vagrant/CONTRIBUTING.md deleted file mode 100644 index 3209430..0000000 --- a/roles/vagrant/CONTRIBUTING.md +++ /dev/null @@ -1,10 +0,0 @@ -# Please contribute - -You can really make a difference by: - -- [Making an issue](https://help.github.com/articles/creating-an-issue/). A well described issue helps a lot. (Have a look at the [known issues](https://github.com/search?q=user%3Arobertdebock+is%3Aissue+state%3Aopen).) -- [Making a pull request](https://services.github.com/on-demand/github-cli/open-pull-request-github) when you see the error in code. - -I'll try to help and take every contribution seriously. - -It's a great opportunity for me to learn how you use the role and also an opportunity to get into the habit of contributing to open source software. diff --git a/roles/vagrant/LICENSE b/roles/vagrant/LICENSE deleted file mode 100644 index 744118c..0000000 --- a/roles/vagrant/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2019 Robert de Bock (robert@meinit.nl) - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/roles/vagrant/handlers/main.yml b/roles/vagrant/handlers/main.yml deleted file mode 100644 index 62de044..0000000 --- a/roles/vagrant/handlers/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -# handlers file for vagrant -- name: restart vagrant - service: - name: "{{ vagrant_service }}" - state: restarted - when: - - ansible_virtualization_type != "docker" diff --git a/roles/vagrant/meta/.galaxy_install_info b/roles/vagrant/meta/.galaxy_install_info deleted file mode 100644 index 81b32bc..0000000 --- a/roles/vagrant/meta/.galaxy_install_info +++ /dev/null @@ -1,2 +0,0 @@ -install_date: Mon Dec 16 06:46:06 2019 -version: 2.1.1 diff --git a/roles/vagrant/molecule/default/molecule.yml b/roles/vagrant/molecule/default/molecule.yml deleted file mode 100644 index e13e499..0000000 --- a/roles/vagrant/molecule/default/molecule.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -dependency: - name: galaxy - options: - role-file: requirements.yml -lint: - name: yamllint -driver: - name: docker -platforms: - - name: "vagrant-${image:-fedora}-${tag:-latest}${TOX_ENVNAME}" - image: "${namespace:-robertdebock}/${image:-fedora}:${tag:-latest}" - command: /sbin/init - volumes: - - /sys/fs/cgroup:/sys/fs/cgroup:ro - privileged: yes - pre_build_image: yes -provisioner: - name: ansible -scenario: - name: default diff --git a/roles/vagrant/molecule/default/playbook.yml b/roles/vagrant/molecule/default/playbook.yml deleted file mode 100644 index c2c3532..0000000 --- a/roles/vagrant/molecule/default/playbook.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: Converge - hosts: all - become: yes - gather_facts: yes - - roles: - - ansible-role-vagrant diff --git a/roles/vagrant/tox.ini b/roles/vagrant/tox.ini deleted file mode 100644 index f1cb9a1..0000000 --- a/roles/vagrant/tox.ini +++ /dev/null @@ -1,19 +0,0 @@ -[tox] -minversion = 3.7 -envlist = py{37}-ansible-{previous,current,next} -skipsdist = true - -[testenv] -deps = - previous: ansible>=2.8, <2.9 - current: ansible>=2.9 - next: git+https://github.com/ansible/ansible.git@devel - docker - molecule -commands = - molecule test -setenv = - TOX_ENVNAME={envname} - MOLECULE_EPHEMERAL_DIRECTORY=/tmp/.molecule/{env:image:fedora}-{env:tag:latest}/{envname} - -passenv = namespace image tag