New stuff.

This commit is contained in:
Robert de Bock 2021-03-21 08:00:28 +01:00
parent ea83f6a426
commit 4f792f71eb
619 changed files with 2506 additions and 5001 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
id_rsa
roles/*
!roles/requirements.yml
files/ssh_keys
.vagrant

View File

@ -385,3 +385,139 @@ git_repositories:
dest: ansible-role-zabbix_server
- repo: ssh://git@github.com/robertdebock/ansible-role-zabbix_web.git
dest: ansible-role-zabbix_web
- repo: ssh://git@github.com/robertdebock/ansible-collection-roles.git
dest: ansible-collection-roles
- repo: ssh://git@github.com/robertdebock/ansible-collection-rundeck.git
dest: ansible-collection-rundeck
- repo: ssh://git@github.com/robertdebock/ansible-generator.git
dest: ansible-generator
- repo: ssh://git@github.com/robertdebock/ansible-integration.git
dest: ansible-integration
- repo: ssh://git@github.com/robertdebock/ansible-playbook-bios_update.git
dest: ansible-playbook-bios_update
- repo: ssh://git@github.com/robertdebock/ansible-playbook-cloudtop.git
dest: ansible-playbook-cloudtop
- repo: ssh://git@github.com/robertdebock/ansible-playbook-gitlab_runner.git
dest: ansible-playbook-gitlab_runner
- repo: ssh://git@github.com/robertdebock/ansible-playbook-haproxy.git
dest: ansible-playbook-haproxy
- repo: ssh://git@github.com/robertdebock/ansible-playbook-jitsi.git
dest: ansible-playbook-jitsi
- repo: ssh://git@github.com/robertdebock/ansible-playbook-keepalived.git
dest: ansible-playbook-keepalived
- repo: ssh://git@github.com/robertdebock/ansible-playbook-libvirt.git
dest: ansible-playbook-libvirt
- repo: ssh://git@github.com/robertdebock/ansible-playbook-mylucie.git
dest: ansible-playbook-mylucie
- repo: ssh://git@github.com/robertdebock/ansible-playbook-nextcloud.git
dest: ansible-playbook-nextcloud
- repo: ssh://git@github.com/robertdebock/ansible-playbook-nomad.git
dest: ansible-playbook-nomad
- repo: ssh://git@github.com/robertdebock/ansible-playbook-rancher.git
dest: ansible-playbook-rancher
- repo: ssh://git@github.com/robertdebock/ansible-playbook-saltstack.git
dest: ansible-playbook-saltstack
- repo: ssh://git@github.com/robertdebock/ansible-playbook-terraform.git
dest: ansible-playbook-terraform
- repo: ssh://git@github.com/robertdebock/ansible-playbook-tester.git
dest: ansible-playbook-tester
- repo: ssh://git@github.com/robertdebock/ansible-playbook-vault.git
dest: ansible-playbook-vault
- repo: ssh://git@github.com/robertdebock/ansible-playbook-zabbix.git
dest: ansible-playbook-zabbix
- repo: ssh://git@github.com/robertdebock/ansible-probe.git
dest: ansible-probe
- repo: ssh://git@github.com/robertdebock/docker-amazonlinux-systemd.git
dest: docker-amazonlinux-systemd
- repo: ssh://git@github.com/robertdebock/docker-archlinux-systemd.git
dest: docker-archlinux-systemd
- repo: ssh://git@github.com/robertdebock/docker-centos-openssh.git
dest: docker-centos-openssh
- repo: ssh://git@github.com/robertdebock/docker-centos-systemd.git
dest: docker-centos-systemd
- repo: ssh://git@github.com/robertdebock/docker-cntlm.git
dest: docker-cntlm
- repo: ssh://git@github.com/robertdebock/docker-debian-systemd.git
dest: docker-debian-systemd
- repo: ssh://git@github.com/robertdebock/docker-fedora-systemd.git
dest: docker-fedora-systemd
- repo: ssh://git@github.com/robertdebock/docker-github-action-galaxy.git
dest: docker-github-action-galaxy
- repo: ssh://git@github.com/robertdebock/docker-github-action-graphviz.git
dest: docker-github-action-graphviz
- repo: ssh://git@github.com/robertdebock/docker-github-action-molecule.git
dest: docker-github-action-molecule
- repo: ssh://git@github.com/robertdebock/docker-github-action-rpmbuild.git
dest: docker-github-action-rpmbuild
- repo: ssh://git@github.com/robertdebock/docker-opensuse-systemd.git
dest: docker-opensuse-systemd
- repo: ssh://git@github.com/robertdebock/docker-oraclelinux-systemd.git
dest: docker-oraclelinux-systemd
- repo: ssh://git@github.com/robertdebock/docker-redhat-systemd.git
dest: docker-redhat-systemd
- repo: ssh://git@github.com/robertdebock/docker-revealmd.git
dest: docker-revealmd
- repo: ssh://git@github.com/robertdebock/docker-ubuntu-systemd.git
dest: docker-ubuntu-systemd
- repo: ssh://git@github.com/robertdebock/galaxy-action.git
dest: galaxy-action
- repo: ssh://git@github.com/robertdebock/graphviz-action.git
dest: graphviz-action
- repo: ssh://git@github.com/robertdebock/katacoda-scenarios.git
dest: katacoda-scenarios
- repo: ssh://git@github.com/robertdebock/learn-terraform.git
dest: learn-terraform
- repo: ssh://git@github.com/robertdebock/learn-terraform-azure.git
dest: learn-terraform-azure
- repo: ssh://git@github.com/robertdebock/mirror.git
dest: mirror
- repo: ssh://git@github.com/robertdebock/molecule-action.git
dest: molecule-action
- repo: ssh://git@github.com/robertdebock/move_to_collections.git
dest: move_to_collections
- repo: ssh://git@github.com/robertdebock/packer-centos.git
dest: packer-centos
- repo: ssh://git@github.com/robertdebock/packer-fedora.git
dest: packer-fedora
- repo: ssh://git@github.com/robertdebock/packer-opensuse.git
dest: packer-opensuse
- repo: ssh://git@github.com/robertdebock/pre-commit.git
dest: pre-commit
- repo: ssh://git@github.com/robertdebock/presentations.git
dest: presentations
- repo: ssh://git@github.com/robertdebock/rpmbuild-action.git
dest: rpmbuild-action
- repo: ssh://git@github.com/robertdebock/ansible-role-skeleton.git
dest: skeleton
- repo: ssh://git@github.com/robertdebock/terraform-action.git
dest: terraform-action
- repo: ssh://git@github.com/robertdebock/terraform-aws-vpc-bootstrap.git
dest: terraform-aws-vpc-bootstrap
- repo: ssh://git@github.com/robertdebock/terraform-azurerm-azurerm_network_interface.git
dest: terraform-azurerm-azurerm_network_interface
- repo: ssh://git@github.com/robertdebock/terraform-azurerm-azurerm_network_security_group.git
dest: terraform-azurerm-azurerm_network_security_group
- repo: ssh://git@github.com/robertdebock/terraform-azurerm-azurerm_network_security_rule.git
dest: terraform-azurerm-azurerm_network_security_rule
- repo: ssh://git@github.com/robertdebock/terraform-azurerm-azurerm_public_ip.git
dest: terraform-azurerm-azurerm_public_ip
- repo: ssh://git@github.com/robertdebock/terraform-azurerm-azurerm_resource_group.git
dest: terraform-azurerm-azurerm_resource_group
- repo: ssh://git@github.com/robertdebock/terraform-azurerm-azurerm_subnet.git
dest: terraform-azurerm-azurerm_subnet
- repo: ssh://git@github.com/robertdebock/terraform-azurerm-azurerm_virtual_network.git
dest: terraform-azurerm-azurerm_virtual_network
- repo: ssh://git@github.com/robertdebock/terraform-cloudflare-record.git
dest: terraform-cloudflare-record
- repo: ssh://git@github.com/robertdebock/terraform-demo.git
dest: terraform-demo
- repo: ssh://git@github.com/robertdebock/terraform-digitalocean-droplet.git
dest: terraform-digitalocean-droplet
- repo: ssh://git@github.com/robertdebock/terraform-digitalocean-ssh_key.git
dest: terraform-digitalocean-ssh_key
- repo: ssh://git@github.com/robertdebock/terraform-digitalocean-vpc.git
dest: terraform-digitalocean-vpc
- repo: ssh://git@github.com/robertdebock/terraform-use-case-azure-loadbalanced-service.git
dest: terraform-use-case-azure-loadbalanced-service
- repo: ssh://git@github.com/robertdebock/terragrunt-demo.git
dest: terragrunt-demo

68
lijst.txt Normal file
View File

@ -0,0 +1,68 @@
ansible-collection-roles
ansible-collection-rundeck
ansible-generator
ansible-integration
ansible-playbook-bios_update
ansible-playbook-cloudtop
ansible-playbook-gitlab_runner
ansible-playbook-haproxy
ansible-playbook-jitsi
ansible-playbook-keepalived
ansible-playbook-libvirt
ansible-playbook-mylucie
ansible-playbook-nextcloud
ansible-playbook-nomad
ansible-playbook-rancher
ansible-playbook-saltstack
ansible-playbook-terraform
ansible-playbook-tester
ansible-playbook-vault
ansible-playbook-zabbix
ansible-probe
docker-amazonlinux-systemd
docker-archlinux-systemd
docker-centos-openssh
docker-centos-systemd
docker-cntlm
docker-debian-systemd
docker-fedora-systemd
docker-github-action-galaxy
docker-github-action-graphviz
docker-github-action-molecule
docker-github-action-rpmbuild
docker-opensuse-systemd
docker-oraclelinux-systemd
docker-redhat-systemd
docker-revealmd
docker-ubuntu-systemd
galaxy-action
graphviz-action
katacoda-scenarios
learn-terraform
learn-terraform-azure
mirror
molecule-action
move_to_collections
packer-centos
packer-fedora
packer-opensuse
pre-commit
presentations
rpmbuild-action
ansible-role-skeleton
terraform-action
terraform-aws-vpc-bootstrap
terraform-azurerm-azurerm_network_interface
terraform-azurerm-azurerm_network_security_group
terraform-azurerm-azurerm_network_security_rule
terraform-azurerm-azurerm_public_ip
terraform-azurerm-azurerm_resource_group
terraform-azurerm-azurerm_subnet
terraform-azurerm-azurerm_virtual_network
terraform-cloudflare-record
terraform-demo
terraform-digitalocean-droplet
terraform-digitalocean-ssh_key
terraform-digitalocean-vpc
terraform-use-case-azure-loadbalanced-service
terragrunt-demo

View File

@ -4,5 +4,9 @@
exclude_paths:
- ./meta/exception.yml
- ./meta/preferences.yml
- ./molecule/default/prepare.yml
- ./molecule/default/converge.yml
- ./molecule/default/verify.yml
- ./molecule/default/collections.yml
- ./.tox
- ./.cache

View File

@ -1,2 +0,0 @@
---
github: robertdebock

View File

@ -1,11 +0,0 @@
---
name: Pull request
about: Describe the proposed change
---
**Describe the change**
A clear and concise description of what the pull request is.
**Testing**
In case a feature was added, how were tests performed?

View File

@ -1,7 +0,0 @@
---
#
# Ansible managed
#
repository:
description: Install and configure ansible on your system.
homepage: https://robertdebock.nl/

View File

@ -5,3 +5,4 @@
repository:
description: Install and configure ansible on your system.
homepage: https://robertdebock.nl/
topics: ansible, ansible, molecule, tox, playbook, hacktoberfest

View File

@ -6,17 +6,13 @@
name: Release to Ansible Galaxy
on:
push:
tags:
- '*'
schedule:
- cron: '1 1 1 * *'
release:
types: [created, edited, published, released]
jobs:
release:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: galaxy
uses: robertdebock/galaxy-action@1.0.1
uses: robertdebock/galaxy-action@1.1.0
with:
galaxy_api_key: ${{ secrets.galaxy_api_key }}

View File

@ -15,30 +15,26 @@ on:
jobs:
lint:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v2
with:
path: "${{ github.repository }}"
- name: molecule
uses: robertdebock/molecule-action@2.6.2
uses: robertdebock/molecule-action@2.6.16
with:
command: lint
test:
needs:
- lint
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
config:
- image: "alpine"
tag: "latest"
- image: "alpine"
tag: "edge"
- image: "centos"
tag: "7"
- image: "centos"
tag: "latest"
- image: "debian"
@ -46,7 +42,7 @@ jobs:
- image: "debian"
tag: "bullseye"
- image: "fedora"
tag: "31"
tag: "32"
- image: "fedora"
tag: "latest"
- image: "opensuse"
@ -55,8 +51,6 @@ jobs:
tag: "latest"
- image: "ubuntu"
tag: "bionic"
- image: "ubuntu"
tag: "xenial"
steps:
- name: checkout
uses: actions/checkout@v2
@ -67,10 +61,7 @@ jobs:
- 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
uses: robertdebock/molecule-action@2.6.16
with:
image: ${{ matrix.config.image }}
tag: ${{ matrix.config.tag }}
options: "--parallel all"
env:
TOX_PARALLEL_NO_SPINNER: 1

View File

@ -2,3 +2,4 @@
*.log
*.swp
.tox
.cache

View File

@ -1,4 +0,0 @@
.molecule
*.log
*.swp
.tox

View File

@ -8,42 +8,23 @@ os: linux
dist: xenial
python:
- "3.8"
- "3.9"
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
- pip install yamllint
- pip install ansible-lint
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
- yamllint .
- ansible-lint
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

View File

@ -13,3 +13,4 @@ rules:
ignore: |
.tox/
.cache/

View File

@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2020 Robert de Bock (robert@meinit.nl)
Copyright 2021 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.

View File

@ -2,9 +2,9 @@
Install and configure ansible on your system.
|Travis|GitHub|Quality|Downloads|Version|
|GitHub|GitLab|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/)|
|[![github](https://github.com/robertdebock/ansible-role-ansible/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-ansible/actions)|[![gitlab](https://gitlab.com/robertdebock/ansible-role-ansible/badges/master/pipeline.svg)](https://gitlab.com/robertdebock/ansible-role-ansible)|[![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/)|
## [Example Playbook](#example-playbook)
@ -20,7 +20,7 @@ This example is taken from `molecule/resources/converge.yml` and is tested on ea
- role: robertdebock.ansible
```
The machine may need to be prepared using `molecule/resources/prepare.yml`:
The machine needs to be prepared in CI this is done using `molecule/resources/prepare.yml`:
```yaml
---
- name: Prepare
@ -35,21 +35,6 @@ The machine may need to be prepared using `molecule/resources/prepare.yml`:
- role: robertdebock.python_pip
```
For verification `molecule/resources/verify.yml` runs after the role has been applied.
```yaml
---
- name: Verify
hosts: all
become: no
gather_facts: no
tasks:
- name: run ansible
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)
@ -74,26 +59,25 @@ ansible_configuration:
## [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.)
- pip packages listed in [requirements.txt](https://github.com/robertdebock/ansible-role-ansible/blob/master/requirements.txt).
The following roles can be installed to ensure all requirements are met, using `ansible-galaxy install -r requirements.yml`:
## [Status of requirements](#status-of-requirements)
```yaml
---
- robertdebock.bootstrap
- robertdebock.buildtools
- robertdebock.epel
- robertdebock.python_pip
The following roles are used to prepare a system. You may choose to prepare your system in another way, I have tested these roles as well.
```
| Requirement | GitHub | GitLab |
|-------------|--------|--------|
| [robertdebock.bootstrap](https://galaxy.ansible.com/robertdebock/bootstrap) | [![Build Status GitHub](https://github.com/robertdebock/ansible-role-bootstrap/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-bootstrap/actions) | [![Build Status GitLab ](https://gitlab.com/robertdebock/ansible-role-ansible-role-bootstrap/badges/master/pipeline.svg)](https://gitlab.com/robertdebock/ansible-role-bootstrap)
| [robertdebock.buildtools](https://galaxy.ansible.com/robertdebock/buildtools) | [![Build Status GitHub](https://github.com/robertdebock/ansible-role-buildtools/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-buildtools/actions) | [![Build Status GitLab ](https://gitlab.com/robertdebock/ansible-role-ansible-role-buildtools/badges/master/pipeline.svg)](https://gitlab.com/robertdebock/ansible-role-buildtools)
| [robertdebock.epel](https://galaxy.ansible.com/robertdebock/epel) | [![Build Status GitHub](https://github.com/robertdebock/ansible-role-epel/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-epel/actions) | [![Build Status GitLab ](https://gitlab.com/robertdebock/ansible-role-ansible-role-epel/badges/master/pipeline.svg)](https://gitlab.com/robertdebock/ansible-role-epel)
| [robertdebock.python_pip](https://galaxy.ansible.com/robertdebock/python_pip) | [![Build Status GitHub](https://github.com/robertdebock/ansible-role-python_pip/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-python_pip/actions) | [![Build Status GitLab ](https://gitlab.com/robertdebock/ansible-role-ansible-role-python_pip/badges/master/pipeline.svg)](https://gitlab.com/robertdebock/ansible-role-python_pip)
## [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")
![dependencies](https://raw.githubusercontent.com/robertdebock/ansible-role-ansible/png/requirements.png "Dependencies")
## [Compatibility](#compatibility)
@ -102,15 +86,15 @@ This role has been tested on these [container images](https://hub.docker.com/u/r
|container|tags|
|---------|----|
|alpine|all|
|el|7, 8|
|el|8|
|debian|buster, bullseye|
|fedora|31, 32|
|fedora|all|
|opensuse|all|
|ubuntu|focal, bionic, xenial|
|ubuntu|focal, bionic|
The minimum version of Ansible required is 2.8 but tests have been done to:
The minimum version of Ansible required is 2.10, tests have been done to:
- The previous version, on version lower.
- The previous version.
- The current version.
- The development version.
@ -123,40 +107,8 @@ Some variarations of the build matrix do not work. These are the variations and
| amazonlinux:1 | No package matching 'python3-pip' |
## [Testing](#testing)
[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)
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

View File

@ -1,2 +0,0 @@
install_date: Mon Sep 28 13:21:49 2020
version: 2.3.3

View File

@ -1,4 +0,0 @@
---
exceptions:
- variation: amazonlinux:1
reason: "No package matching 'python3-pip'"

View File

@ -1,2 +0,0 @@
---
tox_parallel: yes

View File

@ -1,2 +1,2 @@
install_date: Mon Sep 28 13:21:49 2020
version: 2.3.3
install_date: Sun Mar 21 06:59:14 2021
version: 3.0.2

View File

@ -5,7 +5,7 @@ galaxy_info:
description: Install and configure ansible on your system.
license: Apache-2.0
company: none
min_ansible_version: 2.8
min_ansible_version: "2.10"
platforms:
- name: Alpine
@ -13,7 +13,6 @@ galaxy_info:
- all
- name: EL
versions:
- 7
- 8
- name: Debian
versions:
@ -21,8 +20,7 @@ galaxy_info:
- bullseye
- name: Fedora
versions:
- 31
- 32
- all
- name: OpenSUSE
versions:
- all
@ -30,7 +28,6 @@ galaxy_info:
versions:
- focal
- bionic
- xenial
galaxy_tags:
- ansible

View File

@ -1,8 +0,0 @@
---
- name: Converge
hosts: all
become: yes
gather_facts: yes
roles:
- role: ansible-role-ansible

View File

@ -1,11 +0,0 @@
---
- name: Prepare
hosts: all
gather_facts: no
become: yes
roles:
- role: robertdebock.bootstrap
- role: robertdebock.epel
- role: robertdebock.buildtools
- role: robertdebock.python_pip

View File

@ -1,11 +0,0 @@
---
- name: Verify
hosts: all
become: no
gather_facts: no
tasks:
- name: run ansible
shell: ansible --version > ansible.version
args:
creates: ansible.version

View File

@ -6,9 +6,11 @@ dependency:
name: galaxy
options:
role-file: requirements.yml
requirements-file: requirements.yml
lint: |
set -e
yamllint .
ansible-lint
driver:
name: docker
platforms:

View File

@ -1,5 +0,0 @@
---
- robertdebock.bootstrap
- robertdebock.buildtools
- robertdebock.epel
- robertdebock.python_pip

View File

@ -1,5 +1,8 @@
---
- robertdebock.bootstrap
- robertdebock.buildtools
- robertdebock.epel
- robertdebock.python_pip
roles:
- name: robertdebock.bootstrap
- name: robertdebock.buildtools
- name: robertdebock.epel
- name: robertdebock.python_pip
collections:
- name: community.general

View File

@ -1,20 +1,19 @@
---
- name: test if ansible_configuration is set correctly
assert:
ansible.builtin.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:
ansible.builtin.assert:
that:
- item.option is defined
- item.option | length > 0
- item.option is string
- item.value is defined
- item.value | length > 0
quiet: yes
loop: "{{ ansible_configuration }}"
loop_control:

View File

@ -1,28 +1,31 @@
---
# tasks file for ansible
- name: include assert.yml
include_tasks: assert.yml
import_tasks: assert.yml
run_once: yes
delegate_to: localhost
- name: install ansible
block:
- name: install ansible package (allowed to fail)
package:
ansible.builtin.package:
name: "{{ ansible_packages }}"
state: present
rescue:
- name: install ansible pip
pip:
ansible.builtin.pip:
name: ansible
state: present
- name: ensure the ansible directory exists
file:
ansible.builtin.file:
path: "{{ ansible_configuration_directory }}"
state: directory
mode: "0755"
- name: mark configuration file as ansible managed
lineinfile:
ansible.builtin.lineinfile:
path: "{{ ansible_configuration_directory }}/{{ ansible_configuration_file }}"
create: yes
insertbefore: BOF
@ -30,7 +33,7 @@
mode: "0644"
- name: configure ansible
ini_file:
community.general.ini_file:
path: "{{ ansible_configuration_directory }}/{{ ansible_configuration_file }}"
section: "{{ item.section | default('defaults') }}"
option: "{{ item.option }}"

View File

@ -2,25 +2,25 @@
# 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}
minversion = 3.21.4
# 2.11 has been disabled: couldn't resolve module/action 'docker_container'.
envlist = py{39}-ansible-{2.9,2.10}
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
2.9: ansible == 2.9.*
2.10: ansible == 2.10.*
2.11: git+https://github.com/ansible/ansible.git@devel
molecule[docker]
docker == 4.*
ansible-lint == 5.*
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
ANSIBLE_ROLES_PATH=../
passenv = namespace image tag

View File

@ -4,5 +4,9 @@
exclude_paths:
- ./meta/exception.yml
- ./meta/preferences.yml
- ./molecule/default/prepare.yml
- ./molecule/default/converge.yml
- ./molecule/default/verify.yml
- ./molecule/default/collections.yml
- ./.tox
- ./.cache

View File

@ -1,2 +0,0 @@
---
github: robertdebock

View File

@ -1,11 +0,0 @@
---
name: Pull request
about: Describe the proposed change
---
**Describe the change**
A clear and concise description of what the pull request is.
**Testing**
In case a feature was added, how were tests performed?

View File

@ -1,7 +0,0 @@
---
#
# Ansible managed
#
repository:
description: Install ansible-lint on your system.
homepage: https://robertdebock.nl/

View File

@ -5,3 +5,4 @@
repository:
description: Install ansible-lint on your system.
homepage: https://robertdebock.nl/
topics: ansiblelint, ansible, lint, ansible, molecule, tox, playbook, hacktoberfest

View File

@ -6,17 +6,13 @@
name: Release to Ansible Galaxy
on:
push:
tags:
- '*'
schedule:
- cron: '1 1 1 * *'
release:
types: [created, edited, published, released]
jobs:
release:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: galaxy
uses: robertdebock/galaxy-action@1.0.1
uses: robertdebock/galaxy-action@1.1.0
with:
galaxy_api_key: ${{ secrets.galaxy_api_key }}

View File

@ -15,20 +15,20 @@ on:
jobs:
lint:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v2
with:
path: "${{ github.repository }}"
- name: molecule
uses: robertdebock/molecule-action@2.6.2
uses: robertdebock/molecule-action@2.6.16
with:
command: lint
test:
needs:
- lint
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
@ -40,15 +40,13 @@ jobs:
- image: "debian"
tag: "bullseye"
- image: "fedora"
tag: "31"
tag: "32"
- image: "fedora"
tag: "latest"
- image: "ubuntu"
tag: "latest"
- image: "ubuntu"
tag: "bionic"
- image: "ubuntu"
tag: "xenial"
steps:
- name: checkout
uses: actions/checkout@v2
@ -59,10 +57,7 @@ jobs:
- 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
uses: robertdebock/molecule-action@2.6.16
with:
image: ${{ matrix.config.image }}
tag: ${{ matrix.config.tag }}
options: "--parallel all"
env:
TOX_PARALLEL_NO_SPINNER: 1

View File

@ -2,3 +2,4 @@
*.log
*.swp
.tox
.cache

View File

@ -1,4 +0,0 @@
.molecule
*.log
*.swp
.tox

View File

@ -8,38 +8,23 @@ os: linux
dist: xenial
python:
- "3.8"
- "3.9"
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
- pip install yamllint
- pip install ansible-lint
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
- yamllint .
- ansible-lint
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

View File

@ -13,3 +13,4 @@ rules:
ignore: |
.tox/
.cache/

View File

@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2020 Robert de Bock (robert@meinit.nl)
Copyright 2021 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.

View File

@ -2,9 +2,9 @@
Install ansible-lint on your system.
|Travis|GitHub|Quality|Downloads|Version|
|GitHub|GitLab|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/)|
|[![github](https://github.com/robertdebock/ansible-role-ansible_lint/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-ansible_lint/actions)|[![gitlab](https://gitlab.com/robertdebock/ansible-role-ansible_lint/badges/master/pipeline.svg)](https://gitlab.com/robertdebock/ansible-role-ansible_lint)|[![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/)|
## [Example Playbook](#example-playbook)
@ -20,7 +20,7 @@ This example is taken from `molecule/resources/converge.yml` and is tested on ea
- role: robertdebock.ansible_lint
```
The machine may need to be prepared using `molecule/resources/prepare.yml`:
The machine needs to be prepared in CI this is done using `molecule/resources/prepare.yml`:
```yaml
---
- name: Prepare
@ -35,44 +35,30 @@ The machine may need to be prepared using `molecule/resources/prepare.yml`:
- 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.
## [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.)
- pip packages listed in [requirements.txt](https://github.com/robertdebock/ansible-role-ansible_lint/blob/master/requirements.txt).
The following roles can be installed to ensure all requirements are met, using `ansible-galaxy install -r requirements.yml`:
## [Status of requirements](#status-of-requirements)
```yaml
---
- robertdebock.bootstrap
- robertdebock.buildtools
- robertdebock.epel
- robertdebock.python_pip
The following roles are used to prepare a system. You may choose to prepare your system in another way, I have tested these roles as well.
```
| Requirement | GitHub | GitLab |
|-------------|--------|--------|
| [robertdebock.bootstrap](https://galaxy.ansible.com/robertdebock/bootstrap) | [![Build Status GitHub](https://github.com/robertdebock/ansible-role-bootstrap/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-bootstrap/actions) | [![Build Status GitLab ](https://gitlab.com/robertdebock/ansible-role-ansible-role-bootstrap/badges/master/pipeline.svg)](https://gitlab.com/robertdebock/ansible-role-bootstrap)
| [robertdebock.buildtools](https://galaxy.ansible.com/robertdebock/buildtools) | [![Build Status GitHub](https://github.com/robertdebock/ansible-role-buildtools/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-buildtools/actions) | [![Build Status GitLab ](https://gitlab.com/robertdebock/ansible-role-ansible-role-buildtools/badges/master/pipeline.svg)](https://gitlab.com/robertdebock/ansible-role-buildtools)
| [robertdebock.epel](https://galaxy.ansible.com/robertdebock/epel) | [![Build Status GitHub](https://github.com/robertdebock/ansible-role-epel/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-epel/actions) | [![Build Status GitLab ](https://gitlab.com/robertdebock/ansible-role-ansible-role-epel/badges/master/pipeline.svg)](https://gitlab.com/robertdebock/ansible-role-epel)
| [robertdebock.python_pip](https://galaxy.ansible.com/robertdebock/python_pip) | [![Build Status GitHub](https://github.com/robertdebock/ansible-role-python_pip/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-python_pip/actions) | [![Build Status GitLab ](https://gitlab.com/robertdebock/ansible-role-ansible-role-python_pip/badges/master/pipeline.svg)](https://gitlab.com/robertdebock/ansible-role-python_pip)
## [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")
![dependencies](https://raw.githubusercontent.com/robertdebock/ansible-role-ansible_lint/png/requirements.png "Dependencies")
## [Compatibility](#compatibility)
@ -81,13 +67,13 @@ This role has been tested on these [container images](https://hub.docker.com/u/r
|container|tags|
|---------|----|
|el|8|
|debian|buster, bullseye|
|fedora|31, 32|
|ubuntu|focal, bionic, xenial|
|debian|all|
|fedora|all|
|ubuntu|focal, bionic|
The minimum version of Ansible required is 2.8 but tests have been done to:
The minimum version of Ansible required is 2.10, tests have been done to:
- The previous version, on version lower.
- The previous version.
- The current version.
- The development version.
@ -101,40 +87,8 @@ Some variarations of the build matrix do not work. These are the variations and
| amazonlinux | No module named pkg_resources |
## [Testing](#testing)
[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)
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

View File

@ -1,2 +0,0 @@
install_date: Mon Sep 28 13:21:51 2020
version: 2.3.12

View File

@ -1,6 +0,0 @@
---
exceptions:
- variation: amazonlinux:1
reason: "No package matching 'python3-pip'"
- variation: amazonlinux
reason: "No module named pkg_resources"

View File

@ -1,2 +0,0 @@
---
tox_parallel: yes

View File

@ -1,2 +1,2 @@
install_date: Mon Sep 28 13:21:51 2020
version: 2.3.12
install_date: Sun Mar 21 06:59:18 2021
version: 3.0.1

View File

@ -5,7 +5,7 @@ galaxy_info:
description: Install ansible-lint on your system.
license: Apache-2.0
company: none
min_ansible_version: 2.8
min_ansible_version: "2.10"
platforms:
- name: EL
@ -13,20 +13,18 @@ galaxy_info:
- 8
- name: Debian
versions:
- buster
- bullseye
- all
- name: Fedora
versions:
- 31
- 32
- all
- name: Ubuntu
versions:
- focal
- bionic
- xenial
galaxy_tags:
- ansiblelint
- centos
- ansible
- lint
dependencies: []

View File

@ -9,6 +9,7 @@ dependency:
lint: |
set -e
yamllint .
ansible-lint
driver:
name: docker
platforms:

View File

@ -1,5 +0,0 @@
---
- robertdebock.bootstrap
- robertdebock.buildtools
- robertdebock.epel
- robertdebock.python_pip

View File

@ -1,5 +1,6 @@
---
- robertdebock.bootstrap
- robertdebock.buildtools
- robertdebock.epel
- robertdebock.python_pip
roles:
- name: robertdebock.bootstrap
- name: robertdebock.buildtools
- name: robertdebock.epel
- name: robertdebock.python_pip

View File

@ -1,6 +1,7 @@
---
# tasks file for ansible_lint
- name: install ansible_lint
pip:
ansible.builtin.pip:
name: "{{ ansible_lint_packages }}"
state: present

View File

@ -2,25 +2,25 @@
# 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}
minversion = 3.21.4
# 2.11 has been disabled: couldn't resolve module/action 'docker_container'.
envlist = py{39}-ansible-{2.9,2.10}
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
2.9: ansible == 2.9.*
2.10: ansible == 2.10.*
2.11: git+https://github.com/ansible/ansible.git@devel
molecule[docker]
docker == 4.*
ansible-lint == 5.*
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
ANSIBLE_ROLES_PATH=../
passenv = namespace image tag

View File

@ -1,5 +0,0 @@
---
# vars file for ansible_lint
ansible_lint_packages:
- ansible-lint

View File

@ -4,5 +4,9 @@
exclude_paths:
- ./meta/exception.yml
- ./meta/preferences.yml
- ./molecule/default/prepare.yml
- ./molecule/default/converge.yml
- ./molecule/default/verify.yml
- ./molecule/default/collections.yml
- ./.tox
- ./.cache

View File

@ -1,2 +0,0 @@
---
github: robertdebock

View File

@ -1,11 +0,0 @@
---
name: Pull request
about: Describe the proposed change
---
**Describe the change**
A clear and concise description of what the pull request is.
**Testing**
In case a feature was added, how were tests performed?

View File

@ -1,7 +0,0 @@
---
#
# Ansible managed
#
repository:
description: Install and configure ara on your system.
homepage: https://robertdebock.nl/

View File

@ -5,3 +5,4 @@
repository:
description: Install and configure ara on your system.
homepage: https://robertdebock.nl/
topics: ansiblerecordsansible, ara, arareportsansible, cloud, development, monitoring, reporting, ansible, molecule, tox, playbook, hacktoberfest

View File

@ -6,17 +6,13 @@
name: Release to Ansible Galaxy
on:
push:
tags:
- '*'
schedule:
- cron: '1 1 1 * *'
release:
types: [created, edited, published, released]
jobs:
release:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: galaxy
uses: robertdebock/galaxy-action@1.0.1
uses: robertdebock/galaxy-action@1.1.0
with:
galaxy_api_key: ${{ secrets.galaxy_api_key }}

View File

@ -15,20 +15,20 @@ on:
jobs:
lint:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v2
with:
path: "${{ github.repository }}"
- name: molecule
uses: robertdebock/molecule-action@2.6.2
uses: robertdebock/molecule-action@2.6.16
with:
command: lint
test:
needs:
- lint
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
@ -40,7 +40,7 @@ jobs:
- image: "debian"
tag: "bullseye"
- image: "fedora"
tag: "31"
tag: "32"
- image: "fedora"
tag: "latest"
- image: "ubuntu"
@ -55,10 +55,7 @@ jobs:
- 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
uses: robertdebock/molecule-action@2.6.16
with:
image: ${{ matrix.config.image }}
tag: ${{ matrix.config.tag }}
options: "--parallel all"
env:
TOX_PARALLEL_NO_SPINNER: 1

View File

@ -2,3 +2,4 @@
*.log
*.swp
.tox
.cache

View File

@ -1,4 +0,0 @@
.molecule
*.log
*.swp
.tox

View File

@ -8,36 +8,23 @@ os: linux
dist: xenial
python:
- "3.8"
- "3.9"
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
- pip install yamllint
- pip install ansible-lint
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
- yamllint .
- ansible-lint
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

View File

@ -13,3 +13,4 @@ rules:
ignore: |
.tox/
.cache/

View File

@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2020 Robert de Bock (robert@meinit.nl)
Copyright 2021 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.

View File

@ -2,9 +2,9 @@
Install and configure ara on your system.
|Travis|GitHub|Quality|Downloads|Version|
|GitHub|GitLab|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/)|
|[![github](https://github.com/robertdebock/ansible-role-ara/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-ara/actions)|[![gitlab](https://gitlab.com/robertdebock/ansible-role-ara/badges/master/pipeline.svg)](https://gitlab.com/robertdebock/ansible-role-ara)|[![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/)|
## [Example Playbook](#example-playbook)
@ -20,7 +20,7 @@ This example is taken from `molecule/resources/converge.yml` and is tested on ea
- role: robertdebock.ara
```
The machine may need to be prepared using `molecule/resources/prepare.yml`:
The machine needs to be prepared in CI this is done using `molecule/resources/prepare.yml`:
```yaml
---
- name: Prepare
@ -35,19 +35,6 @@ The machine may need to be prepared using `molecule/resources/prepare.yml`:
- 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)
@ -77,27 +64,26 @@ ara_user: root
## [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.)
- pip packages listed in [requirements.txt](https://github.com/robertdebock/ansible-role-ara/blob/master/requirements.txt).
The following roles can be installed to ensure all requirements are met, using `ansible-galaxy install -r requirements.yml`:
## [Status of requirements](#status-of-requirements)
```yaml
---
- robertdebock.bootstrap
- robertdebock.buildtools
- robertdebock.epel
- robertdebock.python_pip
- robertdebock.service
The following roles are used to prepare a system. You may choose to prepare your system in another way, I have tested these roles as well.
```
| Requirement | GitHub | GitLab |
|-------------|--------|--------|
| [robertdebock.bootstrap](https://galaxy.ansible.com/robertdebock/bootstrap) | [![Build Status GitHub](https://github.com/robertdebock/ansible-role-bootstrap/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-bootstrap/actions) | [![Build Status GitLab ](https://gitlab.com/robertdebock/ansible-role-ansible-role-bootstrap/badges/master/pipeline.svg)](https://gitlab.com/robertdebock/ansible-role-bootstrap)
| [robertdebock.buildtools](https://galaxy.ansible.com/robertdebock/buildtools) | [![Build Status GitHub](https://github.com/robertdebock/ansible-role-buildtools/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-buildtools/actions) | [![Build Status GitLab ](https://gitlab.com/robertdebock/ansible-role-ansible-role-buildtools/badges/master/pipeline.svg)](https://gitlab.com/robertdebock/ansible-role-buildtools)
| [robertdebock.epel](https://galaxy.ansible.com/robertdebock/epel) | [![Build Status GitHub](https://github.com/robertdebock/ansible-role-epel/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-epel/actions) | [![Build Status GitLab ](https://gitlab.com/robertdebock/ansible-role-ansible-role-epel/badges/master/pipeline.svg)](https://gitlab.com/robertdebock/ansible-role-epel)
| [robertdebock.python_pip](https://galaxy.ansible.com/robertdebock/python_pip) | [![Build Status GitHub](https://github.com/robertdebock/ansible-role-python_pip/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-python_pip/actions) | [![Build Status GitLab ](https://gitlab.com/robertdebock/ansible-role-ansible-role-python_pip/badges/master/pipeline.svg)](https://gitlab.com/robertdebock/ansible-role-python_pip)
| [robertdebock.service](https://galaxy.ansible.com/robertdebock/service) | [![Build Status GitHub](https://github.com/robertdebock/ansible-role-service/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-service/actions) | [![Build Status GitLab ](https://gitlab.com/robertdebock/ansible-role-ansible-role-service/badges/master/pipeline.svg)](https://gitlab.com/robertdebock/ansible-role-service)
## [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")
![dependencies](https://raw.githubusercontent.com/robertdebock/ansible-role-ara/png/requirements.png "Dependencies")
## [Compatibility](#compatibility)
@ -107,12 +93,12 @@ This role has been tested on these [container images](https://hub.docker.com/u/r
|---------|----|
|el|8|
|debian|buster, bullseye|
|fedora|31, 32|
|fedora|all|
|ubuntu|bionic|
The minimum version of Ansible required is 2.8 but tests have been done to:
The minimum version of Ansible required is 2.10, tests have been done to:
- The previous version, on version lower.
- The previous version.
- The current version.
- The development version.
@ -122,46 +108,14 @@ Some variarations of the build matrix do not work. These are the variations and
| variation | reason |
|---------------------------|------------------------|
| Alpine | Could not find a version that satisfies the requirement Django>=2.1.5 |
| CentOS | No matching distribution found for Django>=2.1.5 |
| alpine | Could not find a version that satisfies the requirement Django>=2.1.5 |
| centos:7 | No matching distribution found for Django>=2.1.5 |
| amazonlinux:1 | No package matching 'python3-pip' |
| amazonlinux | No module named pkg_resources |
## [Testing](#testing)
[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)
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

View File

@ -1,13 +1,16 @@
---
# handlers file for ara
- name: restart ara
service:
ansible.builtin.service:
name: ara
state: restarted
become: yes
when:
- not ansible_check_mode | bool
- name: systemctl daemon-reload
systemd:
ansible.builtin.systemd:
daemon_reload: yes
become: yes
notify:

View File

@ -1,2 +0,0 @@
install_date: Mon Sep 28 13:21:56 2020
version: 2.5.2

View File

@ -1,2 +0,0 @@
---
tox_parallel: yes

View File

@ -1,2 +1,2 @@
install_date: Mon Sep 28 13:21:56 2020
version: 2.5.2
install_date: Sun Mar 21 06:59:21 2021
version: 3.0.3

View File

@ -1,8 +1,8 @@
---
exceptions:
- variation: Alpine
- variation: alpine
reason: "Could not find a version that satisfies the requirement Django>=2.1.5"
- variation: CentOS
- variation: centos:7
reason: No matching distribution found for Django>=2.1.5
- variation: amazonlinux:1
reason: "No package matching 'python3-pip'"

View File

@ -5,7 +5,7 @@ galaxy_info:
description: Install and configure ara on your system.
license: Apache-2.0
company: none
min_ansible_version: 2.8
min_ansible_version: "2.10"
platforms:
- name: EL
@ -17,8 +17,7 @@ galaxy_info:
- bullseye
- name: Fedora
versions:
- 31
- 32
- all
- name: Ubuntu
versions:
- bionic
@ -28,7 +27,6 @@ galaxy_info:
- ara
- arareportsansible
- cloud
- centos
- development
- monitoring
- reporting

View File

@ -1,8 +0,0 @@
---
- name: Converge
hosts: all
become: yes
gather_facts: yes
roles:
- role: ansible-role-ara

View File

@ -1,11 +0,0 @@
---
- name: Prepare
hosts: all
become: yes
gather_facts: no
roles:
- role: robertdebock.bootstrap
- role: robertdebock.buildtools
- role: robertdebock.epel
- role: robertdebock.python_pip

View File

@ -1,9 +0,0 @@
---
- name: Verify
hosts: all
become: yes
gather_facts: no
tasks:
- name: check if connection still works
ping:

View File

@ -6,9 +6,11 @@ dependency:
name: galaxy
options:
role-file: requirements.yml
requirements-file: requirements.yml
lint: |
set -e
yamllint .
ansible-lint
driver:
name: docker
platforms:

View File

@ -1,6 +1,9 @@
---
- robertdebock.bootstrap
- robertdebock.buildtools
- robertdebock.epel
- robertdebock.python_pip
- robertdebock.service
roles:
- name: robertdebock.bootstrap
- name: robertdebock.buildtools
- name: robertdebock.epel
- name: robertdebock.python_pip
- name: robertdebock.service
collections:
- name: community.general

View File

@ -1,34 +1,33 @@
---
- name: test if ara_configuration_file is set correctly
assert:
ansible.builtin.assert:
that:
- ara_configuration_file is defined
- ara_configuration_file | length > 0
- ara_configuration_file is string
quiet: yes
- name: test if ara_user is set correctly
assert:
ansible.builtin.assert:
that:
- ara_user is defined
- ara_user | length > 0
- ara_user is string
quiet: yes
- name: test if ara_configuration is set correctly
assert:
ansible.builtin.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:
ansible.builtin.assert:
that:
- item.option is defined
- item.option | length > 0
- item.option is string
- item.value is defined
- item.value | length > 0
quiet: yes
loop: "{{ ara_configuration }}"
loop_control:

View File

@ -1,61 +1,71 @@
---
# tasks file for ara
- name: include assert.yml
include_tasks: assert.yml
import_tasks: assert.yml
run_once: yes
delegate_to: localhost
- name: install ara
pip:
ansible.builtin.pip:
name: ara[server]
state: present
- name: create ara service
import_role:
name: service
ansible.builtin.import_role:
name: robertdebock.service
vars:
service_list:
- name: ara
description: Ansible Reports Ara
start_command: "{{ ara_binary_location }}/ara-manage runserver"
user_name: "{{ ara_user }}"
- name: find callback_plugins path
block:
- name: try python2
command: "{{ ara_setup_command_python2 }}"
ansible.builtin.command: "{{ ara_setup_command_python2 }}"
register: ara_callback_plugins
changed_when: no
check_mode: no
rescue:
- name: try python3
command: "{{ ara_setup_command_python3 }}"
ansible.builtin.command: "{{ ara_setup_command_python3 }}"
register: ara_callback_plugins
changed_when: no
- name: configure ansible to use ara
ini_file:
path: "{{ ara_configuration_file }}"
section: defaults
option: callback_plugins
value: "{{ ara_callback_plugins.stdout }}"
mode: "0644"
notify:
- restart ara
when:
- ara_configuration_file is defined
- ara_callback_plugins.stdout is defined
- name: configure ansible and ara
block:
- name: configure ansible to use ara
community.general.ini_file:
path: "{{ ara_configuration_file }}"
section: defaults
option: callback_plugins
value: "{{ ara_callback_plugins.stdout }}"
mode: "0644"
notify:
- restart ara
when:
- ara_callback_plugins.stdout is defined
- name: configure ara
ini_file:
path: "{{ ara_configuration_file }}"
section: ara
option: "{{ item.option }}"
value: "{{ item.value }}"
mode: "0644"
notify:
- restart ara
loop: "{{ ara_configuration }}"
- name: configure ara
community.general.ini_file:
path: "{{ ara_configuration_file }}"
section: ara
option: "{{ item.option }}"
value: "{{ item.value }}"
mode: "0644"
notify:
- restart ara
loop: "{{ ara_configuration }}"
loop_control:
label: "{{ item.option }}"
when:
- ara_configuration is defined
loop_control:
label: "{{ item.option }}"
- name: start and enable ara
service:
ansible.builtin.service:
name: ara
state: started
enabled: yes

View File

@ -2,25 +2,25 @@
# 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}
minversion = 3.21.4
# 2.11 has been disabled: couldn't resolve module/action 'docker_container'.
envlist = py{39}-ansible-{2.9,2.10}
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
2.9: ansible == 2.9.*
2.10: ansible == 2.10.*
2.11: git+https://github.com/ansible/ansible.git@devel
molecule[docker]
docker == 4.*
ansible-lint == 5.*
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
ANSIBLE_ROLES_PATH=../
passenv = namespace image tag

View File

@ -10,9 +10,3 @@ ara_binary_location: "{{ _ara_binary_location[ansible_os_family] | default(_ara_
ara_setup_command_python2: python -m ara.setup.callback_plugins
ara_setup_command_python3: python3 -m ara.setup.callback_plugins
service_list:
- name: ara
description: Ansible Reports Ara
start_command: "{{ ara_binary_location }}/ara-manage runserver"
user_name: "{{ ara_user }}"

View File

@ -4,5 +4,9 @@
exclude_paths:
- ./meta/exception.yml
- ./meta/preferences.yml
- ./molecule/default/prepare.yml
- ./molecule/default/converge.yml
- ./molecule/default/verify.yml
- ./molecule/default/collections.yml
- ./.tox
- ./.cache

View File

@ -1,2 +0,0 @@
---
github: robertdebock

View File

@ -1,11 +0,0 @@
---
name: Pull request
about: Describe the proposed change
---
**Describe the change**
A clear and concise description of what the pull request is.
**Testing**
In case a feature was added, how were tests performed?

View File

@ -1,7 +0,0 @@
---
#
# Ansible managed
#
repository:
description: Install atom on your system.
homepage: https://robertdebock.nl/

View File

@ -5,3 +5,4 @@
repository:
description: Install atom on your system.
homepage: https://robertdebock.nl/
topics: atom, ide, ansible, molecule, tox, playbook, hacktoberfest

View File

@ -6,17 +6,13 @@
name: Release to Ansible Galaxy
on:
push:
tags:
- '*'
schedule:
- cron: '1 1 1 * *'
release:
types: [created, edited, published, released]
jobs:
release:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: galaxy
uses: robertdebock/galaxy-action@1.0.1
uses: robertdebock/galaxy-action@1.1.0
with:
galaxy_api_key: ${{ secrets.galaxy_api_key }}

View File

@ -15,32 +15,30 @@ on:
jobs:
lint:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v2
with:
path: "${{ github.repository }}"
- name: molecule
uses: robertdebock/molecule-action@2.6.2
uses: robertdebock/molecule-action@2.6.16
with:
command: lint
test:
needs:
- lint
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
config:
- image: "centos"
tag: "7"
- image: "centos"
tag: "latest"
- image: "debian"
tag: "latest"
- image: "fedora"
tag: "31"
tag: "32"
- image: "fedora"
tag: "latest"
- image: "opensuse"
@ -49,8 +47,6 @@ jobs:
tag: "latest"
- image: "ubuntu"
tag: "bionic"
- image: "ubuntu"
tag: "xenial"
steps:
- name: checkout
uses: actions/checkout@v2
@ -61,10 +57,7 @@ jobs:
- 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
uses: robertdebock/molecule-action@2.6.16
with:
image: ${{ matrix.config.image }}
tag: ${{ matrix.config.tag }}
options: "--parallel all"
env:
TOX_PARALLEL_NO_SPINNER: 1

View File

@ -2,3 +2,4 @@
*.log
*.swp
.tox
.cache

View File

@ -1,4 +0,0 @@
.molecule
*.log
*.swp
.tox

View File

@ -8,39 +8,23 @@ os: linux
dist: xenial
python:
- "3.8"
- "3.9"
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
- pip install yamllint
- pip install ansible-lint
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
- yamllint .
- ansible-lint
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

View File

@ -13,3 +13,4 @@ rules:
ignore: |
.tox/
.cache/

View File

@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2020 Robert de Bock (robert@meinit.nl)
Copyright 2021 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.

View File

@ -2,9 +2,9 @@
Install atom on your system.
|Travis|GitHub|Quality|Downloads|Version|
|GitHub|GitLab|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/)|
|[![github](https://github.com/robertdebock/ansible-role-atom/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-atom/actions)|[![gitlab](https://gitlab.com/robertdebock/ansible-role-atom/badges/master/pipeline.svg)](https://gitlab.com/robertdebock/ansible-role-atom)|[![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/)|
## [Example Playbook](#example-playbook)
@ -20,7 +20,7 @@ This example is taken from `molecule/resources/converge.yml` and is tested on ea
- role: robertdebock.atom
```
The machine may need to be prepared using `molecule/resources/prepare.yml`:
The machine needs to be prepared in CI this is done using `molecule/resources/prepare.yml`:
```yaml
---
- name: Prepare
@ -32,19 +32,6 @@ The machine may need to be prepared using `molecule/resources/prepare.yml`:
- 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)
@ -63,23 +50,22 @@ atom_apm_packages:
## [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.)
- pip packages listed in [requirements.txt](https://github.com/robertdebock/ansible-role-atom/blob/master/requirements.txt).
The following roles can be installed to ensure all requirements are met, using `ansible-galaxy install -r requirements.yml`:
## [Status of requirements](#status-of-requirements)
```yaml
---
- robertdebock.bootstrap
The following roles are used to prepare a system. You may choose to prepare your system in another way, I have tested these roles as well.
```
| Requirement | GitHub | GitLab |
|-------------|--------|--------|
| [robertdebock.bootstrap](https://galaxy.ansible.com/robertdebock/bootstrap) | [![Build Status GitHub](https://github.com/robertdebock/ansible-role-bootstrap/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-bootstrap/actions) | [![Build Status GitLab ](https://gitlab.com/robertdebock/ansible-role-ansible-role-bootstrap/badges/master/pipeline.svg)](https://gitlab.com/robertdebock/ansible-role-bootstrap)
## [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")
![dependencies](https://raw.githubusercontent.com/robertdebock/ansible-role-atom/png/requirements.png "Dependencies")
## [Compatibility](#compatibility)
@ -87,15 +73,15 @@ This role has been tested on these [container images](https://hub.docker.com/u/r
|container|tags|
|---------|----|
|el|7, 8|
|el|8|
|debian|buster|
|fedora|31, 32|
|fedora|all|
|opensuse|all|
|ubuntu|focal, bionic, xenial|
|ubuntu|focal, bionic|
The minimum version of Ansible required is 2.8 but tests have been done to:
The minimum version of Ansible required is 2.10, tests have been done to:
- The previous version, on version lower.
- The previous version.
- The current version.
- The development version.
@ -107,42 +93,11 @@ Some variarations of the build matrix do not work. These are the variations and
|---------------------------|------------------------|
| amazonlinux:1 | Package: atom ... Requires: libsecret-1.so.0 ... and ... polkit |
| debian:bullseye | An error occurred during the test sequence action: 'idempotence'. Cleaning up. |
| centos:7 | /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found |
## [Testing](#testing)
[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)
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

View File

@ -1,2 +0,0 @@
install_date: Mon Sep 28 13:21:59 2020
version: 2.5.1

View File

@ -1,6 +0,0 @@
---
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."

View File

@ -1,2 +0,0 @@
---
tox_parallel: yes

View File

@ -1,2 +1,2 @@
install_date: Mon Sep 28 13:21:59 2020
version: 2.5.1
install_date: Sun Mar 21 06:59:24 2021
version: 3.0.3

View File

@ -4,3 +4,5 @@ exceptions:
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."
- variation: centos:7
reason: "/lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found"

Some files were not shown because too many files have changed in this diff Show More