Skip to content
This repository was archived by the owner on Aug 9, 2022. It is now read-only.

Commit 5a20dc5

Browse files
authored
Merge pull request #9 from nginxinc/fix-agent-install-url
fix agent install url for 3.20 and add tests
2 parents 18edf2c + 8bd0e4b commit 5a20dc5

26 files changed

+464
-60
lines changed

.ansible-lint

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
offline: true
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
### Describe the bug
9+
A clear and concise description of what the bug is.
10+
11+
### To reproduce
12+
Steps to reproduce the behavior:
13+
1. Deploy NGINX Controller Agent role using playbook.yml
14+
2. View output/logs/configuration on '...'
15+
3. See error
16+
17+
### Expected behavior
18+
A clear and concise description of what you expected to happen.
19+
20+
### Your environment:
21+
- Version of the NGINX Controller Agent role or specific commit
22+
- Version of Ansible
23+
- Version of Jinja2 (if you are using any templating capability)
24+
- Target deployment platform
25+
26+
### Additional context
27+
Add any other context about the problem here.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
### Is your feature request related to a problem? Please describe
9+
A clear and concise description of what the problem is. Ex. I'm always frustrated when ...
10+
11+
### Describe the solution you'd like
12+
A clear and concise description of what you want to happen.
13+
14+
### Describe alternatives you've considered
15+
A clear and concise description of any alternative solutions or features you've considered.
16+
17+
### Additional context
18+
Add any other context or screenshots about the feature request here.

