Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
salt
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
17
Merge Requests
1
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
281aa630
authored
Apr 05, 2016
by
Czémán Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
network: fix configurations warnings for Red Hat like distros
parent
a4a27d0b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
1 deletions
+12
-1
pillar/installer.sls
+0
-0
salt/network/files/fix_dhcp.sh
+1
-1
salt/network/files/network
+2
-0
salt/network/init.sls
+9
-0
No files found.
pillar/installer.sls
View file @
281aa630
salt/network/files/fix_dhcp.sh
View file @
281aa630
#!/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
salt/network/files/network
0 → 100644
View file @
281aa630
NETWORKING_IPV6=yes
IPV6FORWARDING=yes
salt/network/init.sls
View file @
281aa630
...
@@ -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:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment