Use distro packages for nginx on centos.
There is no longer any need to get these from EPEL or the nginx repos. Change-Id: I24a031b5e14359f08a231dfc3429468561d48126
This commit is contained in:
parent
309c235a8a
commit
e31bee556c
|
@ -23,10 +23,6 @@ repo_nginx_threads: "{{ [[ansible_facts['processor_vcpus']|default(2) // 2, 1] |
|
||||||
## APT Cache Options
|
## APT Cache Options
|
||||||
cache_timeout: 600
|
cache_timeout: 600
|
||||||
|
|
||||||
## Centos NGINX repository options
|
|
||||||
repo_centos_nginx_mirror: "{{ centos_nginx_mirror | default('http://nginx.org/packages/centos/$releasever/$basearch') }}"
|
|
||||||
repo_centos_nginx_key: "{{ centos_nginx_key | default('http://nginx.org/keys/nginx_signing.key') }}"
|
|
||||||
|
|
||||||
# Set the package install state for distribution and pip packages
|
# Set the package install state for distribution and pip packages
|
||||||
# Options are 'present' and 'latest'
|
# Options are 'present' and 'latest'
|
||||||
repo_server_package_state: "latest"
|
repo_server_package_state: "latest"
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
The use of the nginx package repository on RedHat derived operating
|
||||||
|
systems is no longer required as there is a new enough version of the
|
||||||
|
nginx package in the standard distro repos now. The variables
|
||||||
|
``repo_centos_nginx_mirror`` and ``repo_centos_nginx_key`` are removed from
|
||||||
|
the repo_server role and no longer have any effect.
|
|
@ -13,18 +13,21 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Add NGINX repository
|
- name: Remove old nginx repo
|
||||||
yum_repository:
|
yum_repository:
|
||||||
name: nginx
|
name: "nginx"
|
||||||
description: 'nginx repo'
|
state: absent
|
||||||
baseurl: "{{ repo_centos_nginx_mirror }}"
|
register: _repo_removed
|
||||||
gpgkey: "{{ repo_centos_nginx_key }}"
|
|
||||||
when:
|
when:
|
||||||
- ansible_facts['pkg_mgr'] == 'dnf'
|
- ansible_facts['pkg_mgr'] == 'dnf'
|
||||||
register: add_nginx_repo
|
|
||||||
until: add_nginx_repo is success
|
- name: Clean yum metadata when nginx repo is removed
|
||||||
retries: 5
|
command: dnf clean metadata
|
||||||
delay: 2
|
args:
|
||||||
|
warn: no
|
||||||
|
when:
|
||||||
|
- ansible_facts['pkg_mgr'] == 'dnf'
|
||||||
|
- _repo_removed is changed
|
||||||
|
|
||||||
- name: Install distro packages
|
- name: Install distro packages
|
||||||
package:
|
package:
|
||||||
|
|
Loading…
Reference in New Issue