# - name: Actualizacion del sistema # hosts: all # become: yes # gather_facts: no # tasks: # - name: Update & Upgrade # apt: # update_cache: yes # upgrade: dist - name: Madrid hosts: workstation11, workstation21 become: yes gather_facts: no tasks: - name: touch file: path: /home/vagrant/madrid state: touch - name: Paris hosts: workstation12, workstation22 become: yes gather_facts: no tasks: - name: touch file: path: /home/vagrant/paris state: touch - name: New York hosts: workstation13, workstation23 become: yes gather_facts: no tasks: - name: touch file: path: /home/vagrant/newyork state: touch # Añadir el repositorio oficial de Virtualbox Oracle https://download.virtualbox.org/virtualbox/debian jammy contrib - name: AñadirVirtualbox Oracle hosts: workstation11, workstation21 become: yes gather_facts: no tasks: - name: Añadir repositorio Virtualbox Oracle block: - name: somerepo no apt key ansible.builtin.get_url: url: https://www.virtualbox.org/download/oracle_vbox_2016.asc dest: /etc/apt/trusted.gpg.d/oracle_vbox_2016.asc - name: somerepo apt source ansible.builtin.apt_repository: repo: "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/oracle_vbox_2016.asc] https://download.virtualbox.org/virtualbox/debian jammy contrib" state: present - name: Instalar virtualbox apt: name: virtualbox state: present