.github/SECURITY.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
This role mainly consists of Ansible tasks. Ansible applies security fixes to the most recent three releases. Please find more information in [the Ansible docs](https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html#release-status).
6+
7+
## Reporting a Vulnerability
8+
9+
If you find a security vulnerability that affects Ansible, we encourage you to report it according to the [Ansible guidelines](https://docs.ansible.com/ansible/devel/community/reporting_bugs_and_features.html#reporting-a-bug).

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "daily"
8+
- package-ecosystem: "pip"
9+
directory: "/.github/workflows/requirements"
10+
schedule:
11+
interval: "daily"

.github/pull_request_template.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
### Proposed changes
2+
Describe the use case and detail of the change. If this PR addresses an issue on GitHub, make sure to include a link to that issue using one of the [supported keywords](https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue) here in this description (not in the title of the PR).
3+
4+
### Checklist
5+
Before creating a PR, run through this checklist and mark each as complete.
6+
7+
- [ ] I have read the [CONTRIBUTING](https://github.com/nginxinc/ansible-role-nginx-controller-agent/blob/main/CONTRIBUTING.md) document
8+
- [ ] I have added Molecule tests that prove my fix is effective or that my feature works
9+
- [ ] I have checked that any relevant Molecule tests pass after adding my changes
10+
- [ ] I have updated any relevant documentation (`defaults/main/*.yml`, `README.md` and `CHANGELOG.md`)

.github/release-drafter.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
---
2+
name-template: "$RESOLVED_VERSION"
3+
tag-template: "$RESOLVED_VERSION"
4+
categories:
5+
- title: "💣 Breaking Changes"
6+
labels:
7+
- "breaking change"
8+
- title: "🔔 Deprecation Warnings"
9+
labels:
10+
- "deprecation"
11+
- title: "🚀 Features"
12+
labels:
13+
- "feature"
14+
- title: "🎉 Enhancements"
15+
labels:
16+
- "enhancement"
17+
- title: "🐛 Bug Fixes"
18+
labels:
19+
- "bug"
20+
- title: "📝 Documentation"
21+
labels:
22+
- "documentation"
23+
- title: "⬆️ Dependencies"
24+
labels:
25+
- "dependencies"
26+
exclude-labels:
27+
- "skip-changelog"
28+
version-resolver:
29+
minor:
30+
labels:
31+
- "breaking change"
32+
- "deprecation"
33+
patch:
34+
labels:
35+
- "bug"
36+
- "dependencies"
37+
- "documentation"
38+
- "feature"
39+
- "enhancement"
40+
default: patch
41+
autolabeler:
42+
- label: "breaking change"
43+
body:
44+
- "/breaking/i"
45+
- label: "deprecation"
46+
branch:
47+
- "/deprecate\/.+/"
48+
title:
49+
- "/deprecate/i"
50+
- label: "feature"
51+
branch:
52+
- "/feat\/.+/"
53+
- "/feature\/.+/"
54+
- "/implement\/.+/"
55+
title:
56+
- "/feat/i"
57+
- "/feature/i"
58+
- "/implement/i"
59+
- label: "enhancement"
60+
branch:
61+
- "/add\/.+/"
62+
- "/enhancement\/.+/"
63+
title:
64+
- "/add/i"
65+
- "/enhancement/i"
66+
- label: "bug"
67+
branch:
68+
- "/fix\/.+/"
69+
title:
70+
- "/fix/i"
71+
- label: "documentation"
72+
branch:
73+
- "/docs\/.+/"
74+
files:
75+
- "**/!(changelog).md"
76+
title:
77+
- "/docs/i"
78+
- "/documentation/i"
79+
- label: "dependencies"
80+
files:
81+
- ".github/workflows/requirements/*"
82+
template: |
83+
👾 *Help make the NGINX Controller Agent Ansible role better by participating in our [survey](https://forms.office.com/Pages/ResponsePage.aspx?id=L_093Ttq0UCb4L-DJ9gcUKLQ7uTJaE1PitM_37KR881UM0NCWkY5UlE5MUYyWU1aTUcxV0NRUllJSC4u)!* 👾
84+
85+
## What's new in NGINX's Controller Agent Ansible role $RESOLVED_VERSION!
86+
87+
$CHANGES
88+
89+
## Install & Upgrade
90+
91+
* To install the Ansible NGINX Controller Agent role on a fresh environment, run `ansible-galaxy install nginxinc.nginx_controller_agent`.
92+
* To upgrade the Ansible NGINX Controller Agent role to the latest release, run `ansible-galaxy install -f nginxinc.nginx_controller_agent`.
93+
* To install or upgrade to this specific Ansible NGINX Controller Agent role release ($RESOLVED_VERSION), run `ansible-galaxy install -f nginxinc.nginx_controller_agent,v$RESOLVED_VERSION`.
94+
95+
## Resources
96+
97+
* Functional configuration examples (check `converge.yml` under each `molecule` scenario) -- [github.com/nginxinc/ansible-role-nginx-controller-agent/tree/$RESOLVED_VERSION/molecule](https://github.com/nginxinc/ansible-role-nginx-controller-agent/tree/$RESOLVED_VERSION/molecule).
98+
* Ansible Galaxy repository -- [galaxy.ansible.com/nginxinc/nginx_controller_agent](https://galaxy.ansible.com/nginxinc/nginx_controller_agent).
99+
* NGINX: Better with Ansible demo -- [github.com/alessfg/nginx-ansible-demo](https://github.com/alessfg/nginx-ansible-demo).

.github/workflows/galaxy.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Ansible Galaxy import
3+
"on":
4+
release:
5+
types:
6+
- published
7+
jobs:
8+
galaxy:
9+
name: Galaxy
10+
runs-on: ubuntu-20.04
11+
steps:
12+
- name: Check out the codebase
13+
uses: actions/checkout@v2.3.4
14+
15+
- name: Set up Python 3
16+
uses: actions/setup-python@v2.2.2
17+
with:
18+
python-version: 3.x
19+
20+
- name: Install Ansible
21+
run: pip3 install -r .github/workflows/requirements/requirements_galaxy.txt
22+
23+
- name: Import release to Ansible Galaxy
24+
run: ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)

.github/workflows/molecule.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
name: Molecule CI/CD
3+
"on":
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
ignore-tags:
11+
- "*"
12+
schedule:
13+
- cron: "0 0 1 * *"
14+
workflow_dispatch:
15+
jobs:
16+
molecule:
17+
name: Molecule
18+
runs-on: ubuntu-20.04
19+
strategy:
20+
matrix:
21+
scenario:
22+
- default
23+
steps:
24+
- name: Check out the codebase
25+
if: "!(matrix.scenario == 'default' && github.event.pull_request.head.repo.full_name != github.repository)"
26+
uses: actions/checkout@v2.3.4
27+
28+
- name: Set up Python 3
29+
if: "!(matrix.scenario == 'default' && github.event.pull_request.head.repo.full_name != github.repository)"
30+
uses: actions/setup-python@v2.2.2
31+
with:
32+
python-version: 3.x
33+
34+
- name: Install Molecule dependencies
35+
if: "!(matrix.scenario == 'default' && github.event.pull_request.head.repo.full_name != github.repository)"
36+
run: pip3 install -r .github/workflows/requirements/requirements_molecule.txt
37+
38+
- name: Install Ansible base dependencies
39+
if: "!(contains(matrix.scenario, 'default') && 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: Run Molecule tests
43+
if: "!(matrix.scenario == 'default' && github.event.pull_request.head.repo.full_name != github.repository)"
44+
run: molecule test -s ${{ matrix.scenario }}
45+
env:
46+
PY_COLORS: "1"
47+
ANSIBLE_FORCE_COLOR: "1"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Release Drafter
3+
"on":
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- synchronize
9+
push:
10+
branches:
11+
- main
12+
jobs:
13+
update_release_draft:
14+
name: Update release draft
15+
runs-on: ubuntu-20.04
16+
steps:
17+
- uses: release-drafter/release-drafter@v5
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)