diff --git a/.ansible-lint b/.ansible-lint new file mode 100644 index 0000000..7e100a8 --- /dev/null +++ b/.ansible-lint @@ -0,0 +1,2 @@ +skip_list: +- '106' diff --git a/.travis.yml b/.travis.yml index bd2c930..12bdb03 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 76146b2..4c9cb41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # 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. + ## 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). diff --git a/tasks/unit/setup-debian.yml b/tasks/unit/setup-debian.yml index d971e11..c780e06 100644 --- a/tasks/unit/setup-debian.yml +++ b/tasks/unit/setup-debian.yml @@ -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 diff --git a/tasks/unit/setup-redhat.yml b/tasks/unit/setup-redhat.yml index 0796fd9..39c6f15 100644 --- a/tasks/unit/setup-redhat.yml +++ b/tasks/unit/setup-redhat.yml @@ -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"