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:
|
||||
- '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
|
||||
exemptLabels:
|
||||
- bug
|
||||
- pinned
|
||||
- security
|
||||
- planned
|
||||
|
|
|
@ -29,12 +29,11 @@ jobs:
|
|||
python-version: '3.x'
|
||||
|
||||
- name: Install test dependencies.
|
||||
run: pip3 install yamllint ansible-lint
|
||||
run: pip3 install yamllint
|
||||
|
||||
- name: Lint code.
|
||||
run: |
|
||||
yamllint .
|
||||
ansible-lint
|
||||
|
||||
molecule:
|
||||
name: Molecule
|
||||
|
@ -42,18 +41,17 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- distro: centos8
|
||||
- distro: rockylinux8
|
||||
playbook: converge.yml
|
||||
- distro: fedora32
|
||||
- distro: fedora33
|
||||
playbook: converge.yml
|
||||
- distro: ubuntu2004
|
||||
playbook: converge.yml
|
||||
# See: https://github.com/geerlingguy/ansible-role-ansible/issues/18
|
||||
# - distro: ubuntu2004
|
||||
# playbook: converge.yml
|
||||
- distro: ubuntu1804
|
||||
playbook: converge.yml
|
||||
- distro: debian10
|
||||
playbook: converge.yml
|
||||
- distro: centos8
|
||||
- distro: rockylinux8
|
||||
playbook: pip.yml
|
||||
|
||||
steps:
|
||||
|
|
|
@ -32,7 +32,9 @@ jobs:
|
|||
python-version: '3.x'
|
||||
|
||||
- name: Install Ansible.
|
||||
run: pip3 install ansible-base
|
||||
run: pip3 install ansible-core
|
||||
|
||||
- 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
|
||||
*/__pycache__
|
||||
*.pyc
|
||||
.cache
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ An Ansible Role that installs Ansible on Linux servers.
|
|||
|
||||
## 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
|
||||
|
||||
|
@ -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.
|
||||
|
||||
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
|
||||
|
||||
None.
|
||||
|
@ -38,6 +42,7 @@ Install from pip:
|
|||
vars:
|
||||
ansible_install_method: pip
|
||||
ansible_install_version_pip: "2.7.0"
|
||||
ansible_install_pip_extra_args: "--user"
|
||||
roles:
|
||||
- role: geerlingguy.pip
|
||||
- role: geerlingguy.ansible
|
||||
|
|
|
@ -6,3 +6,6 @@ ansible_install_method: package
|
|||
|
||||
# Used only if ansible_install_method is 'pip'. If empty, defaults to latest.
|
||||
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:
|
||||
name: galaxy
|
||||
driver:
|
||||
|
@ -8,7 +9,8 @@ platforms:
|
|||
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
|
||||
command: ${MOLECULE_DOCKER_COMMAND:-""}
|
||||
volumes:
|
||||
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||
- /sys/fs/cgroup:/sys/fs/cgroup:rw
|
||||
cgroupns_mode: host
|
||||
privileged: true
|
||||
pre_build_image: true
|
||||
provisioner:
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
vars:
|
||||
ansible_install_method: pip
|
||||
ansible_install_version_pip: "2.6.2"
|
||||
ansible_install_pip_extra_args: "--user"
|
||||
|
||||
roles:
|
||||
- role: geerlingguy.pip
|
||||
|
|
|
@ -3,3 +3,4 @@
|
|||
pip:
|
||||
name: ansible
|
||||
version: "{{ ansible_install_version_pip | default(omit) }}"
|
||||
extra_args: "{{ ansible_install_pip_extra_args | default(omit) }}"
|
||||
|
|
Loading…
Reference in a new issue