Skip to content

Commit 07cb5f0

Browse files
committed
Update NGINX Ansible collection to v0.4.0
1 parent bdd5cf3 commit 07cb5f0

21 files changed

+381
-314
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,30 @@ about: Create a report to help us improve
44
title: ''
55
labels: ''
66
assignees: ''
7-
87
---
8+
### Describe the bug
99

10-
**Describe the bug**
1110
A clear and concise description of what the bug is.
1211

13-
**To reproduce**
12+
### To reproduce
13+
1414
Steps to reproduce the behavior:
15+
1516
1. Deploy NGINX collection using playbook.yml
1617
2. View output/logs/configuration on '...'
1718
3. See error
1819

19-
**Expected behavior**
20+
### Expected behavior
21+
2022
A clear and concise description of what you expected to happen.
2123

22-
**Your environment:**
23-
- Version of the NGINX collection or specific commit
24-
- Version of Ansible
25-
- Target deployment platform
24+
### Your environment
25+
26+
- Version of the NGINX collection or specific commit
27+
- Version of Ansible
28+
- Version of Jinja2 (if you are using any templating capability)
29+
- Target deployment platform
30+
31+
### Additional context
2632

27-
**Additional context**
2833
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,19 @@ about: Suggest an idea for this project
44
title: ''
55
labels: ''
66
assignees: ''
7-
87
---
8+
### Is your feature request related to a problem? Please describe
9+
10+
A clear and concise description of what the problem is. Ex. I'm always frustrated when ...
911

10-
**Is your feature request related to a problem? Please describe.**
11-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
### Describe the solution you'd like
1213

13-
**Describe the solution you'd like**
1414
A clear and concise description of what you want to happen.
1515

16-
**Describe alternatives you've considered**
16+
### Describe alternatives you've considered
17+
1718
A clear and concise description of any alternative solutions or features you've considered.
1819

19-
**Additional context**
20+
### Additional context
21+
2022
Add any other context or screenshots about the feature request here.

.github/pull_request_template.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
### Proposed changes
2+
23
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).
34

45
### Checklist
6+
57
Before creating a PR, run through this checklist and mark each as complete.
68

