On 28. juni 2016 19:51, teddy mills wrote:
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.
--
Kai Stian Olstad
--
You received this message because you are subscribed to the Google Groups "Ansible
Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/5772E826.2030908%40olstad.com.
For more options, visit https://groups.google.com/d/optout.