blob: 8f456b5beb73655225459f930ac6e1a8eab0bf8e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
---
- name: Load and persist br_netfilter module
ansible.builtin.include_role:
name: module-load
vars:
modules:
- { name: br_netfilter }
when:
- inventory_hostname in groups[nova_cell_compute_group]
- name: Enable bridge-nf-call sysctl variables
become: true
ansible.posix.sysctl:
name: "{{ item }}"
state: present
value: "1"
sysctl_set: true
sysctl_file: "{{ kolla_sysctl_conf_path }}"
loop:
- net.bridge.bridge-nf-call-iptables
- net.bridge.bridge-nf-call-ip6tables
when:
- set_sysctl | bool
- inventory_hostname in groups[nova_cell_compute_group]
# NOTE(yoctozepto): Part of bug #1681461 fix.
# This part can actually run on any distro and lets us drop the hardcoded
# chown and chmod from the nova-libvirt image extend_start and make the process
# more robust.
- name: Install udev kolla kvm rules
become: true
ansible.builtin.template:
src: "99-kolla-kvm.rules.j2"
dest: "/etc/udev/rules.d/99-kolla-kvm.rules"
mode: "0644"
when:
- enable_nova_libvirt_container | bool
- nova_compute_virt_type == 'kvm'
- inventory_hostname in groups[nova_cell_compute_group]
# NOTE(yoctozepto): Part of bug #1681461 fix.
# This part only really makes sense on Ubuntu and would end up being confusing
# on others. This service changes /dev/kvm permissions.
- name: Mask qemu-kvm service
become: true
ansible.builtin.systemd:
name: qemu-kvm.service
masked: true
when:
- enable_nova_libvirt_container | bool
- nova_compute_virt_type == 'kvm'
- ansible_facts.distribution == 'Ubuntu'
- inventory_hostname in groups[nova_cell_compute_group]
|