workstations.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # - name: Actualizacion del sistema
  2. # hosts: all
  3. # become: yes
  4. # gather_facts: no
  5. # tasks:
  6. # - name: Update & Upgrade
  7. # apt:
  8. # update_cache: yes
  9. # upgrade: dist
  10. - name: Madrid
  11. hosts: workstation11, workstation21
  12. become: yes
  13. gather_facts: no
  14. tasks:
  15. - name: touch
  16. file:
  17. path: /home/vagrant/madrid
  18. state: touch
  19. - name: Paris
  20. hosts: workstation12, workstation22
  21. become: yes
  22. gather_facts: no
  23. tasks:
  24. - name: touch
  25. file:
  26. path: /home/vagrant/paris
  27. state: touch
  28. - name: New York
  29. hosts: workstation13, workstation23
  30. become: yes
  31. gather_facts: no
  32. tasks:
  33. - name: touch
  34. file:
  35. path: /home/vagrant/newyork
  36. state: touch
  37. # Añadir el repositorio oficial de Virtualbox Oracle https://download.virtualbox.org/virtualbox/debian jammy contrib
  38. - name: AñadirVirtualbox Oracle
  39. hosts: workstation11, workstation21
  40. become: yes
  41. gather_facts: no
  42. tasks:
  43. - name: Añadir repositorio Virtualbox Oracle
  44. block:
  45. - name: somerepo no apt key
  46. ansible.builtin.get_url:
  47. url: https://www.virtualbox.org/download/oracle_vbox_2016.asc
  48. dest: /etc/apt/trusted.gpg.d/oracle_vbox_2016.asc
  49. - name: somerepo apt source
  50. ansible.builtin.apt_repository:
  51. repo: "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/oracle_vbox_2016.asc] https://download.virtualbox.org/virtualbox/debian jammy contrib"
  52. state: present
  53. - name: Instalar virtualbox
  54. apt:
  55. name: virtualbox
  56. state: present