You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@ FEATURES:
14
14
DOCUMENTATION:
15
15
16
16
- Update community docs per the latest [NGINX template repository](https://github.com/nginxinc/template-repository) guidelines.
17
+
- Update and tweak the README. In order to make the installation instructions easier, some file names used by the various GitHub Actions workflows have been renamed.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,8 @@ To suggest a feature or enhancement, please create an issue on GitHub with the l
45
45
- Fork the repo, create a branch, implement your changes, add any relevant tests, and submit a PR when your changes are **tested** (using Molecule) and ready for review.
46
46
- Fill in the [PR template](/.github/pull_request_template.md).
47
47
48
-
**Note:** If you'd like to implement a new feature, please consider creating a [feature request issue](/.github/feature_request_template.md) first to start a discussion about the feature.
48
+
> [!NOTE]
49
+
> If you'd like to implement a new feature, please consider creating a [feature request issue](/.github/feature_request_template.md) first to start a discussion about the feature.
Copy file name to clipboardExpand all lines: README.md
+86-32Lines changed: 86 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -9,48 +9,94 @@
9
9
10
10
# Ansible NGINX Role
11
11
12
-
This role installs NGINX Open Source, NGINX Plus, NGINX Agent or the NGINX Amplify agent on your target host.
12
+
This role installs NGINX (NGINX Open Source), NGINX Plus, NGINX Agent and/or the NGINX Amplify agent on your target host(s).
13
13
14
-
**Note:** This role is still in active development. There may be unidentified issues and the role variables may change as development continues.
14
+
> [!IMPORTANT]
15
+
> This role is still in active development. There may be unidentified issues and the role variables may change as development continues.
15
16
16
-
## Requirements
17
+
## Role Requirements
17
18
18
-
### NGINX Plus (Optional)
19
+
### NGINX
19
20
20
-
If you wish to install NGINX Plus using this role, you will need to obtain an NGINX Plus license beforehand. *You do not need to do anything beforehand if you want to install NGINX OSS.*
21
+
Depending on your target NGINX use case, you might need to obtain a license or API key/token before being able to use the role:
22
+
23
+
| Product | Requirements |
24
+
|---------|--------------|
25
+
| NGINX | None |
26
+
| NGINX Plus | NGINX Plus license (both a license key and crt files) |
27
+
| NGINX Agent | A compatible control plane and (optionally) an NGINX One SaaS console data plane token |
28
+
| NGINX Amplify | API key found within the NGINX Amplify SaaS console |
21
29
22
30
### Ansible
23
31
24
-
- This role is developed and tested with [maintained](https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html) versions of Ansible core (above `2.12`).
25
-
- When using Ansible core, you will also need to install the following collections:
26
-
27
-
```yaml
28
-
---
29
-
collections:
30
-
- name: ansible.posix
31
-
version: 1.5.4
32
-
- name: community.general
33
-
version: 9.0.1
34
-
- name: community.crypto # Only required if you plan to install NGINX Plus
35
-
version: 2.20.0
36
-
- name: community.docker # Only required if you plan to use Molecule (see below)
37
-
version: 3.10.3
38
-
```
39
-
40
-
**Note:** You can alternatively install the Ansible community distribution (what is known as the "old" Ansible) if you don't want to manage individual collections.
32
+
If you want to use this role, you will need to use a supported version of Ansible core and Jinja2 as well as a few Ansible collections.
33
+
34
+
For ease of use, you can install and/or upgrade Ansible core, Jinja2, and the aforementioned Ansible collections by running the following four commands on your Ansible host:
This will also ensure you are deploying/running this role with a fully tested version of the aforementioned packages/collections.
44
+
45
+
#### Ansible core
46
+
47
+
- This role is developed and tested with [maintained](https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html) versions of Ansible core and Python.
48
+
- When using Ansible core, you will also need to install the following Ansible collections:
49
+
50
+
```yaml
51
+
---
52
+
collections:
53
+
- name: ansible.posix
54
+
version: 1.5.4
55
+
- name: community.general
56
+
version: 9.0.1
57
+
- name: community.crypto # Only required if you plan to install NGINX Plus
58
+
version: 2.20.0
59
+
- name: community.docker # Only required if you plan to use Molecule (see below)
60
+
version: 3.10.3
61
+
```
62
+
41
63
- You will need to run this role as a root user using Ansible's `become` parameter. Make sure you have set up the appropriate permissions on your target hosts.
42
-
- 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).
64
+
- Instructions on how to install Ansible core can be found in the [Ansible](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) docs.
65
+
- Instructions on how to install Ansible collections can be found in the [Ansible collections](https://docs.ansible.com/ansible/latest/collections_guide/collections_installing.html) guide.
43
66
44
-
### Jinja2
67
+
> [!TIP]
68
+
> You can alternatively install the [Ansible community distribution](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#selecting-an-ansible-package-and-version-to-install) (what is still known Ansible -- instead of Ansible core) if you don't want to manage individual collections.
69
+
70
+
#### Jinja2
45
71
46
72
- This role uses Jinja2 templates. Ansible core installs Jinja2 by default, but depending on your install and/or upgrade path, you might be running an outdated version of Jinja2. The minimum version of Jinja2 required for the role to properly function is `3.1`.
47
73
- Instructions on how to install Jinja2 can be found in the [Jinja2 website](https://jinja.palletsprojects.com/en/3.1.x/intro/#installation).
48
74
49
-
### Molecule (Optional)
75
+
### Testing suite (Optional)
76
+
77
+
If you want to contribute to this role, you will also need to install Ansible Lint and Molecule.
78
+
79
+
#### Ansible Lint (Optional)
50
80
51
-
- Molecule is used to test the various functionalities of the role. The recommended version of Molecule to test this role is `4.x`.
52
-
- Instructions on how to install Molecule can be found in the [Molecule website](https://molecule.readthedocs.io/en/latest/installation.html). *You will also need to install the Molecule Docker driver.*
53
-
- To run the NGINX Plus Molecule tests, you must copy your NGINX Plus license to the role's [`files/license`](https://github.com/nginxinc/ansible-role-nginx/blob/main/files/license/) directory.
81
+
- Ansible Lint is used to lint the role for both Ansible best practices and potential Ansible/YAML issues.
82
+
- Instructions on how to install Ansible Lint can be found in the [Ansible Lint website](https://ansible.readthedocs.io/projects/lint/installing/).
83
+
- Once installed, using Ansible Lint is as easy as running:
84
+
85
+
```bash
86
+
ansible-lint
87
+
```
88
+
89
+
- For ease of use, you can install and/or upgrade Ansible Lint by running the following command on your Ansible host:
- Molecule is used to test the various functionalities of the role.
98
+
- Instructions on how to install Molecule can be found in the [Molecule website](https://molecule.readthedocs.io/en/latest/installation.html). *You will also need to install the Molecule plugins package and the Docker Python SDK.*
99
+
- To run any of the NGINX Plus Molecule tests, you must first copy your NGINX Plus license to the role's [`files/license`](https://github.com/nginxinc/ansible-role-nginx/blob/main/files/license/) directory.
54
100
55
101
You can alternatively add your NGINX Plus repository certificate and key to the local environment. Run the following commands to export these files as base64-encoded variables and execute the Molecule tests:
56
102
@@ -60,9 +106,15 @@ If you wish to install NGINX Plus using this role, you will need to obtain an NG
60
106
molecule test -s plus
61
107
```
62
108
63
-
## Installation
109
+
- For ease of use, you can install and/or upgrade Molecule, the Molecule plugins package, and the Docker Python SDK by running the following command on your Ansible host:
This role can be installed via either Ansible Galaxy (the Ansible community marketplace) or by cloning this repo. Once installed, you will need to include the role it in your Ansible playbook using [the `roles` keyword, the `import_role` module, or the `include_role` module](https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_reuse_roles.html#using-roles).
117
+
This role can be installed via either Ansible Galaxy (the Ansible community marketplace) or by cloning this repo. Once installed, you will need to include the role in your Ansible playbook using [the `roles` keyword, the `import_role` module, or the `include_role` module](https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_reuse_roles.html#using-roles).
66
118
67
119
### Ansible Galaxy
68
120
@@ -234,7 +286,8 @@ Ubuntu:
234
286
- jammy (22.04)
235
287
```
236
288
237
-
**Note:** At your own risk, you can also use this role to compile NGINX Open Source from source, install NGINX Open Source on "compatible" yet unsupported platforms, install NGINX from your respective distribution package manager, or install NGINX Open Source on BSD systems.
289
+
> [!WARNING]
290
+
> At your own risk, you can also use this role to compile NGINX Open Source from source, install NGINX Open Source on "compatible" yet unsupported platforms, install NGINX from your respective distribution package manager, or install NGINX Open Source on BSD systems.
238
291
239
292
## Role Variables
240
293
@@ -277,7 +330,8 @@ Working functional playbook examples can be found in the **[`molecule/`](https:/
277
330
| **[`upgrade-plus/converge.yml`](https://github.com/nginxinc/ansible-role-nginx/blob/main/molecule/upgrade-plus/converge.yml)** | Upgrade NGINX Plus |
278
331
| **[`version/converge.yml`](https://github.com/nginxinc/ansible-role-nginx/blob/main/molecule/version/converge.yml)** | Install a specific version of NGINX and various NGINX modules |
279
332
280
-
**Note:** If you install this repository via Ansible Galaxy, you will need to replace the `include_role` variable in the example playbooks from `ansible-role-nginx` to `nginxinc.nginx`.
333
+
> [!NOTE]
334
+
> If you install this repository via Ansible Galaxy, you will need to replace the `include_role` variable in the example playbooks from `ansible-role-nginx` to `nginxinc.nginx`.
0 commit comments