Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Commit cc6054a

Browse files
committed
Update Ansible and Ansible Lint (#2)
* Explicitly define `mode` in relevant tasks. * Explicitly define the `nginx-unit` `apt_repository` and `yum_repository` filename in Debian and RedHat based distros.
1 parent 805b30b commit cc6054a

File tree

5 files changed

+34
-7
lines changed

5 files changed

+34
-7
lines changed

.ansible-lint

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
skip_list:
2+
- '106'

.travis.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@ jobs:
1212
- name: "(CentOS) Install NGINX Unit and NGINX Unit modules"
1313
env:
1414
scenario: default_centos
15-
before_install: sudo apt-get -qq update
15+
before_install:
16+
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
17+
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
18+
- sudo apt-get update
19+
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
1620
install:
17-
- pip install ansible==2.9.11
18-
- pip install molecule==3.0.6
19-
- pip install docker==4.2.2
20-
- pip install ansible-lint==4.2.0
21+
- pip install ansible==2.9.12
22+
- pip install ansible-lint==4.3.2
23+
- pip install molecule==3.0.8
24+
- pip install docker==4.3.1
2125
script:
2226
- molecule --version
2327
- ansible --version

CHANGELOG.md

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

3+
## 0.2.0 (August 27, 2020)
4+
5+
BREAKING CHANGES:
6+
7+
* The repository names in Debian and RedHat based distros 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-unit` `apt_repository` and `yum_repository` filename in Debian and RedHat based distros.
14+
15+
FEATURES:
16+
17+
* TravisCI now always uses the latest version of Docker.
18+
319
## 0.1.0 (August 19, 2020)
420

521
Initial release of the NGINX Unit role. Contains all NGINX Unit related features previously available on the [NGINX Ansible role](https://github.com/nginxinc/ansible-role-nginx).

tasks/unit/setup-debian.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
---
22
- name: "(Install: Debian/Ubuntu) Add NGINX Unit Repository"
33
apt_repository:
4+
filename: nginx-unit
45
repo: "{{ item }}"
6+
update_cache: yes
7+
mode: 0644
58
loop:
69
- deb [arch=amd64] https://packages.nginx.org/unit/{{ ansible_distribution|lower }}/ {{ ansible_distribution_release }} unit
710
- deb-src https://packages.nginx.org/unit/{{ ansible_distribution|lower }}/ {{ ansible_distribution_release }} unit

tasks/unit/setup-redhat.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
---
22
- name: "(Install: CentOS/RedHat) Add NGINX Unit Repository"
33
yum_repository:
4-
name: unit
4+
name: nginx-unit
55
baseurl: https://packages.nginx.org/unit/{{ (ansible_distribution == "RedHat") | ternary('rhel/', 'centos/') }}$releasever/$basearch/
66
description: NGINX Unit Repository
77
enabled: yes
88
gpgcheck: yes
9+
mode: 0644
910
when: ansible_distribution != "Amazon"
1011

1112
- name: "(Install: Amazon Linux) Add NGINX Unit Repository"
1213
yum_repository:
13-
name: unit
14+
name: nginx-unit
1415
baseurl: https://packages.nginx.org/unit/amzn{{ (ansible_distribution_version == "2") | ternary('2', '') }}/$releasever/$basearch/
1516
description: NGINX Unit Repository
1617
enabled: yes
1718
gpgcheck: yes
19+
mode: 0644
1820
when: ansible_distribution == "Amazon"

0 commit comments

Comments
 (0)