Rolle aktualisiert: ansible (#466)
Co-authored-by: Michael Grote <michael.grote@posteo.de> Reviewed-on: #466
This commit is contained in:
parent
791b2adac5
commit
4098803311
10 changed files with 29 additions and 13 deletions
|
@ -1,2 +1,3 @@
|
||||||
skip_list:
|
skip_list:
|
||||||
- '106'
|
- 'yaml'
|
||||||
|
- 'role-name'
|
||||||
|
|
1
roles/geerlingguy.ansible/.github/stale.yml
vendored
1
roles/geerlingguy.ansible/.github/stale.yml
vendored
|
@ -12,6 +12,7 @@ onlyLabels: []
|
||||||
|
|
||||||
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
|
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
|
||||||
exemptLabels:
|
exemptLabels:
|
||||||
|
- bug
|
||||||
- pinned
|
- pinned
|
||||||
- security
|
- security
|
||||||
- planned
|
- planned
|
||||||
|
|
|
@ -29,12 +29,11 @@ jobs:
|
||||||
python-version: '3.x'
|
python-version: '3.x'
|
||||||
|
|
||||||
- name: Install test dependencies.
|
- name: Install test dependencies.
|
||||||
run: pip3 install yamllint ansible-lint
|
run: pip3 install yamllint
|
||||||
|
|
||||||
- name: Lint code.
|
- name: Lint code.
|
||||||
run: |
|
run: |
|
||||||
yamllint .
|
yamllint .
|
||||||
ansible-lint
|
|
||||||
|
|
||||||
molecule:
|
molecule:
|
||||||
name: Molecule
|
name: Molecule
|
||||||
|
@ -42,18 +41,17 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- distro: centos8
|
- distro: rockylinux8
|
||||||
playbook: converge.yml
|
playbook: converge.yml
|
||||||
- distro: fedora32
|
- distro: fedora33
|
||||||
|
playbook: converge.yml
|
||||||
|
- distro: ubuntu2004
|
||||||
playbook: converge.yml
|
playbook: converge.yml
|
||||||
# See: https://github.com/geerlingguy/ansible-role-ansible/issues/18
|
|
||||||
# - distro: ubuntu2004
|
|
||||||
# playbook: converge.yml
|
|
||||||
- distro: ubuntu1804
|
- distro: ubuntu1804
|
||||||
playbook: converge.yml
|
playbook: converge.yml
|
||||||
- distro: debian10
|
- distro: debian10
|
||||||
playbook: converge.yml
|
playbook: converge.yml
|
||||||
- distro: centos8
|
- distro: rockylinux8
|
||||||
playbook: pip.yml
|
playbook: pip.yml
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
|
@ -32,7 +32,9 @@ jobs:
|
||||||
python-version: '3.x'
|
python-version: '3.x'
|
||||||
|
|
||||||
- name: Install Ansible.
|
- name: Install Ansible.
|
||||||
run: pip3 install ansible-base
|
run: pip3 install ansible-core
|
||||||
|
|
||||||
- name: Trigger a new import on Galaxy.
|
- name: Trigger a new import on Galaxy.
|
||||||
run: ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)
|
run: >-
|
||||||
|
ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }}
|
||||||
|
$(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)
|
||||||
|
|
2
roles/geerlingguy.ansible/.gitignore
vendored
2
roles/geerlingguy.ansible/.gitignore
vendored
|
@ -1,3 +1,5 @@
|
||||||
*.retry
|
*.retry
|
||||||
*/__pycache__
|
*/__pycache__
|
||||||
*.pyc
|
*.pyc
|
||||||
|
.cache
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ An Ansible Role that installs Ansible on Linux servers.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
If using on a RedHat/CentOS-based host, make sure you've added the EPEL repository (it can easily be installed by including the `geerlingguy.repo-epel` role on Ansible Galaxy).
|
If using on a RedHat/CentOS/Rocky Linux-based host, make sure you've added the EPEL repository (it can easily be installed by including the `geerlingguy.repo-epel` role on Ansible Galaxy).
|
||||||
|
|
||||||
## Role Variables
|
## Role Variables
|
||||||
|
|
||||||
|
@ -20,6 +20,10 @@ Whether to install Ansible via the system `package` manager (`apt`, `yum`, `dnf`
|
||||||
|
|
||||||
If `ansible_install_method` is set to `pip`, the specific Ansible version to be installed via Pip. If not set, the latest version of Ansible will be installed.
|
If `ansible_install_method` is set to `pip`, the specific Ansible version to be installed via Pip. If not set, the latest version of Ansible will be installed.
|
||||||
|
|
||||||
|
ansible_install_pip_extra_args: ''
|
||||||
|
|
||||||
|
If `ansible_install_method` is set to `pip`, the extra arguments to be given to `pip` are listed here. If not set, no extra arguments are given.
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
None.
|
None.
|
||||||
|
@ -38,6 +42,7 @@ Install from pip:
|
||||||
vars:
|
vars:
|
||||||
ansible_install_method: pip
|
ansible_install_method: pip
|
||||||
ansible_install_version_pip: "2.7.0"
|
ansible_install_version_pip: "2.7.0"
|
||||||
|
ansible_install_pip_extra_args: "--user"
|
||||||
roles:
|
roles:
|
||||||
- role: geerlingguy.pip
|
- role: geerlingguy.pip
|
||||||
- role: geerlingguy.ansible
|
- role: geerlingguy.ansible
|
||||||
|
|
|
@ -6,3 +6,6 @@ ansible_install_method: package
|
||||||
|
|
||||||
# Used only if ansible_install_method is 'pip'. If empty, defaults to latest.
|
# Used only if ansible_install_method is 'pip'. If empty, defaults to latest.
|
||||||
ansible_install_version_pip: ''
|
ansible_install_version_pip: ''
|
||||||
|
|
||||||
|
# Which extra arguments should be gived to pip
|
||||||
|
ansible_install_pip_extra_args: ''
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
role_name_check: 1
|
||||||
dependency:
|
dependency:
|
||||||
name: galaxy
|
name: galaxy
|
||||||
driver:
|
driver:
|
||||||
|
@ -8,7 +9,8 @@ platforms:
|
||||||
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
|
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
|
||||||
command: ${MOLECULE_DOCKER_COMMAND:-""}
|
command: ${MOLECULE_DOCKER_COMMAND:-""}
|
||||||
volumes:
|
volumes:
|
||||||
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
- /sys/fs/cgroup:/sys/fs/cgroup:rw
|
||||||
|
cgroupns_mode: host
|
||||||
privileged: true
|
privileged: true
|
||||||
pre_build_image: true
|
pre_build_image: true
|
||||||
provisioner:
|
provisioner:
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
vars:
|
vars:
|
||||||
ansible_install_method: pip
|
ansible_install_method: pip
|
||||||
ansible_install_version_pip: "2.6.2"
|
ansible_install_version_pip: "2.6.2"
|
||||||
|
ansible_install_pip_extra_args: "--user"
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- role: geerlingguy.pip
|
- role: geerlingguy.pip
|
||||||
|
|
|
@ -3,3 +3,4 @@
|
||||||
pip:
|
pip:
|
||||||
name: ansible
|
name: ansible
|
||||||
version: "{{ ansible_install_version_pip | default(omit) }}"
|
version: "{{ ansible_install_version_pip | default(omit) }}"
|
||||||
|
extra_args: "{{ ansible_install_pip_extra_args | default(omit) }}"
|
||||||
|
|
Loading…
Reference in a new issue