DevOps Tools/Configuration/Ansible/Playbook Examples
From r00tedvw.com wiki
Overview | Continuous Integration (CI) | Source Control Management (SCM) | Containerization | Configuration | Integration
Ansible | Playbook Examples
Playbook Examples
CentOS - ensure certain packages are installed
This uses the yum module
~$ cat /etc/ansible/playbooks/centos_base_packages.yml - hosts: centos tasks: - name: ensure a list of packages installed yum: name: "{{ packages }}" vars: packages: - telnet - net-tools - vim - tcpdump - bind-utils - redhat-lsb-core - wget - nfs-utils - policycoreutils-python - setroubleshoot - setools ~$ ansible-playbook /etc/ansible/playbooks/centos_base_packages.yml