From a4df84063ce64fffda9f1f025208651ffacda899 Mon Sep 17 00:00:00 2001 From: Alessandro Fael Garcia Date: Fri, 5 Feb 2021 16:24:23 +0100 Subject: [PATCH] Fix `package` module in Molecule verification tests (#364) --- .github/ISSUE_TEMPLATE/bug_report.md | 10 +++++----- .github/ISSUE_TEMPLATE/feature_request.md | 10 +++++----- .../{pull_request_template.md => pull_request.md} | 7 +++++++ SECURITY.md => .github/SECURITY.md | 0 CHANGELOG.md | 5 +++++ molecule/common/playbooks/default_verify.yml | 1 + molecule/common/playbooks/module_verify.yml | 1 + molecule/common/playbooks/plus_converge.yml | 2 +- molecule/common/playbooks/plus_verify.yml | 7 ++++--- 9 files changed, 29 insertions(+), 14 deletions(-) rename .github/PULL_REQUEST_TEMPLATE/{pull_request_template.md => pull_request.md} (87%) rename SECURITY.md => .github/SECURITY.md (100%) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 09c3c37..eb43fa9 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -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. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 33b0824..3ecf9b2 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -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. diff --git a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/pull_request.md similarity index 87% rename from .github/PULL_REQUEST_TEMPLATE/pull_request_template.md rename to .github/PULL_REQUEST_TEMPLATE/pull_request.md index f07653a..a8f7347 100644 --- a/.github/PULL_REQUEST_TEMPLATE/pull_request_template.md +++ b/.github/PULL_REQUEST_TEMPLATE/pull_request.md @@ -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). diff --git a/SECURITY.md b/.github/SECURITY.md similarity index 100% rename from SECURITY.md rename to .github/SECURITY.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 65e715a..f030a8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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: diff --git a/molecule/common/playbooks/default_verify.yml b/molecule/common/playbooks/default_verify.yml index 8e590fb..d52dc79 100644 --- a/molecule/common/playbooks/default_verify.yml +++ b/molecule/common/playbooks/default_verify.yml @@ -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) diff --git a/molecule/common/playbooks/module_verify.yml b/molecule/common/playbooks/module_verify.yml index 8e590fb..d52dc79 100644 --- a/molecule/common/playbooks/module_verify.yml +++ b/molecule/common/playbooks/module_verify.yml @@ -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) diff --git a/molecule/common/playbooks/plus_converge.yml b/molecule/common/playbooks/plus_converge.yml index 696ffd8..067c1a7 100644 --- a/molecule/common/playbooks/plus_converge.yml +++ b/molecule/common/playbooks/plus_converge.yml @@ -2,7 +2,7 @@ - name: Converge hosts: all tasks: - - name: Install NGINX + - name: Install NGINX Plus include_role: name: ansible-role-nginx vars: diff --git a/molecule/common/playbooks/plus_verify.yml b/molecule/common/playbooks/plus_verify.yml index 2c1c78f..c60b4cd 100644 --- a/molecule/common/playbooks/plus_verify.yml +++ b/molecule/common/playbooks/plus_verify.yml @@ -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