Add upstream NGINX and EPEL for selected packages only.
With the removal of EPEL, we are selectively adding packages that we need. This patch adds EPEL repositories only for lsyncd to avoid conflicts and the NGINX upstream repositories for the web server. Change-Id: I832ae27570c5f35d01728a9e387fc451447b38ce
This commit is contained in:
parent
d125a8a58f
commit
695503aa24
@ -13,6 +13,46 @@
|
|||||||
# 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: 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-repo_server
|
||||||
|
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: 'apt-cacher-ng lsyncd'
|
||||||
|
when:
|
||||||
|
- ansible_pkg_mgr in ['yum', 'dnf']
|
||||||
|
register: install_epel_repo
|
||||||
|
until: install_epel_repo|success
|
||||||
|
retries: 5
|
||||||
|
delay: 2
|
||||||
|
|
||||||
|
- name: Add NGINX repository
|
||||||
|
yum_repository:
|
||||||
|
name: nginx
|
||||||
|
description: 'nginx repo'
|
||||||
|
baseurl: "{{ repo_nginx_repo }}"
|
||||||
|
gpgkey: "{{ repo_nginx_gpg_key }}"
|
||||||
|
when:
|
||||||
|
- ansible_pkg_mgr in ['yum', 'dnf']
|
||||||
|
register: add_nginx_repo
|
||||||
|
until: add_nginx_repo is success
|
||||||
|
retries: 5
|
||||||
|
delay: 2
|
||||||
|
|
||||||
- name: Install distro packages
|
- name: Install distro packages
|
||||||
package:
|
package:
|
||||||
name: "{{ repo_server_distro_packages }}"
|
name: "{{ repo_server_distro_packages }}"
|
||||||
@ -95,4 +135,3 @@
|
|||||||
delay: 2
|
delay: 2
|
||||||
notify:
|
notify:
|
||||||
- reload pypiserver
|
- reload pypiserver
|
||||||
|
|
||||||
|
@ -60,6 +60,7 @@
|
|||||||
- path: "{{ repo_service_home_folder }}/repo/os-releases/{{ openstack_release }}"
|
- path: "{{ repo_service_home_folder }}/repo/os-releases/{{ openstack_release }}"
|
||||||
- path: "{{ repo_service_home_folder }}/repo/pools"
|
- path: "{{ repo_service_home_folder }}/repo/pools"
|
||||||
- path: "{{ repo_service_home_folder }}/repo/venvs"
|
- path: "{{ repo_service_home_folder }}/repo/venvs"
|
||||||
|
- path: "/var/lib/nginx"
|
||||||
- path: "/var/log/nginx"
|
- path: "/var/log/nginx"
|
||||||
mode: "0775"
|
mode: "0775"
|
||||||
- path: "/var/log/pypiserver"
|
- path: "/var/log/pypiserver"
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
|
|
||||||
systemd_utils_prefix: "/lib/systemd"
|
systemd_utils_prefix: "/lib/systemd"
|
||||||
|
|
||||||
|
repo_nginx_repo: http://nginx.org/packages/centos/7/$basearch/
|
||||||
|
repo_nginx_gpg_key: http://nginx.org/keys/nginx_signing.key
|
||||||
repo_nginx_pid: /run/nginx.pid
|
repo_nginx_pid: /run/nginx.pid
|
||||||
|
|
||||||
git_daemon_path: /usr/libexec/git-core/git-daemon
|
git_daemon_path: /usr/libexec/git-core/git-daemon
|
||||||
|
Loading…
Reference in New Issue
Block a user