Commit 281aa630 by Czémán Arnold

network: fix configurations warnings for Red Hat like distros

parent a4a27d0b
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#nfs: #nfs:
# enabled: true # enabled: true
# server: 10.0.0.115 # server: 10.0.0.115
# network: 192.168.1.0/24 # network: 192.168.1.0/24
# directory: /datastore # directory: /datastore
......
#!/bin/bash #!/bin/bash
sed -i '/HWADDR=.*/d' /etc/sysconfig/network-scripts/ifcfg-vm sed -i '/HWADDR=.*/d' /etc/sysconfig/network-scripts/ifcfg-vm
sed -i -e \$aNM_CONTROLLED=\"no\" /etc/sysconfig/network-scripts/ifcfg-vm sed -i -e \$aNM_CONTROLLED=\"no\" /etc/sysconfig/network-scripts/ifcfg-vm
/bin/systemctl daemon-reload
ifup vm ifup vm
systemctl restart firewall systemctl restart firewall
systemctl restart dhcpd systemctl restart dhcpd
exit 0 exit 0
NETWORKING_IPV6=yes
IPV6FORWARDING=yes
...@@ -52,11 +52,20 @@ reload_firewall: ...@@ -52,11 +52,20 @@ reload_firewall:
{% endif %} {% endif %}
{% if grains['os_family'] == 'RedHat' %} {% if grains['os_family'] == 'RedHat' %}
net_config:
file.managed:
- name: /etc/sysconfig/network
- source: salt://network/files/network
- user: root
- group: root
- mode: 644
fix_dhcp: fix_dhcp:
cmd.script: cmd.script:
- name: salt://network/files/fix_dhcp.sh - name: salt://network/files/fix_dhcp.sh
- require: - require:
- cmd: reload_firewall - cmd: reload_firewall
- file: net_config
{% endif %} {% endif %}
isc-dhcp-server: isc-dhcp-server:
......
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 sign in to comment