mirror of
https://github.com/geerlingguy/ansible-role-nginx.git
synced 2025-02-19 01:41:32 +01:00
In environments where RHEL uses Satellite or production servers can't reach out to the internet, and the Yum repo is not wanted. This commit adds a flag to disable the functionality. It also removes the enablerepo: nginx line from the package since a) it's redundant and b) working around it overly complicates the situation.
15 lines
283 B
YAML
15 lines
283 B
YAML
---
|
|
- name: Enable nginx repo.
|
|
template:
|
|
src: nginx.repo.j2
|
|
dest: /etc/yum.repos.d/nginx.repo
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
when: nginx_yum_repo_enabled
|
|
|
|
- name: Ensure nginx is installed.
|
|
yum:
|
|
name: "{{ nginx_package_name }}"
|
|
state: installed
|