Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
salt
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a4a27d0b
authored
Mar 31, 2016
by
Czémán Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
network: symlink dhcpd and rework
parent
fead6ac9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
13 deletions
+24
-13
salt/network/init.sls
+24
-13
No files found.
salt/network/init.sls
View file @
a4a27d0b
...
@@ -21,6 +21,18 @@ vm:
...
@@ -21,6 +21,18 @@ vm:
- require:
- require:
- cmd: ovs-if
- cmd: ovs-if
{% if grains['os'] == 'Debian' %}
symlink_dhcpd:
file.symlink:
- name: /etc/init.d/dhcpd
- target: /etc/init.d/isc-dhcp-server
- force: True
cmd.run:
- name: /bin/systemctl daemon-reload
- require:
- file: symlink_dhcpd
{% endif %}
firewall2:
firewall2:
service:
service:
- name: firewall
- name: firewall
...
@@ -35,42 +47,41 @@ reload_firewall:
...
@@ -35,42 +47,41 @@ reload_firewall:
- user: {{ pillar['user'] }}
- user: {{ pillar['user'] }}
- require:
- require:
- service: firewall2
- service: firewall2
{% if grains['os'] == 'Debian' %}
- cmd: symlink_dhcpd
{% endif %}
{% if grains['os_family'] == 'RedHat' %}
{% if grains['os_family'] == 'RedHat' %}
fix_dhcp:
fix_dhcp:
cmd.script
cmd.script
:
- name: salt://network/files/fix_dhcp.sh
- name: salt://network/files/fix_dhcp.sh
- require:
- require:
-
script
: reload_firewall
-
cmd
: reload_firewall
{% endif %}
{% endif %}
isc-dhcp-server:
isc-dhcp-server:
{% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %}
{% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %}
cmd.run:
cmd.run:
- name: /bin/systemctl restart
isc-dhcp-server
- name: /bin/systemctl restart
dhcpd
{% if grains['os_family'] == 'RedHat' %}
{% if grains['os_family'] == 'RedHat' %}
- watch:
- watch:
-
script
: fix_dhcp
-
cmd
: fix_dhcp
{% elif grains['os'] == 'Debian' %}
{% elif grains['os'] == 'Debian' %}
- watch:
- watch:
- cmd: fix_dhcp_daemon_reload
- cmd: fix_dhcp_daemon_reload
{% endif %}
{% endif %}
{% endif %}
{% endif %}
service:
service.running:
- running
{% if grains['os_family'] == 'RedHat' %}
- name: dhcpd
{% endif %}
- enable: True
- enable: True
- reload: True
{% if grains['os_family'] == 'RedHat' %}
{% if grains['os_family'] == 'RedHat' %}
- watch:
- watch:
- script: fix_dhcp
- cmd: fix_dhcp
- require:
- cmd: isc-dhcp-server
{% elif grains['os'] == 'Debian' %}
{% elif grains['os'] == 'Debian' %}
- watch:
- watch:
- cmd: fix_dhcp_daemon_reload
- cmd: fix_dhcp_daemon_reload
{% endif %}
{% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %}
- name: dhcpd
- require:
- require:
- cmd: isc-dhcp-server
- cmd: isc-dhcp-server
{% endif %}
{% endif %}
...
...
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