From b12b212f6a4b30f3ad039fca3d7638248c464184 Mon Sep 17 00:00:00 2001 From: Aaron Guise Date: Sun, 2 May 2021 17:12:46 +1200 Subject: [PATCH] Initial Project import --- .travis.yml | 29 ++++ .yamllint | 33 +++++ README.md | 38 ++++++ defaults/main.yml | 4 + handlers/main.yml | 2 + meta/main.yml | 53 ++++++++ molecule/default/INSTALL.rst | 22 +++ molecule/default/converge.yml | 7 + molecule/default/molecule.yml | 16 +++ molecule/default/verify.yml | 23 ++++ molecule/mirror-is-set/INSTALL.rst | 22 +++ molecule/mirror-is-set/converge.yml | 10 ++ molecule/mirror-is-set/molecule.yml | 19 +++ molecule/mirror-is-set/verify.yml | 25 ++++ tasks/main.yml | 29 ++++ templates/almalinux-ha.repo.j2 | 39 ++++++ templates/almalinux.repo.j2 | 147 +++++++++++++++++++++ templates/el7-epel-testing.repo.j2 | 35 +++++ templates/el7-epel.repo.j2 | 35 +++++ templates/el8-epel-modular.repo.j2 | 33 +++++ templates/el8-epel-playground.repo.j2 | 33 +++++ templates/el8-epel-testing-modular.repo.j2 | 33 +++++ templates/el8-epel-testing.repo.j2 | 33 +++++ templates/el8-epel.repo.j2 | 33 +++++ tests/inventory | 2 + tests/test.yml | 5 + vars/main.yml | 2 + 27 files changed, 762 insertions(+) create mode 100644 .travis.yml create mode 100644 .yamllint create mode 100644 README.md create mode 100644 defaults/main.yml create mode 100644 handlers/main.yml create mode 100644 meta/main.yml create mode 100644 molecule/default/INSTALL.rst create mode 100644 molecule/default/converge.yml create mode 100644 molecule/default/molecule.yml create mode 100644 molecule/default/verify.yml create mode 100644 molecule/mirror-is-set/INSTALL.rst create mode 100644 molecule/mirror-is-set/converge.yml create mode 100644 molecule/mirror-is-set/molecule.yml create mode 100644 molecule/mirror-is-set/verify.yml create mode 100644 tasks/main.yml create mode 100644 templates/almalinux-ha.repo.j2 create mode 100644 templates/almalinux.repo.j2 create mode 100644 templates/el7-epel-testing.repo.j2 create mode 100644 templates/el7-epel.repo.j2 create mode 100644 templates/el8-epel-modular.repo.j2 create mode 100644 templates/el8-epel-playground.repo.j2 create mode 100644 templates/el8-epel-testing-modular.repo.j2 create mode 100644 templates/el8-epel-testing.repo.j2 create mode 100644 templates/el8-epel.repo.j2 create mode 100644 tests/inventory create mode 100644 tests/test.yml create mode 100644 vars/main.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..36bbf62 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,29 @@ +--- +language: python +python: "2.7" + +# Use the new container infrastructure +sudo: false + +# Install ansible +addons: + apt: + packages: + - python-pip + +install: + # Install ansible + - pip install ansible + + # Check ansible version + - ansible --version + + # Create ansible.cfg with correct roles_path + - printf '[defaults]\nroles_path=../' >ansible.cfg + +script: + # Basic role syntax check + - ansible-playbook tests/test.yml -i tests/inventory --syntax-check + +notifications: + webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..8827676 --- /dev/null +++ b/.yamllint @@ -0,0 +1,33 @@ +--- +# Based on ansible-lint config +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + colons: + max-spaces-after: -1 + level: error + commas: + max-spaces-after: -1 + level: error + comments: disable + comments-indentation: disable + document-start: disable + empty-lines: + max: 3 + level: error + hyphens: + level: error + indentation: disable + key-duplicates: enable + line-length: disable + new-line-at-end-of-file: disable + new-lines: + type: unix + trailing-spaces: disable + truthy: disable diff --git a/README.md b/README.md new file mode 100644 index 0000000..225dd44 --- /dev/null +++ b/README.md @@ -0,0 +1,38 @@ +Role Name +========= + +A brief description of the role goes here. + +Requirements +------------ + +Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. + +Role Variables +-------------- + +A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. + +Dependencies +------------ + +A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. + +Example Playbook +---------------- + +Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: + + - hosts: servers + roles: + - { role: username.rolename, x: 42 } + +License +------- + +BSD + +Author Information +------------------ + +An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/defaults/main.yml b/defaults/main.yml new file mode 100644 index 0000000..e589847 --- /dev/null +++ b/defaults/main.yml @@ -0,0 +1,4 @@ +--- +# defaults file for repo-epel +epel_specify_mirror: false +epel_mirror_url: http://download.fedoraproject.org/pub \ No newline at end of file diff --git a/handlers/main.yml b/handlers/main.yml new file mode 100644 index 0000000..f90c197 --- /dev/null +++ b/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for repo-epel \ No newline at end of file diff --git a/meta/main.yml b/meta/main.yml new file mode 100644 index 0000000..227ad9c --- /dev/null +++ b/meta/main.yml @@ -0,0 +1,53 @@ +galaxy_info: + author: your name + description: your role description + company: your company (optional) + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: license (GPL-2.0-or-later, MIT, etc) + + min_ansible_version: 2.9 + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + # platforms: + # - name: Fedora + # versions: + # - all + # - 25 + # - name: SomePlatform + # versions: + # - all + # - 1.0 + # - 7 + # - 99.99 + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. + \ No newline at end of file diff --git a/molecule/default/INSTALL.rst b/molecule/default/INSTALL.rst new file mode 100644 index 0000000..6a44bde --- /dev/null +++ b/molecule/default/INSTALL.rst @@ -0,0 +1,22 @@ +******* +Docker driver installation guide +******* + +Requirements +============ + +* Docker Engine + +Install +======= + +Please refer to the `Virtual environment`_ documentation for installation best +practices. If not using a virtual environment, please consider passing the +widely recommended `'--user' flag`_ when invoking ``pip``. + +.. _Virtual environment: https://virtualenv.pypa.io/en/latest/ +.. _'--user' flag: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site + +.. code-block:: bash + + $ pip install 'molecule[docker]' diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml new file mode 100644 index 0000000..bcf604d --- /dev/null +++ b/molecule/default/converge.yml @@ -0,0 +1,7 @@ +--- +- name: Converge + hosts: all + tasks: + - name: "Include repo-epel" + include_role: + name: "repo-epel" diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml new file mode 100644 index 0000000..3d4de27 --- /dev/null +++ b/molecule/default/molecule.yml @@ -0,0 +1,16 @@ +--- +dependency: + name: galaxy +driver: + name: docker +platforms: + - name: centos7 + image: docker.io/pycontribs/centos:7 + pre_build_image: true + - name: almalinux + image: docker.io/almalinux/almalinux:8 + pre_build_image: false +provisioner: + name: ansible +verifier: + name: ansible diff --git a/molecule/default/verify.yml b/molecule/default/verify.yml new file mode 100644 index 0000000..7695064 --- /dev/null +++ b/molecule/default/verify.yml @@ -0,0 +1,23 @@ +--- +# This is an example playbook to execute Ansible tests. + +- name: Verify + hosts: all + tasks: + - name: Retrieve yum repofile + shell: cat /etc/yum.repos.d/epel.repo + ignore_errors: true + register: repofile + + - debug: + var: repofile + + - name: metalink is present + assert: + that: + - "'metalink=' in repofile.stdout" + + - name: baseurl is not defined + assert: + that: + - "'baseurl=' not in repofile.stdout" diff --git a/molecule/mirror-is-set/INSTALL.rst b/molecule/mirror-is-set/INSTALL.rst new file mode 100644 index 0000000..6a44bde --- /dev/null +++ b/molecule/mirror-is-set/INSTALL.rst @@ -0,0 +1,22 @@ +******* +Docker driver installation guide +******* + +Requirements +============ + +* Docker Engine + +Install +======= + +Please refer to the `Virtual environment`_ documentation for installation best +practices. If not using a virtual environment, please consider passing the +widely recommended `'--user' flag`_ when invoking ``pip``. + +.. _Virtual environment: https://virtualenv.pypa.io/en/latest/ +.. _'--user' flag: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site + +.. code-block:: bash + + $ pip install 'molecule[docker]' diff --git a/molecule/mirror-is-set/converge.yml b/molecule/mirror-is-set/converge.yml new file mode 100644 index 0000000..ff18430 --- /dev/null +++ b/molecule/mirror-is-set/converge.yml @@ -0,0 +1,10 @@ +--- +- name: Converge + hosts: all + tasks: + - name: "Include repo-almalinux" + include_role: + name: "repo-epel" + vars: + epel_specify_mirror: true + epel_mirror_url: https://someproxyormirror.org.nz diff --git a/molecule/mirror-is-set/molecule.yml b/molecule/mirror-is-set/molecule.yml new file mode 100644 index 0000000..f3397bb --- /dev/null +++ b/molecule/mirror-is-set/molecule.yml @@ -0,0 +1,19 @@ +--- +dependency: + name: galaxy +driver: + name: docker +platforms: + - name: alma + image: docker.io/guisea/py-almalinux + pre_build_image: true + - name: centos7 + image: docker.io/pycontribs/centos:7 + pre_build_image: true + - name: centos8 + image: docker.io/pycontribs/centos:8 + pre_build_image: true +provisioner: + name: ansible +verifier: + name: ansible \ No newline at end of file diff --git a/molecule/mirror-is-set/verify.yml b/molecule/mirror-is-set/verify.yml new file mode 100644 index 0000000..3174094 --- /dev/null +++ b/molecule/mirror-is-set/verify.yml @@ -0,0 +1,25 @@ +--- +# This is an example playbook to execute Ansible tests. + +- name: Verify + hosts: all + tasks: + - name: Retrieve yum repofile + shell: cat /etc/yum.repos.d/epel.repo + ignore_errors: true + register: repofile + + - name: metalink is not present + assert: + that: + - "'metalink=' not in repofile.stdout" + + - name: baseurl is defined + assert: + that: + - "'baseurl=' in repofile.stdout" + + - name: mirror is specified correctly + assert: + that: + - "'https://someproxyormirror.org.nz' in repofile.stdout" diff --git a/tasks/main.yml b/tasks/main.yml new file mode 100644 index 0000000..ad330ba --- /dev/null +++ b/tasks/main.yml @@ -0,0 +1,29 @@ +--- +# tasks file for repo-epel +- name: Configure Repository Settings (EL7) + template: + src: "{{ item.src }}" + dest: "{{ item.dest }}" + with_items: + - src: el7-epel.repo.j2 + dest: /etc/yum.repos.d/epel.repo + - src: el7-epel-testing.repo.j2 + dest: /etc/yum.repos.d/epel-testing.repo + when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "7" + +- name: Configure Repository Settings (EL8) + template: + src: "{{ item.src }}" + dest: "{{ item.dest }}" + with_items: + - src: el8-epel.repo.j2 + dest: /etc/yum.repos.d/epel.repo + - src: el8-epel-modular.repo.j2 + dest: /etc/yum.repos.d/epel-modular.repo + - src: el8-epel-playground.repo.j2 + dest: /etc/yum.repos.d/epel-playground.repo + - src: el8-epel-testing.repo.j2 + dest: /etc/yum.repos.d/epel-testing.repo + - src: el8-epel-testing-modular.repo.j2 + dest: /etc/yum.repos.d/epel-testing-modular.repo + when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "8" \ No newline at end of file diff --git a/templates/almalinux-ha.repo.j2 b/templates/almalinux-ha.repo.j2 new file mode 100644 index 0000000..5dca93e --- /dev/null +++ b/templates/almalinux-ha.repo.j2 @@ -0,0 +1,39 @@ +# almalinux-ha.repo + +[ha] +name=AlmaLinux $releasever - HighAvailability +{% if almalinux_specify_mirror is sameas true %} +baseurl={{ almalinux_mirror_url }}/almalinux/$releasever/HighAvailability/$basearch/os/ +{% else %} +mirrorlist=https://mirrors.almalinux.org/mirrorlist/$releasever/ha +{% endif %} +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux +fastestmirror=1 + +## Sources +[ha-source] +name=AlmaLinux $releasever - HighAvailability Source +{% if almalinux_specify_mirror is sameas true %} +baseurl={{ almalinux_mirror_url }}/almalinux/$releasever/HighAvailability/Source/ +{% else %} +mirrorlist=https://mirrors.almalinux.org/mirrorlist/$releasever/ha-source +{% endif %} +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux +fastestmirror=1 + +## Debuginfo +[ha-debuginfo] +name=AlmaLinux $releasever - HighAvailability debuginfo +{% if almalinux_specify_mirror is sameas true %} +baseurl={{ almalinux_mirror_url }}/almalinux/$releasever/HighAvailability/debug/$basearch/ +{% else %} +mirrorlist=https://mirrors.almalinux.org/mirrorlist/$releasever/ha-debuginfo +{% endif %} +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux +fastestmirror=1 \ No newline at end of file diff --git a/templates/almalinux.repo.j2 b/templates/almalinux.repo.j2 new file mode 100644 index 0000000..51c6249 --- /dev/null +++ b/templates/almalinux.repo.j2 @@ -0,0 +1,147 @@ +# almalinux.repo + +[baseos] +name=AlmaLinux $releasever - BaseOS +{% if almalinux_specify_mirror is sameas true %} +baseurl={{ almalinux_mirror_url }}/almalinux/$releasever/BaseOS/$basearch/os/ +{% else %} +mirrorlist=https://mirrors.almalinux.org/mirrorlist/$releasever/baseos +{% endif %} +enabled=1 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux +fastestmirror=1 + +[appstream] +name=AlmaLinux $releasever - AppStream +{% if almalinux_specify_mirror is sameas true %} +baseurl={{ almalinux_mirror_url }}/almalinux/$releasever/AppStream/$basearch/os/ +{% else %} +mirrorlist=https://mirrors.almalinux.org/mirrorlist/$releasever/appstream +{% endif %} +enabled=1 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux +fastestmirror=1 + +[powertools] +name=AlmaLinux $releasever - PowerTools +{% if almalinux_specify_mirror is sameas true %} +baseurl={{ almalinux_mirror_url }}/almalinux/$releasever/PowerTools/$basearch/os/ +{% else %} +mirrorlist=https://mirrors.almalinux.org/mirrorlist/$releasever/powertools +{% endif %} +enabled=1 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux +fastestmirror=1 + +[extras] +name=AlmaLinux $releasever - Extras +{% if almalinux_specify_mirror is sameas true %} +baseurl={{ almalinux_mirror_url }}/almalinux/$releasever/extras/$basearch/os/ +{% else %} +mirrorlist=https://mirrors.almalinux.org/mirrorlist/$releasever/extras +{% endif %} +enabled=1 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux +fastestmirror=1 + +## Sources +[baseos-source] +name=AlmaLinux $releasever - BaseOS Source +{% if almalinux_specify_mirror is sameas true %} +baseurl={{ almalinux_mirror_url }}/almalinux/$releasever/BaseOS/Source/ +{% else %} +mirrorlist=https://mirrors.almalinux.org/mirrorlist/$releasever/baseos-source +{% endif %} +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux +fastestmirror=1 + +[appstream-source] +name=AlmaLinux $releasever - AppStream Source +{% if almalinux_specify_mirror is sameas true %} +baseurl={{ almalinux_mirror_url }}/almalinux/$releasever/AppStream/Source/ +{% else %} +mirrorlist=https://mirrors.almalinux.org/mirrorlist/$releasever/appstream-source +{% endif %} +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux +fastestmirror=1 + +[powertools-source] +name=AlmaLinux $releasever - PowerTools Source +{% if almalinux_specify_mirror is sameas true %} +baseurl={{ almalinux_mirror_url }}/almalinux/$releasever/PowerTools/Source/ +{% else %} +mirrorlist=https://mirrors.almalinux.org/mirrorlist/$releasever/powertools-source +{% endif %} +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux +fastestmirror=1 + +[extras-source] +name=AlmaLinux $releasever - Extras Source +{% if almalinux_specify_mirror is sameas true %} +baseurl={{ almalinux_mirror_url }}/almalinux/$releasever/extras/Source/ +{% else %} +mirrorlist=https://mirrors.almalinux.org/mirrorlist/$releasever/extras-source +{% endif %} +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux +fastestmirror=1 + +## Debuginfo +[baseos-debuginfo] +name=AlmaLinux $releasever - BaseOS debuginfo +{% if almalinux_specify_mirror is sameas true %} +baseurl={{ almalinux_mirror_url }}/almalinux/$releasever/BaseOS/debug/$basearch/ +{% else %} +mirrorlist=https://mirrors.almalinux.org/mirrorlist/$releasever/baseos-debuginfo +{% endif %} +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux +fastestmirror=1 + +[appstream-debuginfo] +name=AlmaLinux $releasever - AppStream debuginfo +{% if almalinux_specify_mirror is sameas true %} +baseurl={{ almalinux_mirror_url }}/almalinux/$releasever/AppStream/debug/$basearch/ +{% else %} +mirrorlist=https://mirrors.almalinux.org/mirrorlist/$releasever/appstream-debuginfo +{% endif %} +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux +fastestmirror=1 + +[powertools-debuginfo] +name=AlmaLinux $releasever - PowerTools debuginfo +{% if almalinux_specify_mirror is sameas true %} +baseurl={{ almalinux_mirror_url }}/almalinux/$releasever/PowerTools/debug/$basearch/ +{% else %} +mirrorlist=https://mirrors.almalinux.org/mirrorlist/$releasever/powertools-debuginfo +{% endif %} +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux +fastestmirror=1 + +[extras-debuginfo] +name=AlmaLinux $releasever - Extras debuginfo +{% if almalinux_specify_mirror is sameas true %} +baseurl={{ almalinux_mirror_url }}/almalinux/$releasever/extras/debug/$basearch/ +{% else %} +mirrorlist=https://mirrors.almalinux.org/mirrorlist/$releasever/extras-debuginfo +{% endif %} +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux +fastestmirror=1 \ No newline at end of file diff --git a/templates/el7-epel-testing.repo.j2 b/templates/el7-epel-testing.repo.j2 new file mode 100644 index 0000000..e7a6649 --- /dev/null +++ b/templates/el7-epel-testing.repo.j2 @@ -0,0 +1,35 @@ +[epel-testing] +name=Extra Packages for Enterprise Linux 7 - Testing - $basearch +{% if epel_specify_mirror is sameas true %} +baseurl={{ epel_mirror_url }}/epel/testing/7/$basearch +{% else %} +metalink=https://mirrors.fedoraproject.org/metalink?repo=testing-epel7&arch=$basearch +{% endif %} +failovermethod=priority +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 + +[epel-testing-debuginfo] +name=Extra Packages for Enterprise Linux 7 - Testing - $basearch - Debug +{% if epel_specify_mirror is sameas true %} +baseurl={{ epel_mirror_url }}/epel/testing/7/$basearch/debug +{% else %} +metalink=https://mirrors.fedoraproject.org/metalink?repo=testing-debug-epel7&arch=$basearch +{% endif %} +failovermethod=priority +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 +gpgcheck=1 + +[epel-testing-source] +name=Extra Packages for Enterprise Linux 7 - Testing - $basearch - Source +{% if epel_specify_mirror is sameas true %} +baseurl={{ epel_mirror_url }}/epel/testing/7/SRPMS +{% else %} +metalink=https://mirrors.fedoraproject.org/metalink?repo=testing-source-epel7&arch=$basearch +{% endif %} +failovermethod=priority +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 +gpgcheck=1 \ No newline at end of file diff --git a/templates/el7-epel.repo.j2 b/templates/el7-epel.repo.j2 new file mode 100644 index 0000000..7b88854 --- /dev/null +++ b/templates/el7-epel.repo.j2 @@ -0,0 +1,35 @@ +[epel] +name=Extra Packages for Enterprise Linux 7 - $basearch +{% if epel_specify_mirror is sameas true %} +baseurl={{ epel_mirror_url }}/epel/7/$basearch +{% else %} +metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch +{% endif %} +failovermethod=priority +enabled=1 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 + +[epel-debuginfo] +name=Extra Packages for Enterprise Linux 7 - $basearch - Debug +{% if epel_specify_mirror is sameas true %} +baseurl={{ epel_mirror_url }}/epel/7/$basearch/debug +{% else %} +metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch +{% endif %} +failovermethod=priority +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 +gpgcheck=1 + +[epel-source] +name=Extra Packages for Enterprise Linux 7 - $basearch - Source +{% if epel_specify_mirror is sameas true %} +baseurl={{ epel_mirror_url }}/epel/7/SRPMS +{% else %} +metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch +{% endif %} +failovermethod=priority +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 +gpgcheck=1 \ No newline at end of file diff --git a/templates/el8-epel-modular.repo.j2 b/templates/el8-epel-modular.repo.j2 new file mode 100644 index 0000000..577e459 --- /dev/null +++ b/templates/el8-epel-modular.repo.j2 @@ -0,0 +1,33 @@ +[epel-modular] +name=Extra Packages for Enterprise Linux Modular $releasever - $basearch +{% if epel_specify_mirror is sameas true %} +baseurl={{ epel_mirror_url }}/epel/$releasever/Modular/$basearch +{% else %} +metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-modular-$releasever&arch=$basearch&infra=$infra&content=$contentdir +{% endif %} +enabled=1 +gpgcheck=1 +countme=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 + +[epel-modular-debuginfo] +name=Extra Packages for Enterprise Linux Modular $releasever - $basearch - Debug +{% if epel_specify_mirror is sameas true %} +baseurl={{ epel_mirror_url }}/epel/$releasever/Modular/$basearch/debug +{% else %} +metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-modular-debug-$releasever&arch=$basearch&infra=$infra&content=$contentdir +{% endif %} +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 +gpgcheck=1 + +[epel-modular-source] +name=Extra Packages for Enterprise Linux Modular $releasever - $basearch - Source +{% if epel_specify_mirror is sameas true %} +baseurl={{ epel_mirror_url }}/epel/$releasever/Modular/SRPMS +{% else %} +metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-modular-source-$releasever&arch=$basearch&infra=$infra&content=$contentdir +{% endif %} +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 +gpgcheck=1 \ No newline at end of file diff --git a/templates/el8-epel-playground.repo.j2 b/templates/el8-epel-playground.repo.j2 new file mode 100644 index 0000000..ad4a1ad --- /dev/null +++ b/templates/el8-epel-playground.repo.j2 @@ -0,0 +1,33 @@ +[epel-playground] +name=Extra Packages for Enterprise Linux $releasever - Playground - $basearch +{% if epel_specify_mirror is sameas true %} +baseurl={{ epel_mirror_url }}/epel/playground/$releasever/Everything/$basearch/os +{% else %} +metalink=https://mirrors.fedoraproject.org/metalink?repo=playground-epel$releasever&arch=$basearch&infra=$infra&content=$contentdir +{% endif %} +enabled=0 +gpgcheck=1 +countme=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 + +[epel-playground-debuginfo] +name=Extra Packages for Enterprise Linux $releasever - Playground - $basearch - Debug +{% if epel_specify_mirror is sameas true %} +baseurl={{ epel_mirror_url }}/epel/playground/$releasever/Everything/$basearch/debug +{% else %} +metalink=https://mirrors.fedoraproject.org/metalink?repo=playground-debug-epel$releasever&arch=$basearch&infra=$infra&content=$contentdir +{% endif %} +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 +gpgcheck=1 + +[epel-playground-source] +name=Extra Packages for Enterprise Linux $releasever - Playground - $basearch - Source +{% if epel_specify_mirror is sameas true %} +baseurl={{ epel_mirror_url }}/epel/playground/$releasever/Everything/source/tree/ +{% else %} +metalink=https://mirrors.fedoraproject.org/metalink?repo=playground-source-epel$releasever&arch=$basearch&infra=$infra&content=$contentdir +{% endif %} +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 +gpgcheck=1 \ No newline at end of file diff --git a/templates/el8-epel-testing-modular.repo.j2 b/templates/el8-epel-testing-modular.repo.j2 new file mode 100644 index 0000000..6d5983f --- /dev/null +++ b/templates/el8-epel-testing-modular.repo.j2 @@ -0,0 +1,33 @@ +[epel-testing-modular] +name=Extra Packages for Enterprise Linux Modular $releasever - Testing - $basearch +{% if epel_specify_mirror is sameas true %} +baseurl={{ epel_mirror_url }}/epel/testing/$releasever/Modular/$basearch +{% else %} +metalink=https://mirrors.fedoraproject.org/metalink?repo=testing-modular-epel$releasever&arch=$basearch&infra=$infra&content=$contentdir +{% endif %} +enabled=0 +gpgcheck=1 +countme=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 + +[epel-testing-modular-debuginfo] +name=Extra Packages for Enterprise Linux Modular $releasever - Testing - $basearch - Debug +{% if epel_specify_mirror is sameas true %} +baseurl={{ epel_mirror_url }}/epel/testing/$releasever/Modular/$basearch/debug +{% else %} +metalink=https://mirrors.fedoraproject.org/metalink?repo=testing-modular-debug-epel$releasever&arch=$basearch&infra=$infra&content=$contentdir +{% endif %} +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 +gpgcheck=1 + +[epel-testing-modular-source] +name=Extra Packages for Enterprise Linux Modular $releasever - Testing - $basearch - Source +{% if epel_specify_mirror is sameas true %} +baseurl={{ epel_mirror_url }}/epel/testing/$releasever/Modular/SRPMS +{% else %} +metalink=https://mirrors.fedoraproject.org/metalink?repo=testing-modular-source-epel$releasever&arch=$basearch&infra=$infra&content=$contentdir +{% endif %} +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 +gpgcheck=1 \ No newline at end of file diff --git a/templates/el8-epel-testing.repo.j2 b/templates/el8-epel-testing.repo.j2 new file mode 100644 index 0000000..6374784 --- /dev/null +++ b/templates/el8-epel-testing.repo.j2 @@ -0,0 +1,33 @@ +[epel-testing] +name=Extra Packages for Enterprise Linux $releasever - Testing - $basearch +{% if epel_specify_mirror is sameas true %} +baseurl={{ epel_mirror_url }}/epel/testing/$releasever/Everything/$basearch +{% else %} +metalink=https://mirrors.fedoraproject.org/metalink?repo=testing-epel$releasever&arch=$basearch&infra=$infra&content=$contentdir +{% endif %} +enabled=0 +gpgcheck=1 +countme=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 + +[epel-testing-debuginfo] +name=Extra Packages for Enterprise Linux $releasever - Testing - $basearch - Debug +{% if epel_specify_mirror is sameas true %} +baseurl={{ epel_mirror_url }}/epel/testing/$releasever/Everything/$basearch/debug +{% else %} +metalink=https://mirrors.fedoraproject.org/metalink?repo=testing-debug-epel$releasever&arch=$basearch&infra=$infra&content=$contentdir +{% endif %} +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 +gpgcheck=1 + +[epel-testing-source] +name=Extra Packages for Enterprise Linux $releasever - Testing - $basearch - Source +{% if epel_specify_mirror is sameas true %} +baseurl={{ epel_mirror_url }}/epel/testing/$releasever/Everything/SRPMS +{% else %} +metalink=https://mirrors.fedoraproject.org/metalink?repo=testing-source-epel$releasever&arch=$basearch&infra=$infra&content=$contentdir +{% endif %} +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 +gpgcheck=1 \ No newline at end of file diff --git a/templates/el8-epel.repo.j2 b/templates/el8-epel.repo.j2 new file mode 100644 index 0000000..4ac5d96 --- /dev/null +++ b/templates/el8-epel.repo.j2 @@ -0,0 +1,33 @@ +[epel] +name=Extra Packages for Enterprise Linux $releasever - $basearch +{% if epel_specify_mirror is sameas true %} +baseurl={{ epel_mirror_url }}/epel/$releasever/Everything/$basearch +{% else %} +metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-$releasever&arch=$basearch&infra=$infra&content=$contentdir +{% endif %} +enabled=1 +gpgcheck=1 +countme=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 + +[epel-debuginfo] +name=Extra Packages for Enterprise Linux $releasever - $basearch - Debug +{% if epel_specify_mirror is sameas true %} +baseurl={{ epel_mirror_url }}/epel/$releasever/Everything/$basearch/debug +{% else %} +metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-$releasever&arch=$basearch&infra=$infra&content=$contentdir +{% endif %} +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 +gpgcheck=1 + +[epel-source] +name=Extra Packages for Enterprise Linux $releasever - $basearch - Source +{% if epel_specify_mirror is sameas true %} +baseurl={{ epel_mirror_url }}/epel/$releasever/Everything/SRPMS +{% else %} +metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-source-$releasever&arch=$basearch&infra=$infra&content=$contentdir +{% endif %} +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 +gpgcheck=1 \ No newline at end of file diff --git a/tests/inventory b/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/tests/test.yml b/tests/test.yml new file mode 100644 index 0000000..3f7a288 --- /dev/null +++ b/tests/test.yml @@ -0,0 +1,5 @@ +--- +- hosts: localhost + remote_user: root + roles: + - repo-epel \ No newline at end of file diff --git a/vars/main.yml b/vars/main.yml new file mode 100644 index 0000000..63189bd --- /dev/null +++ b/vars/main.yml @@ -0,0 +1,2 @@ +--- +# vars file for repo-epel \ No newline at end of file