Use Vagrantfile to build virtual site
[icn.git] / deploy / metal3-vm / vm-setup / roles / libvirt / tasks / install_setup_tasks.yml
1 # Install the packages required for our desired libvirt environment.
2 # We store the list of packages in `libvirt_packages` so that in
3 # theory we can support multiple distributions simply by passing in a
4 # different list of packages.
5 - name: Install packages for libvirt
6   package:
7     name: "{{ libvirt_packages }}"
8     state: present
9   become: true
10   when: ansible_os_family == "RedHat" and ansible_lsb.major_release|int == 7
11
12 - name: Install packages for libvirt
13   package:
14     name: "{{ libvirt_packages_rhel8 }}"
15     state: present
16   become: true
17   when: ansible_os_family == "RedHat" and ansible_lsb.major_release|int == 8
18
19 - name: Install packages for libvirt on Ubuntu
20   when: 
21     - ansible_facts['distribution'] == "Ubuntu"
22   package:
23     name: "{{ ubuntu_libvirt_packages }}"
24     state: present
25   become: true
26
27 - name: Start libvirtd
28   service:
29     name: "{{ libvirtd_service }}"
30     state: started
31     enabled: true
32   become: true