aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/salt-formulas/salt-formula-armband/armband/nova_config.sls
blob: b0e17b718be9c61654284fd57cce6a1b37988a81 (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
{% if grains['cpuarch'] == 'aarch64' %}
{% if grains['virtual'] == 'kvm' %}
nova_virt_type:
  file.replace:
    - name: "/etc/nova/nova.conf"
    - pattern: '^virt_type\s*=.*$'
    - repl: "virt_type = qemu"
nova_compute_virt_type:
  file.replace:
    - name: "/etc/nova/nova-compute.conf"
    - pattern: '^virt_type\s*=.*$'
    - repl: "virt_type = qemu"
{% endif %}
nova_pointer_model:
  file.replace:
    - name: "/etc/nova/nova.conf"
    - pattern: '^#pointer_model\s*=.*$'
    - repl: "pointer_model = ps2mouse"
nova_cpu_mode:
  file.replace:
    - name: "/etc/nova/nova.conf"
    - pattern:  '^cpu_mode\s*=\s*host-passthrough'
    - repl: "cpu_mode = custom"
nova_cpu_model:
  file.replace:
    - name: "/etc/nova/nova.conf"
    - pattern: '^#cpu_model\s*=.*$'
    {% if grains['virtual'] == 'kvm' %}
    - repl: "cpu_model = cortex-a57"
    {% else %}
    - repl: "cpu_model = host"
    {% endif %}
restart_nova-compute:
  cmd:
    - run
    - name: "service nova-compute restart"
{% endif %}