This repository is dedicated to storing a collection of diverse roles designed to be executed within the Ansible. These roles aim to automate various tasks and streamline the configuration and management processes in our infrastructure.
MIT License
This is repository contains custom Ansible roles that can be used to automate tasks in a Linux environment. The roles are written in language Yaml and can be used to perform various tasks, such as installing packages, managing users, and configuring services.
The following roles are available in this repository:
To use these roles, you need to have Ansible installed on your system. You can install Ansible using the following command:
pip install ansible
You also need to have a basic understanding of Ansible and how to create playbooks to run the roles on your target hosts.
To use these roles, you need to have Ansible installed on your system. You can then create a playbook that includes the roles you want to run on your target hosts. For example, to run the commons
role on a group of servers, you can create a playbook like this:
- hosts: servers
roles:
- { role: commons, tags: commons }
You can then run the playbook using the ansible-playbook
command:
ansible-playbook -i inventory playbook.yml
Replace inventory
with the path to your inventory file and playbook.yml
with the path to your playbook file.
echo "[servers]" > inventory
echo "server1 ansible_host=xx.xx.xx.xx" >> inventory
echo "server2 ansible_host=xx.xx.xx.xx" >> inventory
echo "- hosts: servers" > playbook.yml
echo " roles:" >> playbook.yml
echo " - { role: commons, tags: commons }" >> playbook.yml