Add EPEL repo for nginx packages on CentOS tests
In order to have access to nginx, we need to add the EPEL repository. Change-Id: If15ce61768b9f0005297546c82aecc75f3af7ff7
This commit is contained in:
parent
11d3955585
commit
cc1beeaa8b
@ -58,6 +58,37 @@
|
|||||||
{{- lookup('env', 'HOME') }}/archive/venvs
|
{{- lookup('env', 'HOME') }}/archive/venvs
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
|
- name: Setup web server for url-based venv install
|
||||||
|
when:
|
||||||
|
- inventory_hostname == 'container1'
|
||||||
|
block:
|
||||||
|
- name: Install EPEL gpg keys
|
||||||
|
rpm_key:
|
||||||
|
key: "http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7"
|
||||||
|
state: present
|
||||||
|
when:
|
||||||
|
- ansible_pkg_mgr in ['yum', 'dnf']
|
||||||
|
register: _add_yum_keys
|
||||||
|
until: _add_yum_keys | success
|
||||||
|
retries: 5
|
||||||
|
delay: 2
|
||||||
|
|
||||||
|
- name: Install the EPEL repository
|
||||||
|
yum_repository:
|
||||||
|
name: epel-nginx
|
||||||
|
baseurl: "{{ (centos_epel_mirror | default ('http://download.fedoraproject.org/pub/epel')) ~ '/' ~ ansible_distribution_major_version ~ '/' ~ ansible_architecture }}"
|
||||||
|
description: 'Extra Packages for Enterprise Linux 7 - $basearch'
|
||||||
|
gpgcheck: yes
|
||||||
|
enabled: yes
|
||||||
|
state: present
|
||||||
|
includepkgs: 'nginx*'
|
||||||
|
when:
|
||||||
|
- ansible_pkg_mgr in ['yum', 'dnf']
|
||||||
|
register: install_epel_repo
|
||||||
|
until: install_epel_repo | success
|
||||||
|
retries: 5
|
||||||
|
delay: 2
|
||||||
|
|
||||||
- name: Install distro packages
|
- name: Install distro packages
|
||||||
package:
|
package:
|
||||||
name: "nginx"
|
name: "nginx"
|
||||||
@ -66,8 +97,6 @@
|
|||||||
until: install | success
|
until: install | success
|
||||||
retries: 5
|
retries: 5
|
||||||
delay: 2
|
delay: 2
|
||||||
when:
|
|
||||||
- inventory_hostname == 'container1'
|
|
||||||
|
|
||||||
- name: Enable and start nginx
|
- name: Enable and start nginx
|
||||||
service:
|
service:
|
||||||
@ -75,8 +104,6 @@
|
|||||||
enabled: yes
|
enabled: yes
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
state: restarted
|
state: restarted
|
||||||
when:
|
|
||||||
- inventory_hostname == 'container1'
|
|
||||||
|
|
||||||
- name: Execute build
|
- name: Execute build
|
||||||
hosts: "{{ build_host }}"
|
hosts: "{{ build_host }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user