Giter Club home page Giter Club logo

ansible-role-epel-repo's Introduction

Ansible Role: christiangda.epel_repo

Master branch workflow Develop branch workflow Ansible Role

This role install EPEL Repository

The best wayt to install this role is using the command ansible-galaxy install christiangda.epel_repo, the Ansible Galaxy repository is christiangda.epel_repo

The repository code is https://github.com/christiangda/ansible-role-epel-repo

Requirements

This role work on RedHat, CentOS and Amazon Linux distributions

  • RedHat
    • 6
    • 7
    • 8
  • CentOS
    • 6
    • 7
    • 8
  • Rocky Linux
    • 8
  • Oracle Linux
    • 8
  • Amazon Linux
    • 1
    • 2

To see the compatibility matrix of Python vs. Ansible see the project Travis-CI build matrix

Role Variables

Variable Default Value
epel_enable_extras_repos false
epel_debug false

More Details: See the file defaults/main.yaml

Dependencies

None.

Example Playbook

RedHat

- hosts: servers
  gather_facts: True
  roles:
    - role: christiangda.epel_repo
      vars:
        epel_enable_redhat_extras_repos: true

Redhat/CentOS 6/7/8

- hosts: servers
  gather_facts: True
  roles:
    - role: christiangda.epel_repo

Amazon Linux 1/2 (my-playbook.yml)

- hosts: all
    gather_facts: True
    become: true
    become_user: root
    become_method: sudo
    remote_user: ec2-user
    roles:
      - christiangda.epel_repo

Inventory file sample

[all]
10.14.x.y
10.14.v.z

[amazon-1]
10.14.x.y

[amazon-2]
10.14.v.z
ansible-playbook my-playbook.yml \
    --inventory inventory \
    --private-key [~/location of my key.pem] \
    --become \
    --become-user=ec2-user \
    --user ec2-user

Development / Contributing

This role is tested using Molecule and was developed using Python Virtual Environments

Also, we used to main git branch

  • master
  • develop

If you want to contribute to this project what you want to do is

References

Prepare your environment

  • Python 3
mkdir ansible-roles
cd ansible-roles/

python3 -m venv venv
source venv/bin/activate
pip install pip --upgrade
pip install ansible
pip install molecule
pip install 'molecule[docker]'
pip install 'molecule[podman]'
pip install 'molecule[lint]'
pip install molecule-vagrant
pip install python-vagrant
pip install selinux
pip install docker
pip install pytest
pip install pytest-mock
pip install pylint
pip install rope
pip install autopep8
pip install yamllint
pip install flake8
pip install ansible-lint

Clone the role repository (From your fork) and create symbolic link

git clone https://github.com/<your github user>/ansible-role-epel-repo.git
ln -s ansible-role-epel-repo christiangda.epel_repo
cd christiangda.epel_repo

Execute the molecule test

Scenarios available:

  • default --> --driver-name docker
  • amazonlinux-1 --> --driver-name docker
  • amazonlinux-2 --> --driver-name docker
  • centos-8 --> --driver-name docker
  • centos-7 --> --driver-name docker
  • redhat-7 --> --driver-name docker
  • redhat-8 --> --driver-name docker

scenario default

Step by step

molecule create [--scenario-name default]
molecule converge [--scenario-name default]
molecule verify [--scenario-name default]
molecule destroy [--scenario-name default]

or

All in one

molecule test [--scenario-name default]

Additionally if you want to test it using VMs, I have a very nice ansible-playground project that use Vagrant and VirtualBox, try it!.

License

This module is released under the GNU General Public License Version 3:

Author Information

ansible-role-epel-repo's People

Contributors

christiangda avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.