-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Download nginx from apt for ubuntu version greater that 22.04 (#11)
* Download nginx from apt for ubuntu version higher that 2204 * Test against ubuntu 22.04 * See if we can bypass the error during prepare state * Revert changes * Fix Molecule CI workflow for Ubuntu 22.04 GitHub Actions. * Use the latest molecule-action * Skip role name check Run lint on ubuntu 22.04 * Add role name and namespace so that molecule test doesn't fail * Try addressing new unexplained error from molecule in the pipeline * Try again to get past pipeline error * Revert the commit that did not fix the problem This reverts commit 7ff5391. * Drop centos testing * Update *very* out of date pip requirements * Try a different entrypoint Tihs works on my local, let's see if github workflow likes it too * Add a line that might help * Fix bad comparison * Try using different images for testing * Bring meta up to date * Update readme * Remove Debian task; we don't use or test it * Switch back to latest * Put Rocky (aka CentOS) test back * Fix typo * Remove cruft * Disambiguate * Update readme Co-authored-by: Dale Anderson <[email protected]>
- Loading branch information
1 parent
155a1b0
commit a990a72
Showing
9 changed files
with
44 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
--- | ||
galaxy_info: | ||
author: Matt Breden | ||
description: Install Nginx on Ubuntu or RedHat/CentOS | ||
author: Matt Breden, Dale Anderson, Chithra K | ||
description: Install NGINX on Ubuntu or Red Hat | ||
company: Acro Media Inc. | ||
license: GPLv3 | ||
min_ansible_version: 2.0 | ||
role_name: nginx | ||
namespace: acromedia | ||
platforms: | ||
- name: Ubuntu | ||
versions: | ||
- trusty | ||
- xenial | ||
- bionic | ||
- name: EL | ||
- jammy # 22.04 | ||
- focal # 20.04 | ||
- bionic # 18.04 | ||
- name: EL # Or CentOS, or Rocky | ||
versions: | ||
- 6 | ||
- 8 | ||
- 9 | ||
galaxy_tags: [] | ||
dependencies: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,23 @@ | ||
--- | ||
role_name_check: 1 | ||
dependency: | ||
name: galaxy | ||
driver: | ||
name: docker | ||
platforms: | ||
- name: instance | ||
image: ${MOLECULE_DOCKER_IMAGE:-'geerlingguy/docker-ubuntu1804-ansible:latest'} | ||
command: ${MOLECULE_DOCKER_COMMAND:-""} | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:ro | ||
image: "registry.gitlab.com/aussielunix/ansible/molecule-containers/${MOLECULE_DISTRO:-ubuntu:jammy}" | ||
privileged: true | ||
pre_build_image: true | ||
override_command: false | ||
tmpfs: | ||
- /run | ||
- /tmp | ||
provisioner: | ||
name: ansible | ||
verifier: | ||
name: ansible | ||
playbooks: | ||
converge: ${MOLECULE_PLAYBOOK:-converge.yml} | ||
env: | ||
ANSIBLE_VERBOSITY: ${MOLECULE_ANSIBLE_VERBOSITY:-0} | ||
verifier: | ||
name: ansible |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
# pip requirements for testing | ||
testinfra==3.4.0 | ||
pytest==5.3.2 | ||
docker==3.4.1 | ||
molecule==2.22 | ||
molecule[docker] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
|
||
- name: Ensure nginx is installed. | ||
package: | ||
yum: | ||
name: "{{ nginx_package_name }}" | ||
state: present | ||
state: present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
--- | ||
|
||
- name: Ensure nginx will reinstall if the PPA was just added. | ||
- name: Add external PPA so we can get newer nginx version than what comes stock. | ||
This was only really necessary on older Ubuntu versions (e.g. trusty and xenial). | ||
Current ubuntu versions ship with a feature-complete nginx. | ||
apt_repository: | ||
repo: 'ppa:nginx/stable' | ||
repo: 'ppa:nginx/stable' | ||
codename: '{{ ansible_distribution_release }}' | ||
when: ansible_distribution_version < '22.04' | ||
register: nginx_ppa_add_result | ||
|
||
- name: Refresh apt cache after adding PPA | ||
apt: | ||
update_cache: true | ||
when: nginx_ppa_add_result is defined | ||
and nginx_ppa_add_result.changed |