aboutsummaryrefslogblamecommitdiffstats
path: root/roles/vmm/tasks/main.yml
blob: 26580f253d6696e3aca8f56e669be11a2b805993 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                
                                      
                                              

                                      







                               


                                  


















                                                 
- name: create vmm directories
  file:
    path: "{{ item }}"
    owner: 0
    group: 0
    mode: 0770
    state: directory
  loop:
    - "{{ vmm_root_dir }}"
    - "{{ vmm_iso_dir }}"
    - "{{ vmm_disk_dir }}"

- name: include facts generation
  include_tasks: facts.yml

- name: include autoinstall generation
  include_tasks: autoinstall_configuration.yml
  tags: task_autoinstall_configuration

- name: include iso management
  include_tasks: iso.yml
  tags: task_iso

- name: include disk management
  include_tasks: disk.yml
  tags: task_disk

- name: include network management
  include_tasks: network.yml
  tags: task_network

- name: generate vmm configuration
  template:
    src: vm.conf.j2
    dest: "{{ vmm_configuration_file }}"
    owner: 0
    group: 0
    mode: 0640
  register: result

- name: lint vmm configuration
  command: "vmd -nf {{ vmm_configuration_file }}"
  when: result.changed

- name: restart and enable vmd
  service:
    name: vmd
    state: restarted
    enabled: true
remember that computers suck.