Files
vms/ansible/playbook.yml
T
2023-08-13 23:58:13 -05:00

59 lines
1.4 KiB
YAML

- name: install guest additions
hosts: default
vars:
ansible_remote_tmp: /tmp
no_touchy:
- NixOS
pre_tasks:
- name: Pause for a moment in case we need cloud-init to finish
ansible.builtin.pause:
seconds: 20
- name: Help with debugging
ansible.builtin.debug:
msg: "Detected distro: {{ ansible_facts['distribution'] }}"
- name: get build time
become: true
ansible.builtin.copy:
content: "{{ ansible_facts.date_time.date }} {{ ansible_facts.date_time.hour }}:{{ ansible_facts.date_time.minute }}"
dest: /etc/vagrant_box_build_time
owner: root
group: root
mode: 0644
roles:
- role: latest
when:
- ansible_facts.distribution not in no_touchy
- role: devroles.system.epel
- role: virtualbox
when:
- packer_builder_type == 'virtualbox-iso'
- role: vmware
when:
- packer_builder_type == 'vmware-iso'
- ansible_facts.distribution not in no_touchy
- role: qemu
when:
- packer_builder_type == 'qemu'
- role: init
when:
- ansible_facts.distribution not in no_touchy
- role: locale
when:
- ansible_facts.distribution not in no_touchy
- role: vagrant
when:
- ansible_facts.distribution not in no_touchy
- role: cleanup
when:
- ansible_facts.distribution not in no_touchy