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

Commit

Permalink
Update Ansible and Ansible Lint (#2)
Browse files Browse the repository at this point in the history
*   Explicitly define `mode` in relevant tasks.
*   Explicitly define the `nginx-unit` `apt_repository` and `yum_repository` filename in Debian and RedHat based distros.
  • Loading branch information
alessfg committed Aug 27, 2020
1 parent 805b30b commit cc6054a
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
skip_list:
- '106'
14 changes: 9 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ jobs:
- name: "(CentOS) Install NGINX Unit and NGINX Unit modules"
env:
scenario: default_centos
before_install: sudo apt-get -qq update
before_install:
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
install:
- pip install ansible==2.9.11
- pip install molecule==3.0.6
- pip install docker==4.2.2
- pip install ansible-lint==4.2.0
- pip install ansible==2.9.12
- pip install ansible-lint==4.3.2
- pip install molecule==3.0.8
- pip install docker==4.3.1
script:
- molecule --version
- ansible --version
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## 0.2.0 (August 27, 2020)

BREAKING CHANGES:

* 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.

ENHANCEMENTS:

* Update Ansible to `2.9.12` and Ansible Lint to `4.3.2`.
* Explicitly define `mode` in relevant tasks.
* Explicitly define the `nginx-unit` `apt_repository` and `yum_repository` filename in Debian and RedHat based distros.

FEATURES:

* TravisCI now always uses the latest version of Docker.

## 0.1.0 (August 19, 2020)

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).
3 changes: 3 additions & 0 deletions tasks/unit/setup-debian.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
---
- name: "(Install: Debian/Ubuntu) Add NGINX Unit Repository"
apt_repository:
filename: nginx-unit
repo: "{{ item }}"
update_cache: yes
mode: 0644
loop:
- deb [arch=amd64] https://packages.nginx.org/unit/{{ ansible_distribution|lower }}/ {{ ansible_distribution_release }} unit
- deb-src https://packages.nginx.org/unit/{{ ansible_distribution|lower }}/ {{ ansible_distribution_release }} unit
6 changes: 4 additions & 2 deletions tasks/unit/setup-redhat.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
---
- name: "(Install: CentOS/RedHat) Add NGINX Unit Repository"
yum_repository:
name: unit
name: nginx-unit
baseurl: https://packages.nginx.org/unit/{{ (ansible_distribution == "RedHat") | ternary('rhel/', 'centos/') }}$releasever/$basearch/
description: NGINX Unit Repository
enabled: yes
gpgcheck: yes
mode: 0644
when: ansible_distribution != "Amazon"

- name: "(Install: Amazon Linux) Add NGINX Unit Repository"
yum_repository:
name: unit
name: nginx-unit
baseurl: https://packages.nginx.org/unit/amzn{{ (ansible_distribution_version == "2") | ternary('2', '') }}/$releasever/$basearch/
description: NGINX Unit Repository
enabled: yes
gpgcheck: yes
mode: 0644
when: ansible_distribution == "Amazon"

0 comments on commit cc6054a

Please sign in to comment.