File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 1515    - name : Set a fact containing the virtualisation engine 
1616      set_fact :
1717        libvirt_vm_engine : >- 
18-           {%- if ansible_architecture  != libvirt_vm_arch -%} 
18+           {%- if ansible_facts.architecture  != libvirt_vm_arch -%} 
1919          {# Virtualisation instructions are generally available only for the host 
2020          architecture. Ideally we would test for virtualisation instructions, eg. vt-d 
2121          as it is possible that another architecture could support these even 
5959          when : kvm_emulator_result.stat.exists 
6060      when :
6161        - libvirt_vm_engine == 'qemu' 
62-         - ansible_os_family  == 'RedHat'
63-         - ansible_distribution_major_version  | int >= 8
62+         - ansible_facts.os_family  == 'RedHat'
63+         - ansible_facts.distribution_major_version  | int >= 8
6464
6565    - block :
6666        - name : Detect the QEMU emulator binary path 
7474
7575      when :
7676        - libvirt_vm_engine == 'qemu' 
77-         - ansible_os_family  != 'RedHat' or ansible_distribution_major_version  | int == 7
77+         - ansible_facts.os_family  != 'RedHat' or ansible_facts.distribution_major_version  | int == 7
7878
7979    - name : Fail if unable to detect the emulator 
8080      fail :
Original file line number Diff line number Diff line change 33  include_vars : " {{ item }}" 
44  with_first_found :
55    - files :
6-         - " {{ ansible_distribution  }}-{{ ansible_distribution_major_version  }}.yml" 
7-         - " {{ ansible_distribution  }}.yml" 
8-         - " {{ ansible_os_family  }}.yml" 
6+         - " {{ ansible_facts.distribution  }}-{{ ansible_facts.distribution_major_version  }}.yml" 
7+         - " {{ ansible_facts.distribution  }}.yml" 
8+         - " {{ ansible_facts.os_family  }}.yml" 
99  tags : vars 
1010
1111- include_tasks : autodetect.yml 
1818#  Libvirt requires qemu-img to create qcow2 files.
1919- name : Ensure qemu-img is installed 
2020  package :
21-     name : " {{ 'qemu-img' if ansible_os_family  == 'RedHat' else 'qemu-utils' }}" 
22-     update_cache : " {{ True if ansible_pkg_mgr  == 'apt' else omit }}" 
21+     name : " {{ 'qemu-img' if ansible_facts.os_family  == 'RedHat' else 'qemu-utils' }}" 
22+     update_cache : " {{ True if ansible_facts.pkg_mgr  == 'apt' else omit }}" 
2323  become : true 
2424
2525- include_tasks : volumes.yml 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments