1. apt-get install -y openssh-server git-core python-jinja2 python-paramiko python-yaml
  2. # clona dove vuoi ansible, la agg. con git pull nella dir
  3. # dove l'hai clonata
  4. git --bare clone git://github.com/ansible/ansible.git
  5. # qui è l'ambiente necessario a farla andare
  6. export PATH=${ANSIBLE_DIST_DIR}/ansible/bin:$PATH
  7. export PYTHONPATH=${ANSIBLE_DIST_DIR}/ansible/lib
  8. export ANSIBLE_LIBRARY=${ANSIBLE_DIST_DIR}/ansible/library
  9. export MANPATH=${ANSIBLE_DIST_DIR}/ansible/docs/man:$MANPATH
  10. # per deployare qualcosa ad es.
  11. ansible-playbook setup.yml --connection=local -K
  12. # dove setup.yml ad es. contiene
  13. ---
  14. - hosts: localhost
  15. user: tuoUtente
  16. sudo: yes
  17. tasks:
  18. - name: "Installo nome"
  19. apt: pkg=nomePkgDaInstallare state=latest
  20. - name: "Creo una dir in /tmp (se non c'è)"
  21. file: path=/tmp/DirDiProva state=directory owner=NomeUtente
  22. group=NomeGruppo mode=0700
  23. # ecc ecc ecc qui http://docs.ansible.com/list_of_all_modules.html
  24. # trovi tutti i moduli (gli apt:, file: ecc che puoi usare come
  25. # tasks)
  26. # Ovviamente questa è una SUPERBASE, normalmente si spezza in più files
  27. # inclusi ad es. con
  28. # - include: "nomeDelPlay.yml tags=UnNomeMnemonicoSeVuoi"
  29. # ecc. Occhio solo all'indent!

openssh-server ti serve perché anche in locale Ansible usa ssh per aprire una shell...