7-
- [ ] I have read the [CONTRIBUTING](https://github.com/nginxinc/ansible-collection-nginx/blob/main/CONTRIBUTING.md) document
8-
- [ ] I have updated any relevant documentation (`README.md` and `CHANGELOG.md`)
9+
- [ ] I have read the [CONTRIBUTING](https://github.com/nginxinc/ansible-collection-nginx/blob/main/CONTRIBUTING.md) document
10+
- [ ] I have updated any relevant documentation (`README.md` and `CHANGELOG.md`)

.gitignore

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,17 @@ Thumbs.db
1313

1414
# Ansible specific #
1515
####################
16+
.cache
1617
*.retry
1718

18-
# Ansible collection build artifacts #
19-
######################################
20-
*.tar.gz
19+
# Ansible collection specific #
20+
###############################
21+
nginxinc-nginx_core-*.tar.gz
2122

2223
# Python specific #
2324
###################
2425
__pycache__
26+
27+
# Logs #
28+
########
29+
*.log

.yamllint

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ rules:
1010
level: error
1111
comments-indentation: disable
1212
line-length: disable
13-
truthy: disable

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# CHANGELOG
22

3+
## 0.4.0 (October 28, 2021)
4+
5+
Update `nginx` role to `0.21.3`, `nginx_config` role to `0.4.2`, and `nginx_app_protect` role to `0.7.0`. Check each role's respective CHANGELOG to see what's changed since the latest NGINX collection release:
6+
7+
* Ansible NGINX role's [changelog](https://github.com/nginxinc/ansible-role-nginx/blob/0.21.3/CHANGELOG.md)
8+
* Ansible NGINX config role's [changelog](https://github.com/nginxinc/ansible-role-nginx-config/blob/0.4.2/CHANGELOG.md)
9+
* Ansible NGINX App Protect role's [changelog](https://github.com/nginxinc/ansible-role-nginx-app-protect/blob/0.7.0/CHANGELOG.md)
10+
311
## 0.3.0 (January 11, 2021)
412

513
Update `nginx` role to `0.19.1`, `nginx_config` role to `0.3.2`, and `nginx_app_protect` role to `0.4.2`. Check each role's respective CHANGELOG to see what's changed since the latest NGINX collection release.

CODE_OF_CONDUCT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ members of the project's leadership.
6868
## Attribution
6969

7070
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71-
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
71+
available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>
7272

7373
[homepage]: https://www.contributor-covenant.org
7474

7575
For answers to common questions about this code of conduct, see
76-
https://www.contributor-covenant.org/faq
76+
<https://www.contributor-covenant.org/faq>

CONTRIBUTING.md

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ The following is a set of guidelines for contributing to the NGINX Ansible colle
1111
[Contributing](#contributing)
1212

1313
[Code Guidelines](#code-guidelines)
14-
* [Git Guidelines](#git-guidelines)
15-
* [Ansible Guidelines](#ansible-guidelines)
14+
15+
* [Git Guidelines](#git-guidelines)
16+
* [Ansible Guidelines](#ansible-guidelines)
1617

1718
[Code of Conduct](ttps://github.com/nginxinc/ansible-collection-nginx/blob/main/CODE_OF_CONDUCT.md)
1819

@@ -26,10 +27,10 @@ Follow our [Installation Guide](https://github.com/nginxinc/ansible-collection-n
2627

2728
### Project Structure
2829

29-
* The NGINX Ansible collection is written in `yaml` and supports NGINX Open Source, NGINX Plus and NGINX App Protect.
30-
* The project follows the standard [Ansible collection directory structure](https://docs.ansible.com/ansible/latest/dev_guide/developing_collections.html):
31-
* The main code is found at `roles/` (do note that all roles are Git submodules).
32-
* Sample playbooks and instructions can be found at `docs/`.
30+
* The NGINX Ansible collection is written in `yaml` and supports NGINX Open Source, NGINX Plus and NGINX App Protect.
31+
* The project follows the standard [Ansible collection directory structure](https://docs.ansible.com/ansible/latest/dev_guide/developing_collections.html):
32+
* The main code is found at `roles/` (do note that all roles are Git submodules).
33+
* Sample playbooks and instructions can be found at `docs/`.
3334

3435
## Contributing
3536

@@ -43,27 +44,27 @@ To suggest an enhancement, please create an issue on GitHub with the label `enha
4344

4445
### Open a Pull Request
4546

46-
* Fork the repo, create a branch, submit a PR when your changes are **tested** and ready for review.
47-
* Fill in [our pull request template](https://github.com/nginxinc/ansible-collection-nginx/blob/main/.github/PULL_REQUEST_TEMPLATE.md).
47+
* Fork the repo, create a branch, submit a PR when your changes are **tested** and ready for review.
48+
* Fill in [our pull request template](https://github.com/nginxinc/ansible-collection-nginx/blob/main/.github/PULL_REQUEST_TEMPLATE.md).
4849

49-
Note: if youd like to implement a new feature, please consider creating a feature request issue first to start a discussion about the feature.
50+
Note: if you'd like to implement a new feature, please consider creating a feature request issue first to start a discussion about the feature.
5051

5152
## Code Guidelines
5253

5354
### Ansible Guidelines
5455

55-
* Run `molecule lint` over your code to automatically resolve a lot of `yaml` and Ansible style issues.
56-
* Run `molecule test --all` on your code to catch any other issues.
57-
* Follow these guides on some good practices for Ansible:
58-
* <https://www.ansible.com/blog/ansible-best-practices-essentials>
59-
* <https://docs.ansible.com/ansible/latest/user_guide/playbooks_best_practices.html>
56+
* Run `molecule lint` over your code to automatically resolve a lot of `yaml` and Ansible style issues.
57+
* Run `molecule test --all` on your code to catch any other issues.
58+
* Follow these guides on some good practices for Ansible:
59+
* <https://www.ansible.com/blog/ansible-best-practices-essentials>
60+
* <https://docs.ansible.com/ansible/latest/user_guide/playbooks_best_practices.html>
6061

6162
### Git Guidelines
6263

63-
* Keep a clean, concise and meaningful git commit history on your branch (within reason), rebasing locally and squashing before submitting a PR
64-
* Follow the guidelines of writing a good commit message as described here <https://chris.beams.io/posts/git-commit/> and summarized in the next few points:
65-
* In the subject line, use the present tense ("Add feature" not "Added feature").
66-
* In the subject line, use the imperative mood ("Move cursor to..." not "Moves cursor to...").
67-
* Limit the subject line to 72 characters or less.
68-
* Reference issues and pull requests liberally after the subject line.
69-
* Add more detailed description in the body of the git message (`git commit -a` to give you more space and time in your text editor to write a good message instead of `git commit -am`).
64+
* Keep a clean, concise and meaningful git commit history on your branch (within reason), rebasing locally and squashing before submitting a PR
65+
* Follow the guidelines of writing a good commit message as described here <https://chris.beams.io/posts/git-commit/> and summarized in the next few points:
66+
* In the subject line, use the present tense ("Add feature" not "Added feature").
67+
* In the subject line, use the imperative mood ("Move cursor to..." not "Moves cursor to...").
68+
* Limit the subject line to 72 characters or less.
69+
* Reference issues and pull requests liberally after the subject line.
70+
* Add more detailed description in the body of the git message (`git commit -a` to give you more space and time in your text editor to write a good message instead of `git commit -am`).

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ The Ansible NGINX collection includes a variety of NGINX Ansible roles to help a
1111

1212
## Included Content
1313

14-
The current stable release (`0.3.0`) of the Ansible NGINX collection includes the following roles:
14+
The current stable release (`0.4.0`) of the Ansible NGINX collection includes the following roles:
1515

1616
|Name|Description|Version|
1717
|----|-----------|-------|
18-
|[nginxinc.nginx](https://github.com/nginxinc/ansible-role-nginx)|Install NGINX|0.19.1|
19-
|[nginxinc.nginx_config](https://github.com/nginxinc/ansible-role-nginx-config)|Configure NGINX|0.3.2|
20-
|[nginxinc.nginx_app_protect](https://github.com/nginxinc/ansible-role-nginx-app-protect)|Install and configure NGINX App Protect|0.4.2|
18+
|[nginxinc.nginx](https://github.com/nginxinc/ansible-role-nginx)|Install NGINX|0.21.3|
19+
|[nginxinc.nginx_config](https://github.com/nginxinc/ansible-role-nginx-config)|Configure NGINX|0.4.2|
20+
|[nginxinc.nginx_app_protect](https://github.com/nginxinc/ansible-role-nginx-app-protect)|Install and configure NGINX App Protect|0.7.0|
2121

2222
## Requirements
2323

24-
This collection has been developed and tested with [maintained](https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#release-status) versions of Ansible bigger than `2.9.10`. Backwards compatibility is not guaranteed.
24+
This collection has been developed and tested with [maintained](https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#release-status) versions of Ansible bigger than `2.11`. Backwards compatibility is not guaranteed.
2525

2626
Instructions on how to install Ansible can be found in the [Ansible website](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html).
2727

@@ -37,7 +37,7 @@ You can also include the collection in a `requirements.yml` file and install it
3737
---
3838
collections:
3939
- name: nginxinc.nginx_core
40-
version: 0.3.0
40+
version: 0.4.0
4141
```
4242
4343
### Git
@@ -52,11 +52,11 @@ Sample playbooks for each use case covered by this collection can be found in th
5252
|----|-----------|
5353
|**[`deploy-nginx.yml`](https://github.com/nginxinc/ansible-collection-nginx/blob/main/playbooks/deploy-nginx.yml)**|Install NGINX|
5454
|**[`deploy-nginx-plus.yml`](https://github.com/nginxinc/ansible-collection-nginx/blob/main/playbooks/deploy-nginx-plus.yml)**|Install NGINX Plus|
55-
|**[`deploy-nginx-app-protect.yml`](https://github.com/nginxinc/ansible-collection-nginx/blob/main/playbooks/deploy-nginx-app-protect.yml)**|Install NGINX App Protect|
56-
|**[`deploy-nginx-plus-app-protect.yml`](https://github.com/nginxinc/ansible-collection-nginx/blob/main/playbooks/deploy-nginx-plus-app-protect.yml)**|Install NGINX Plus and NGINX App Protect|
55+
|**[`deploy-nginx-app-protect.yml`](https://github.com/nginxinc/ansible-collection-nginx/blob/main/playbooks/deploy-nginx-app-protect.yml)**|Install NGINX App Protect WAF/DoS|
56+
|**[`deploy-nginx-plus-app-protect.yml`](https://github.com/nginxinc/ansible-collection-nginx/blob/main/playbooks/deploy-nginx-plus-app-protect.yml)**|Install NGINX Plus and NGINX App Protect WAF|
5757
|**[`deploy-nginx-web-server.yml`](https://github.com/nginxinc/ansible-collection-nginx/blob/main/playbooks/deploy-nginx-web-server.yml)**|Install NGINX and configure a simple web server|
5858
|**[`deploy-nginx-web-server-proxy.yml`](https://github.com/nginxinc/ansible-collection-nginx/blob/main/playbooks/deploy-nginx-web-server-proxy.yml)**|Install NGINX and configure a simple reverse proxy in front of two web servers|
59-
|**[`deploy-nginx-plus-app-protect-web-server-proxy.yml`](https://github.com/nginxinc/ansible-collection-nginx/blob/main/playbooks/deploy-nginx-plus-app-protect-web-server-proxy.yml)**|Install NGINX Plus and NGINX App Protect and configure a simple reverse proxy in front of two web servers protected by NGINX App Protect|
59+
|**[`deploy-nginx-plus-app-protect-web-server-proxy.yml`](https://github.com/nginxinc/ansible-collection-nginx/blob/main/playbooks/deploy-nginx-plus-app-protect-web-server-proxy.yml)**|Install NGINX Plus and NGINX App Protect and configure a simple reverse proxy in front of two web servers protected by NGINX App Protect WAF/DoS|
6060

6161
## Development
6262

galaxy.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
namespace: nginxinc
33
name: nginx_core
44
description: Install and configure NGINX and NGINX App Protect using Ansible
5-
version: 0.3.0
5+
version: 0.4.0
66
readme: README.md
77
license_file: LICENSE
88
authors:
99
- Alessandro Fael Garcia <[email protected]>
10-
dependencies: {}
10+
- Daniel Edgar <[email protected]>
1111

1212
tags:
1313
- nginx
@@ -19,11 +19,17 @@ tags:
1919
- plus
2020
- web
2121
- server
22-
- development
23-
- install
24-
- configuration
22+
- load_balancer
23+
- reverse_proxy
24+
- api_gateway
2525
- waf
26+
- dos
2627
- security
28+
- installation
29+
- configuration
30+
- infrastructure
31+
- cloud
32+
- monitoring
2733

2834
repository: https://github.com/nginxinc/ansible-collection-nginx
2935
homepage: https://github.com/nginxinc/ansible-collection-nginx

meta/runtime.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
requires_ansible: '>=2.11'

playbooks/deploy-nginx-app-protect.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,16 @@
22
- hosts: all
33
collections:
44
- nginxinc.nginx_core
5-
roles:
6-
- role: nginx_app_protect
5+
tasks:
6+
- name: Install NGINX App Protect
7+
include_role:
8+
name: nginx_app_protect
79
vars:
810
nginx_app_protect_license:
911
certificate: <path/to/certificate>
1012
key: <path/to/key>
13+
nginx_app_protect_waf_enable: true
14+
nginx_app_protect_dos_enable: true
1115
nginx_app_protect_remove_license: false
1216
nginx_app_protect_install_signatures: true
1317
nginx_app_protect_install_threat_campaigns: true
14-
nginx_app_protect_configure: true
15-
nginx_app_protect_security_policy_template_enable: true
16-
nginx_app_protect_security_policy_enforcement_mode: blocking
17-
nginx_app_protect_log_policy_template_enable: true
18-
nginx_app_protect_log_policy_filter_request_type: all
19-
nginx_app_protect_conf_template_enable: false

0 commit comments

Comments
 (0)