This playbook works, but I dont think this is the proper way to install multiple packages.
Can someone correct this and show how it should be done ? TIA
ansible-playbook /root/aplays/core.pb -u teddy -k
This playbook works, but I dont think this is the proper way to install multiple packages.
Can someone correct this and show how it should be done ? TIA
ansible-playbook /root/aplays/core.pb -u teddy -k
This playbook works, but I dont think this is the proper way to install
multiple packages.
Can someone correct this and show how it should be done ? TIA
If it work and is understandable it's OK in my book, but it could be more condense.
ansible-playbook /root/aplays/core.pb -u teddy -k
#######################################
- hosts: teddy
sudo: true
tasks:
- name: install sysstat
apt: name=sysstat update_cache=yes state=latest- name: install htop
apt: name=htop update_cache=yes state=latest- name: install curl
apt: name=curl update_cache=yes state=latest- name: install bzip2
apt: name=bzip2 update_cache=yes state=latest- name: install lft
apt: name=lft update_cache=yes state=latest- name: install traceroute
apt: name=traceroute update_cache=yes state=latest- name: install ncdu
apt: name=ncdu update_cache=yes state=latest- name: install midnight-commander mc
apt: name=mc update_cache=yes state=latest- name: install screen
apt: name=screen update_cache=yes state=latest- name: install wget
apt: name=wget update_cache=yes state=latest
- name: install apt packages
apt: name={{ item }} update_cache=yes state=latest
with_items:
- sysstat
- htop
- curl
- bzip
I think you see the pattern, just continue to add the rest of the packages.