--- # using as this as template. - name: set var for {{ onecloud_version }} set_fact: is_supported: false - debug: var=ansible_distribution_release - debug: var=supported_kylin_code - name: Assert {{ ansible_distribution }} {{ ansible_distribution_version }} conditions set_fact: is_supported: true when: - ansible_distribution == 'AlmaLinux' - "ansible_distribution_major_version in ('8', '9', '10')" - onecloud_version is defined - "ansible_architecture in ('x86_64', 'aarch64')" - debug: var=is_supported - name: Evaluate {{ ansible_distribution }} {{ ansible_distribution_version }} conditions fail: msg: "{{ ansible_distribution }} {{ ansible_distribution_version }} {{ ansible_distribution_release }} is not supported by {{ onecloud_version }}" when: - is_supported | default(true) | bool == false - name: Ensure kernel module br_netfilter is installed block: - modprobe: name: br_netfilter state: present become: true rescue: - fail: msg: "br_netfilter is not installed, please install by `yum install -y kernel-modules-extra` and reboot the system to take effect"