Fix package module in Molecule verification tests (#364)

This commit is contained in:
Alessandro Fael Garcia 2021-02-05 16:24:23 +01:00 committed by GitHub
parent 6ff33cfd27
commit a4df84063c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 29 additions and 14 deletions

View File

@ -5,22 +5,22 @@ title: ''
labels: ''
assignees: ''
---
**Describe the bug**
### Describe the bug
A clear and concise description of what the bug is.
**To reproduce**
### To reproduce
Steps to reproduce the behavior:
1. Deploy NGINX role using playbook.yml
2. View output/logs/configuration on '...'
3. See error
**Expected behavior**
### Expected behavior
A clear and concise description of what you expected to happen.
**Your environment:**
### Your environment:
- Version of the NGINX role or specific commit
- Version of Ansible
- Target deployment platform
**Additional context**
### Additional context
Add any other context about the problem here.

View File

@ -5,14 +5,14 @@ title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
### Is your feature request related to a problem? Please describe
A clear and concise description of what the problem is. Ex. I'm always frustrated when ...
**Describe the solution you'd like**
### Describe the solution you'd like
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
### Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
### Additional context
Add any other context or screenshots about the feature request here.

View File

@ -1,3 +1,10 @@
---
name: Pull request
about: Submit a pull request to contribute to this role
title: ''
labels: ''
assignees: ''
---
### Proposed changes
Describe the use case and detail of the change. If this PR addresses an issue on GitHub, make sure to include a link to that issue using one of the [supported keywords](https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue) here in this description (not in the title of the PR).

View File

View File

@ -10,9 +10,14 @@ ENHANCEMENTS:
* Only run GitHub actions Galaxy CI/CD workflow when a new release is published.
* Specify GitHub actions Ubuntu release.
* Minor GitHub template tweaks, including the creation of a SECURITY doc.
* Update list of supported platforms.
* Update Ansible base to `2.10.5`, Ansible to `2.10.6`, Molecule to `3.2.3` and yamllint to `1.26.0`.
BUG FIXES:
Add `state` parameter to package module in Molecule verification tests.
## 0.19.1 (January 11, 2021)
ENHANCEMENTS:

View File

@ -5,6 +5,7 @@
- name: Check if NGINX is installed
package:
name: nginx
state: present
check_mode: yes
register: install
failed_when: (install is changed) or (install is failed)

View File

@ -5,6 +5,7 @@
- name: Check if NGINX is installed
package:
name: nginx
state: present
check_mode: yes
register: install
failed_when: (install is changed) or (install is failed)

View File

@ -2,7 +2,7 @@
- name: Converge
hosts: all
tasks:
- name: Install NGINX
- name: Install NGINX Plus
include_role:
name: ansible-role-nginx
vars:

View File

@ -2,14 +2,15 @@
- name: Verify
hosts: all
tasks:
- name: Check if NGINX is installed
- name: Check if NGINX Plus is installed
package:
name: nginx-plus
state: present
check_mode: yes
register: install
failed_when: (install is changed) or (install is failed)
- name: Check if NGINX service is running
- name: Check if NGINX Plus service is running
service:
name: nginx
state: started
@ -18,7 +19,7 @@
register: service
failed_when: (service is changed) or (service is failed)
- name: Verify NGINX is up and running
- name: Verify NGINX Plus is up and running
uri:
url: http://localhost
status_code: 200