Files
vms/ansible/playbook.yml
T

59 lines
1.4 KiB
YAML
Raw Normal View History

2022-05-02 22:03:37 -05:00
- name: install guest additions
hosts: default
2023-08-13 18:44:20 -05:00
vars:
ansible_remote_tmp: /tmp
2023-08-13 23:58:13 -05:00
no_touchy:
- NixOS
2022-05-02 22:03:37 -05:00
pre_tasks:
2023-08-03 14:44:02 -05:00
- name: Pause for a moment in case we need cloud-init to finish
ansible.builtin.pause:
seconds: 20
2023-08-13 23:58:13 -05:00
- 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
2022-05-02 22:03:37 -05:00
roles:
2023-08-13 18:44:20 -05:00
- role: latest
2023-08-13 23:58:13 -05:00
when:
- ansible_facts.distribution not in no_touchy
2022-06-22 10:00:04 -05:00
- role: devroles.system.epel
2023-08-13 23:58:13 -05:00
2022-05-02 22:03:37 -05:00
- role: virtualbox
2023-08-13 23:58:13 -05:00
when:
- packer_builder_type == 'virtualbox-iso'
2022-05-02 22:03:37 -05:00
- role: vmware
2023-08-13 23:58:13 -05:00
when:
- packer_builder_type == 'vmware-iso'
- ansible_facts.distribution not in no_touchy
2023-08-03 14:44:02 -05:00
- role: qemu
2023-08-13 23:58:13 -05:00
when:
- packer_builder_type == 'qemu'
2022-05-02 22:03:37 -05:00
- role: init
2023-08-13 23:58:13 -05:00
when:
- ansible_facts.distribution not in no_touchy
2022-05-02 22:03:37 -05:00
- role: locale
2023-08-13 23:58:13 -05:00
when:
- ansible_facts.distribution not in no_touchy
2022-05-02 22:03:37 -05:00
- role: vagrant
2023-08-13 23:58:13 -05:00
when:
- ansible_facts.distribution not in no_touchy
2022-05-02 22:03:37 -05:00
- role: cleanup
2023-08-13 23:58:13 -05:00
when:
- ansible_facts.distribution not in no_touchy