Skip to content

Commit bf2916f

Browse files
authored
Update Ansible to 2.9.12 and explicitly set mode on relevant tasks (#309)
* Explicitly define `mode` in relevant tasks. * Explicitly define the `nginx` `apt_repository` filename in Debian based distros. * Building OpenSSL from source should now work properly in CentOS 8.
1 parent 79ddc30 commit bf2916f

30 files changed

+173
-94
lines changed

.travis.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,17 @@ jobs:
5757
- name: "(CentOS) Install from Source"
5858
env:
5959
scenario: source_centos
60-
before_install: sudo apt-get -qq update
60+
before_install:
61+
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
62+
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
63+
- sudo apt-get update
64+
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
6165
install:
62-
- pip install ansible==2.9.11
63-
- pip install molecule==3.0.6
64-
- pip install docker==4.2.2
65-
- pip install ansible-lint==4.2.0
66+
- pip install ansible==2.9.12
67+
- pip install ansible-lint==4.3.2
68+
- pip install molecule==3.0.8
69+
- pip install docker==4.3.1
6670
script:
67-
- molecule --version
68-
- ansible --version
6971
- travis_wait 50 molecule test -s $scenario
7072
notifications:
7173
webhooks: https://galaxy.ansible.com/api/v1/notifications/

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# Changelog
22

3+
## 0.16.0 (August 28, 2020)
4+
5+
BREAKING CHANGES:
6+
7+
* The Debian and Ubuntu repositories have slightly changed. You may run into some duplication issues when running the role on a preexisting target that already has had NGINX installed using the role. To fix this, manually remove the old repository source.
8+
9+
ENHANCEMENTS:
10+
11+
* Update Ansible to `2.9.12` and Ansible Lint to `4.3.2`.
12+
* Explicitly define `mode` in relevant tasks.
13+
* Explicitly define the `nginx` `apt_repository` filename in Debian based distros.
14+
15+
FEATURES:
16+
17+
* TravisCI now always uses the latest version of Docker.
18+
19+
BUG FIXES:
20+
21+
* Building OpenSSL from source should now work properly in CentOS 8.
22+
323
## 0.15.0 (August 20, 2020)
424

525
DEPRECATION WARNING:

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ This role installs NGINX Open Source, NGINX Plus, the NGINX Amplify agent, or NG
99
**Note:** This role is still in active development. There may be unidentified issues and the role variables may change as development continues.
1010

1111
**Deprecation Warnings:**
12-
* There now is a separate role to manage and create NGINX configurations available [here](https://github.com/nginxinc/ansible-role-nginx-config). Any new issues or PRs related to configuring NGINX should be submitted in the new NGINX Config repository. New issues or PRs related to configuring NGINX submitted in this repository will not be worked on. The NGINX configuration functionalities included in this role will be removed in an upcoming release.
13-
* NGINX Unit now has a separate role available [here](https://github.com/nginxinc/ansible-role-nginx-unit). Any new issues or PRs related to NGINX Unit should be submitted in the new NGINX Unit repository. New issues or PRs related to NGINX Unit submitted in this repository will not be worked on. The NGINX Unit functionalities included in this role will be removed in an upcoming release.
12+
13+
* There now is a separate role to manage and create NGINX configurations available [here](https://github.com/nginxinc/ansible-role-nginx-config). Any new issues or PRs related to configuring NGINX should be submitted in the new NGINX Config repository. New issues or PRs related to configuring NGINX submitted in this repository will not be worked on (with the exception of major bugfixes). The NGINX configuration functionalities included in this role will be removed in an upcoming release.
14+
* NGINX Unit now has a separate role available [here](https://github.com/nginxinc/ansible-role-nginx-unit). Any new issues or PRs related to NGINX Unit should be submitted in the new NGINX Unit repository. New issues or PRs related to NGINX Unit submitted in this repository will not be worked on (with the exception of major bugfixes). The NGINX Unit functionalities included in this role will be removed in an upcoming release.
1415

1516
Requirements
1617
------------

defaults/main/linux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ nginx_linux_families: ['Alpine', 'Debian', 'RedHat', 'Suse']
88
nginx_plus_linux_families: ['Alpine', 'Debian', 'RedHat', 'Suse']
99

1010
# Default locations and versions when 'nginx_install_from; is set to 'source'
11-
pcre_version: pcre-8.43
11+
pcre_version: pcre-8.44
1212
zlib_version: zlib-1.2.11
13-
openssl_version: openssl-1.1.1c
13+
openssl_version: openssl-1.1.1g

handlers/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
changed_when: false
2323
when:
2424
- nginx_start | bool
25-
- not ansible_check_mode
25+
- not ansible_check_mode | bool
2626

2727
- name: "(Handler: All OSs) Start NGINX Amplify Agent"
2828
service:

molecule/common/playbooks/module_verify.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@
2121
- name: Check default.conf does not exist
2222
stat:
2323
path: /etc/nginx/conf.d/default.conf
24+
check_mode: yes
2425
register: stat_result
2526
failed_when: stat_result.stat.exists

molecule/common/playbooks/stable_push_verify.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
- name: Check default.conf exists
2727
stat:
2828
path: /etc/nginx/conf.d/default.conf
29+
check_mode: yes
2930
register: stat_result
3031
failed_when: not stat_result.stat.exists
3132

molecule/common/playbooks/template_converge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
include_role:
77
name: ansible-role-nginx
88
vars:
9-
nginx_debug_output: true
9+
# nginx_debug_output: true
1010

1111
nginx_service_modify: true
1212
nginx_service_timeout: 95

molecule/common/playbooks/template_verify.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,21 @@
2626
- name: Check default.conf exists
2727
stat:
2828
path: /etc/nginx/conf.d/default.conf
29+
check_mode: yes
2930
register: stat_result
3031
failed_when: not stat_result.stat.exists
3132

3233
- name: Check frontend_default.conf exists
3334
stat:
3435
path: /etc/nginx/conf.d/frontend_default.conf
36+
check_mode: yes
3537
register: stat_result
3638
failed_when: not stat_result.stat.exists
3739

3840
- name: Check backend_default.conf exists
3941
stat:
4042
path: /etc/nginx/conf.d/backend_default.conf
43+
check_mode: yes
4144
register: stat_result
4245
failed_when: not stat_result.stat.exists
4346

tasks/amplify/install-amplify.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
remote_src: yes
1515
src: /etc/amplify-agent/agent.conf.default
1616
dest: /etc/amplify-agent/agent.conf
17+
mode: 0644
1718

1819
- name: "(Setup: All OSs) Configure NGINX Amplify Agent API Key"
1920
lineinfile:

0 commit comments

Comments
 (0)