Add NixOS

This commit is contained in:
Greg Hellings
2023-08-13 23:58:13 -05:00
parent 10e5ea47b2
commit ea93524e43
10 changed files with 296 additions and 59 deletions
+40 -3
View File
@@ -2,20 +2,57 @@
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'
when:
- packer_builder_type == 'virtualbox-iso'
- role: vmware
when: packer_builder_type == 'vmware-iso'
when:
- packer_builder_type == 'vmware-iso'
- ansible_facts.distribution not in no_touchy
- role: qemu
when: packer_builder_type == '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