This repository was archived by the owner on Aug 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
fix agent install url for 3.20 and add tests #9
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4aaf295
fix agent install url for 3.20 and add tests
aknot242 0987de4
fix idempotency and add test
aknot242 f7bb9a7
adding survey to template
aknot242 c898b8e
remove trailing spaces
aknot242 5fb90fa
code review requested changes
aknot242 4cb4d55
remove unneeded linting ignore
aknot242 8bd0e4b
fix link
aknot242 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| --- | ||
| offline: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| --- | ||
| name: Bug report | ||
| about: Create a report to help us improve | ||
| title: '' | ||
| labels: '' | ||
| assignees: '' | ||
| --- | ||
| ### Describe the bug | ||
| A clear and concise description of what the bug is. | ||
|
|
||
| ### To reproduce | ||
| Steps to reproduce the behavior: | ||
| 1. Deploy NGINX Controller Agent role using playbook.yml | ||
| 2. View output/logs/configuration on '...' | ||
| 3. See error | ||
|
|
||
| ### Expected behavior | ||
| A clear and concise description of what you expected to happen. | ||
|
|
||
| ### Your environment: | ||
| - Version of the NGINX Controller Agent role or specific commit | ||
| - Version of Ansible | ||
| - Version of Jinja2 (if you are using any templating capability) | ||
| - Target deployment platform | ||
|
|
||
| ### Additional context | ||
| Add any other context about the problem here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| --- | ||
| name: Feature request | ||
| about: Suggest an idea for this project | ||
| title: '' | ||
| labels: '' | ||
| assignees: '' | ||
| --- | ||
| ### Is your feature request related to a problem? Please describe | ||
| A clear and concise description of what the problem is. Ex. I'm always frustrated when ... | ||
|
|
||
| ### Describe the solution you'd like | ||
| A clear and concise description of what you want to happen. | ||
|
|
||
| ### Describe alternatives you've considered | ||
| A clear and concise description of any alternative solutions or features you've considered. | ||
|
|
||
| ### Additional context | ||
| Add any other context or screenshots about the feature request here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # Security Policy | ||
|
|
||
| ## Supported Versions | ||
|
|
||
| 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). | ||
|
|
||
| ## Reporting a Vulnerability | ||
|
|
||
| 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). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| --- | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: "github-actions" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "daily" | ||
| - package-ecosystem: "pip" | ||
| directory: "/.github/workflows/requirements" | ||
| schedule: | ||
| interval: "daily" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| ### Proposed changes | ||
| 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). | ||
|
|
||
| ### Checklist | ||
| Before creating a PR, run through this checklist and mark each as complete. | ||
|
|
||
| - [ ] I have read the [CONTRIBUTING](https://github.com/nginxinc/ansible-role-nginx-controller-agent/blob/main/CONTRIBUTING.md) document | ||
| - [ ] I have added Molecule tests that prove my fix is effective or that my feature works | ||
| - [ ] I have checked that any relevant Molecule tests pass after adding my changes | ||
| - [ ] I have updated any relevant documentation (`defaults/main/*.yml`, `README.md` and `CHANGELOG.md`) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| --- | ||
| name-template: "$RESOLVED_VERSION" | ||
| tag-template: "$RESOLVED_VERSION" | ||
| categories: | ||
| - title: "💣 Breaking Changes" | ||
| labels: | ||
| - "breaking change" | ||
| - title: "🔔 Deprecation Warnings" | ||
| labels: | ||
| - "deprecation" | ||
| - title: "🚀 Features" | ||
| labels: | ||
| - "feature" | ||
| - title: "🎉 Enhancements" | ||
| labels: | ||
| - "enhancement" | ||
| - title: "🐛 Bug Fixes" | ||
| labels: | ||
| - "bug" | ||
| - title: "📝 Documentation" | ||
| labels: | ||
| - "documentation" | ||
| - title: "⬆️ Dependencies" | ||
| labels: | ||
| - "dependencies" | ||
| exclude-labels: | ||
| - "skip-changelog" | ||
| version-resolver: | ||
| minor: | ||
| labels: | ||
| - "breaking change" | ||
| - "deprecation" | ||
| patch: | ||
| labels: | ||
| - "bug" | ||
| - "dependencies" | ||
| - "documentation" | ||
| - "feature" | ||
| - "enhancement" | ||
| default: patch | ||
| autolabeler: | ||
| - label: "breaking change" | ||
| body: | ||
| - "/breaking/i" | ||
| - label: "deprecation" | ||
| branch: | ||
| - "/deprecate\/.+/" | ||
| title: | ||
| - "/deprecate/i" | ||
| - label: "feature" | ||
| branch: | ||
| - "/feat\/.+/" | ||
| - "/feature\/.+/" | ||
| - "/implement\/.+/" | ||
| title: | ||
| - "/feat/i" | ||
| - "/feature/i" | ||
| - "/implement/i" | ||
| - label: "enhancement" | ||
| branch: | ||
| - "/add\/.+/" | ||
| - "/enhancement\/.+/" | ||
| title: | ||
| - "/add/i" | ||
| - "/enhancement/i" | ||
| - label: "bug" | ||
| branch: | ||
| - "/fix\/.+/" | ||
| title: | ||
| - "/fix/i" | ||
| - label: "documentation" | ||
| branch: | ||
| - "/docs\/.+/" | ||
| files: | ||
| - "**/!(changelog).md" | ||
| title: | ||
| - "/docs/i" | ||
| - "/documentation/i" | ||
| - label: "dependencies" | ||
| files: | ||
| - ".github/workflows/requirements/*" | ||
| template: | | ||
| 👾 *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)!* 👾 | ||
|
|
||
| ## What's new in NGINX's Controller Agent Ansible role $RESOLVED_VERSION! | ||
|
|
||
| $CHANGES | ||
|
|
||
| ## Install & Upgrade | ||
|
|
||
| * To install the Ansible NGINX Controller Agent role on a fresh environment, run `ansible-galaxy install nginxinc.nginx_controller_agent`. | ||
| * To upgrade the Ansible NGINX Controller Agent role to the latest release, run `ansible-galaxy install -f nginxinc.nginx_controller_agent`. | ||
| * 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`. | ||
|
|
||
| ## Resources | ||
|
|
||
| * 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). | ||
| * Ansible Galaxy repository -- [galaxy.ansible.com/nginxinc/nginx_controller_agent](https://galaxy.ansible.com/nginxinc/nginx_controller_agent). | ||
| * NGINX: Better with Ansible demo -- [github.com/alessfg/nginx-ansible-demo](https://github.com/alessfg/nginx-ansible-demo). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| --- | ||
| name: Ansible Galaxy import | ||
| "on": | ||
| release: | ||
| types: | ||
| - published | ||
| jobs: | ||
| galaxy: | ||
| name: Galaxy | ||
| runs-on: ubuntu-20.04 | ||
| steps: | ||
| - name: Check out the codebase | ||
| uses: actions/checkout@v2.3.4 | ||
|
|
||
| - name: Set up Python 3 | ||
| uses: actions/setup-python@v2.2.2 | ||
| with: | ||
| python-version: 3.x | ||
|
|
||
| - name: Install Ansible | ||
| run: pip3 install -r .github/workflows/requirements/requirements_galaxy.txt | ||
|
|
||
| - name: Import release to Ansible Galaxy | ||
| run: ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| --- | ||
| name: Molecule CI/CD | ||
| "on": | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| push: | ||
| branches: | ||
| - main | ||
| ignore-tags: | ||
| - "*" | ||
| schedule: | ||
| - cron: "0 0 1 * *" | ||
| workflow_dispatch: | ||
| jobs: | ||
| molecule: | ||
| name: Molecule | ||
| runs-on: ubuntu-20.04 | ||
| strategy: | ||
| matrix: | ||
| scenario: | ||
| - default | ||
| steps: | ||
| - name: Check out the codebase | ||
| if: "!(matrix.scenario == 'default' && github.event.pull_request.head.repo.full_name != github.repository)" | ||
| uses: actions/checkout@v2.3.4 | ||
|
|
||
| - name: Set up Python 3 | ||
| if: "!(matrix.scenario == 'default' && github.event.pull_request.head.repo.full_name != github.repository)" | ||
| uses: actions/setup-python@v2.2.2 | ||
| with: | ||
| python-version: 3.x | ||
|
|
||
| - name: Install Molecule dependencies | ||
| if: "!(matrix.scenario == 'default' && github.event.pull_request.head.repo.full_name != github.repository)" | ||
| run: pip3 install -r .github/workflows/requirements/requirements_molecule.txt | ||
|
|
||
| - name: Install Ansible base dependencies | ||
| if: "!(contains(matrix.scenario, 'default') && github.event.pull_request.head.repo.full_name != github.repository)" | ||
| run: ansible-galaxy install -r .github/workflows/requirements/requirements_ansible.yml | ||
|
|
||
| - name: Run Molecule tests | ||
| if: "!(matrix.scenario == 'default' && github.event.pull_request.head.repo.full_name != github.repository)" | ||
| run: molecule test -s ${{ matrix.scenario }} | ||
| env: | ||
| PY_COLORS: "1" | ||
| ANSIBLE_FORCE_COLOR: "1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| --- | ||
| name: Release Drafter | ||
| "on": | ||
| pull_request: | ||
| types: | ||
| - opened | ||
| - reopened | ||
| - synchronize | ||
| push: | ||
| branches: | ||
| - main | ||
| jobs: | ||
| update_release_draft: | ||
| name: Update release draft | ||
| runs-on: ubuntu-20.04 | ||
| steps: | ||
| - uses: release-drafter/release-drafter@v5 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| --- | ||
| collections: | ||
| - name: community.docker | ||
| version: 1.7.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ansible-core==2.11.4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| ansible-core==2.11.4 | ||
| Jinja2==3.0.1 | ||
| ansible-lint==5.1.2 | ||
| yamllint==1.26.3 | ||
| molecule[docker]==3.4.0 | ||
| docker==5.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # Any private crt and keys # | ||
| ############################ | ||
| *.crt | ||
| *.key | ||
| *~ | ||
| \#* | ||
| !molecule.crt | ||
| !molecule.key | ||
|
|
||
| # OS Specific # | ||
| ############### | ||
| Thumbs.db | ||
| .DS_Store | ||
| .vscode | ||
|
|
||
| # Ansible specific # | ||
| #################### | ||
| .cache | ||
| *.retry | ||
|
|
||
| # Python specific # | ||
| ################### | ||
| __pycache__ | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # | ||
| # MockServer Dockerfile | ||
| # | ||
| # https://github.com/mock-server/mockserver | ||
| # http://www.mock-server.com | ||
| # | ||
|
|
||
| # build image | ||
| FROM alpine:3.12 | ||
|
|
||
| # download jar | ||
| RUN apk add --update openssl ca-certificates bash wget curl openrc python3 sudo openjdk11-jre | ||
| # REPOSITORY is releases or snapshots | ||
| ARG REPOSITORY=releases | ||
| # VERSION is LATEST or RELEASE or x.x.x | ||
| ARG VERSION=RELEASE | ||
| # see: https://oss.sonatype.org/nexus-restlet1x-plugin/default/docs/path__artifact_maven_redirect.html | ||
| ARG REPOSITORY_URL=https://oss.sonatype.org/service/local/artifact/maven/redirect?r=${REPOSITORY}&g=org.mock-server&a=mockserver-netty&c=jar-with-dependencies&e=jar&v=${VERSION} | ||
| RUN wget --max-redirect=10 -O mockserver-netty-jar-with-dependencies.jar "$REPOSITORY_URL" | ||
|
|
||
| # expose ports. | ||
| EXPOSE 1080 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| --- | ||
| - name: Converge | ||
| hosts: instances | ||
| tasks: | ||
| - name: Call Agent Role | ||
| include_role: | ||
| name: ansible-role-nginx-controller-agent | ||
| vars: | ||
| nginx_controller_fqdn: mock-server.molecule-test:1080 | ||
| nginx_controller_validate_certs: false | ||
| nginx_controller_api_key: "ABC123" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.