Commit b1e129d9 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

playbook: remove useless post_config variable

This variabe was always True.
parent 4adefd89
...@@ -18,4 +18,4 @@ ...@@ -18,4 +18,4 @@
roles: roles:
- { role: slapos, package_state: present } - { role: slapos, package_state: present }
- { role: imt-slapos, post_config: True } - { role: imt-slapos }
...@@ -5,4 +5,4 @@ ...@@ -5,4 +5,4 @@
- settings/imt.yml - settings/imt.yml
roles: roles:
- { role: imt-slapos, post_config: True, startup: True } - { role: imt-slapos, startup: True }
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
- name: stat slapos.cfg file - name: stat slapos.cfg file
stat: path=/etc/opt/slapos/slapos.cfg stat: path=/etc/opt/slapos/slapos.cfg
register: slapos_cfg register: slapos_cfg
when: post_config is defined
- name: update slapos.cfg configuration - name: update slapos.cfg configuration
lineinfile: dest=/etc/opt/slapos/slapos.cfg regexp="{{ item.regexp }}" line="{{ item.line }}" backup=yes insertafter="^interface_name =" lineinfile: dest=/etc/opt/slapos/slapos.cfg regexp="{{ item.regexp }}" line="{{ item.line }}" backup=yes insertafter="^interface_name ="
...@@ -29,41 +28,41 @@ ...@@ -29,41 +28,41 @@
- { regexp: '^tap_gateway_interface\s*=', line: 'tap_gateway_interface = re6stnet-tcp' } - { regexp: '^tap_gateway_interface\s*=', line: 'tap_gateway_interface = re6stnet-tcp' }
- { regexp: '^partition_amount\s*=', line: 'partition_amount = 125' } - { regexp: '^partition_amount\s*=', line: 'partition_amount = 125' }
- { regexp: '^tap_ipv6\s*=', line: 'tap_ipv6 = False' } - { regexp: '^tap_ipv6\s*=', line: 'tap_ipv6 = False' }
when: post_config is defined and slapos_cfg.stat.exists == True and startup is not defined when: slapos_cfg.stat.exists == True and startup is not defined
- name: update slapos.cfg configuration storage/network - name: update slapos.cfg configuration storage/network
lineinfile: dest=/etc/opt/slapos/slapos.cfg regexp="{{ item.regexp }}" line="{{ item.line }}" backup=yes insertafter="^instance_root =" lineinfile: dest=/etc/opt/slapos/slapos.cfg regexp="{{ item.regexp }}" line="{{ item.line }}" backup=yes insertafter="^instance_root ="
with_items: with_items:
- { regexp: '^ipv4_global_network\s*=', line: 'ipv4_global_network = 10.32.0.0/13' } - { regexp: '^ipv4_global_network\s*=', line: 'ipv4_global_network = 10.32.0.0/13' }
- { regexp: '^manager_list\s*=', line: 'manager_list = prerm' } - { regexp: '^manager_list\s*=', line: 'manager_list = prerm' }
when: post_config is defined and slapos_cfg.stat.exists == True and startup is not defined when: slapos_cfg.stat.exists == True and startup is not defined
- name: allow firewall in slapos.cfg configuration - name: allow firewall in slapos.cfg configuration
lineinfile: dest=/etc/opt/slapos/slapos.cfg regexp="{{ item.regexp }}" line="{{ item.line }}" backup=yes backrefs=true lineinfile: dest=/etc/opt/slapos/slapos.cfg regexp="{{ item.regexp }}" line="{{ item.line }}" backup=yes backrefs=true
with_items: with_items:
- { regexp: '^\[.*firewall\]$', line: '[firewall]' } - { regexp: '^\[.*firewall\]$', line: '[firewall]' }
when: post_config is defined and slapos_cfg.stat.exists == True and startup is not defined when: slapos_cfg.stat.exists == True and startup is not defined
- name: Run slapos format for update configs
shell: "slapos node format -v --now"
when: slapos_cfg.stat.exists == True and startup is not defined
- name: Insert kvm module - name: Insert kvm module
modprobe: name=kvm state=present modprobe: name=kvm state=present
when: post_config is defined
- name: Insert kvm_intel module - name: Insert kvm_intel module
modprobe: name=kvm_intel state=present modprobe: name=kvm_intel state=present
when: post_config is defined
- name: Insert vhost-net module - name: Insert vhost-net module
modprobe: name=vhost-net state=present modprobe: name=vhost-net state=present
when: post_config is defined
- name: chmod 666 /dev/kvm - name: chmod 666 /dev/kvm
file: path=/dev/kvm mode=0666 file: path=/dev/kvm mode=0666
when: post_config is defined
- name: chmod 666 /dev/vhost-net - name: chmod 666 /dev/vhost-net
file: path=/dev/vhost-net mode=0666 file: path=/dev/vhost-net mode=0666
when: post_config is defined
- name: chmod 666 /dev/net/tun - name: chmod 666 /dev/net/tun
file: path=/dev/net/tun mode=0666 file: path=/dev/net/tun mode=0666
when: post_config is defined
- name: Run slapos format for update configs
shell: "slapos node format -v --now"
when: post_config is defined and slapos_cfg.stat.exists == True and startup is not defined
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment