diff --git a/defaults/main.yml b/defaults/main.yml index 145e6dd..786d9ca 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -23,6 +23,10 @@ repo_nginx_threads: "{{ [[ansible_processor_vcpus|default(2) // 2, 1] | max, rep ## APT Cache Options cache_timeout: 600 +## Centos EPEL repository options +repo_centos_epel_mirror: "{{ centos_epel_mirror | default('http://download.fedoraproject.org/pub/epel') }}" +repo_centos_epel_key: "{{ centos_epel_key | default('http://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7') }}" + # Set the package install state for distribution and pip packages # Options are 'present' and 'latest' repo_server_package_state: "latest" @@ -47,4 +51,4 @@ repo_git_cache_dirname: openstackgit repo_git_cache_dir: "{{ repo_service_home_folder }}/repo/{{ repo_git_cache_dirname }}" # Set the log directory -repo_service_log_dir: /var/log/apt-cacher-ng \ No newline at end of file +repo_service_log_dir: /var/log/apt-cacher-ng diff --git a/releasenotes/notes/centos-private-epel-3fe4c9ff68ec3a18.yaml b/releasenotes/notes/centos-private-epel-3fe4c9ff68ec3a18.yaml new file mode 100644 index 0000000..56df38d --- /dev/null +++ b/releasenotes/notes/centos-private-epel-3fe4c9ff68ec3a18.yaml @@ -0,0 +1,6 @@ +--- +features: + - You can set a private repository for epel, you must use + ``repo_centos_epel_mirror`` for the repo URL and if you need to get the GPG + key from intranet or a mirror use ``repo_centos_epel_key`` for gpg key + location. diff --git a/tasks/repo_install.yml b/tasks/repo_install.yml index f070399..ecb6708 100644 --- a/tasks/repo_install.yml +++ b/tasks/repo_install.yml @@ -15,7 +15,7 @@ - name: Install EPEL gpg keys rpm_key: - key: "http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7" + key: "{{ repo_centos_epel_key }}" state: present when: - ansible_pkg_mgr in ['yum', 'dnf'] @@ -27,7 +27,7 @@ - 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 }}" + baseurl: "{{ repo_centos_epel_mirror ~ '/' ~ ansible_distribution_major_version ~ '/' ~ ansible_architecture }}" description: 'Extra Packages for Enterprise Linux 7 - $basearch' gpgcheck: yes enabled: yes