Skip to content

Commit 51160a7

Browse files
authored
Replace Ansible community distribution with Ansible base (#57)
1 parent 9e73dbc commit 51160a7

File tree

10 files changed

+62
-32
lines changed

10 files changed

+62
-32
lines changed

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ updates:
66
schedule:
77
interval: "daily"
88
- package-ecosystem: "pip"
9-
directory: "/.github/workflows"
9+
directory: "/.github/workflows/requirements"
1010
schedule:
1111
interval: "daily"

.github/workflows/galaxy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
python-version: 3.x
1919

2020
- name: Install Ansible
21-
run: pip3 install -r .github/workflows/requirements_galaxy.txt
21+
run: pip3 install -r .github/workflows/requirements/requirements_galaxy.txt
2222

2323
- name: Import release to Ansible Galaxy
2424
run: ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)

.github/workflows/molecule.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,15 @@ jobs:
3333

3434
- name: Install Molecule dependencies
3535
if: github.event.pull_request.head.repo.full_name == github.repository
36-
run: pip3 install -r .github/workflows/requirements_molecule.txt
36+
run: pip3 install -r .github/workflows/requirements/requirements_molecule.txt
37+
38+
- name: Install Ansible base dependencies
39+
if: github.event.pull_request.head.repo.full_name == github.repository
40+
run: ansible-galaxy install -r .github/workflows/requirements/requirements_ansible.yml
41+
42+
- name: Uninstall Ansible community distribution (temporary)
43+
if: github.event.pull_request.head.repo.full_name == github.repository
44+
run: pip3 uninstall -y ansible
3745

3846
- name: Run Molecule tests
3947
if: github.event.pull_request.head.repo.full_name == github.repository
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
collections:
3+
- name: community.general
4+
version: 2.0.1
5+
- name: ansible.posix
6+
version: 1.1.1
7+
- name: community.docker
8+
version: 1.2.0

.github/workflows/requirements_molecule.txt renamed to .github/workflows/requirements/requirements_molecule.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
ansible-base==2.10.5
2-
ansible==2.10.6
32
ansible-lint==4.3.7
43
yamllint==1.26.0
54
molecule[docker]==3.2.3

.gitignore

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,41 @@
1-
# OSX leaves these everywhere on SMB shares
2-
._*
3-
4-
# OSX trash
5-
.DS_Store
1+
# Any private crt and keys #
2+
############################
3+
*.crt
4+
*.key
5+
*.pem
6+
*~
7+
\#*
68

7-
# Eclipse files
9+
# Editor specific #
10+
###################
11+
.idea
12+
.vscode
813
.classpath
914
.project
1015
.settings/**
11-
12-
# Emacs save files
16+
## Emac
1317
*~
1418
\#*\#
1519
.\#*
16-
17-
# Vim-related files
20+
## Vim
1821
[._]*.s[a-w][a-z]
1922
[._]s[a-w][a-z]
2023
*.un~
2124
Session.vim
2225
.netrwhist
2326

24-
# NGINX Plus license files
25-
*.crt
26-
*.key
27-
28-
# Visual Studio Code settings
29-
.vscode
30-
31-
# Default certificate and key
32-
default.pem
27+
# OS Specific #
28+
###############
29+
Thumbs.db
30+
.DS_Store
31+
._*
32+
scratch/
3333

34-
# IntelliJ IDEA
35-
.idea
34+
# Ansible specific #
35+
####################
36+
.cache
37+
*.retry
3638

37-
# Scratch Directory
38-
scratch/
39+
# Python specific #
40+
###################
41+
__pycache__

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44

55
FEATURES:
66

7-
Add support for Dependabot.
7+
* Replace Ansible community distribution with Ansible base and add the necessary extra collections as a dependency requirement. For reference, these are:
8+
* `community.general`
9+
* `ansible.posix`
10+
* Add support for Dependabot.
811

912
ENHANCEMENTS:
1013

11-
* Update Ansible base to `2.10.5`, Ansible to `2.10.6`, Molecule to `3.2.3` and yamllint to `1.26.0`.
14+
* Update Ansible base to `2.10.5`, Molecule to `3.2.3` and yamllint to `1.26.0`.
1215
* Specify GitHub actions Ubuntu release.
1316
* Minor GitHub template tweaks, including the creation of a SECURITY doc.
1417
* Only run GitHub actions Galaxy CI/CD workflow when a new release is published.

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,17 @@ This role installs and configures NGINX App Protect (WAF) for NGINX Plus on your
1414

1515
### Ansible
1616

17-
* This role is developed and tested with [maintained](https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#release-status) versions of Ansible. Backwards compatibility is not guaranteed.
18-
* Instructions on how to install Ansible can be found in the [Ansible website](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html).
17+
* This role is developed and tested with [maintained](https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html) versions of Ansible base. When using Ansible base, you will also need to install the following collections:
18+
```yaml
19+
---
20+
collections:
21+
- name: community.general
22+
version: 2.0.0
23+
- name: ansible.posix
24+
version: 1.1.1
25+
```
26+
**Note:** You can alternatively install the Ansible community distribution if you don't want to manage individual collections.
27+
* Instructions on how to install Ansible can be found in the [Ansible website](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#upgrading-ansible-from-version-2-9-and-older-to-version-2-10-or-later).
1928
2029
### Molecule
2130

meta/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ galaxy_info:
77

88
license: Apache License, Version 2.0
99

10-
min_ansible_version: 2.9
10+
min_ansible_version: 2.10
1111

1212
platforms:
1313
- name: EL

0 commit comments

Comments
 (0)