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
24ed6fa7
authored
Jul 13, 2016
by
Desztics Armand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fwdriver
parent
8744e7a9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
7 deletions
+32
-7
salt/fwdriver/configuration.sls
+30
-5
salt/fwdriver/init.sls
+1
-1
salt/fwdriver/virtualenv.sls
+1
-1
No files found.
salt/fwdriver/configuration.sls
View file @
24ed6fa7
...
@@ -9,7 +9,7 @@ include:
...
@@ -9,7 +9,7 @@ include:
- group: {{ pillar['fwdriver']['user'] }}
- group: {{ pillar['fwdriver']['user'] }}
- mode: 700
- mode: 700
{% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian'
%}
{% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian'
or grains['osfinger'] == 'Ubuntu-16.04'%}
/etc/systemd/system/firewall.service:
/etc/systemd/system/firewall.service:
file.managed:
file.managed:
- user: root
- user: root
...
@@ -55,12 +55,37 @@ include:
...
@@ -55,12 +55,37 @@ include:
- user: {{ pillar['fwdriver']['user'] }}
- user: {{ pillar['fwdriver']['user'] }}
- group: {{ pillar['fwdriver']['user'] }}
- group: {{ pillar['fwdriver']['user'] }}
{% if grains['os_family'] != 'RedHat' and grains['os'] != 'Debian' %}
symlink_dhcpd:
/etc/init.d/isc-dhcp-server:
{% if grains['osfinger'] == 'Ubuntu-16.04' %}
file.symlink:
file.symlink:
- name: /etc/systemd/system/dhcpd.service
- target: /lib/systemd/system/isc-dhcp-server.service
- force: True
- require_in:
- service: isc-dhcp-server
cmd.run:
- name: /bin/systemctl daemon-reload
- require:
- file: symlink_dhcpd
{% elif grains['os'] == 'Debian' %}
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
{% elif grains['os_family'] != 'RedHat' %}
file.symlink:
- name: /etc/init.d/isc-dhcp-server
- target: /lib/init/upstart-job
- target: /lib/init/upstart-job
- force: True
- force: True
{% endif %}
- require_in:
- service: isc-dhcp-server
{% endif %}
/etc/sysctl.d/60-circle-firewall.conf:
/etc/sysctl.d/60-circle-firewall.conf:
file.managed:
file.managed:
...
@@ -77,7 +102,7 @@ include:
...
@@ -77,7 +102,7 @@ include:
- source: salt://fwdriver/files/sudoers
- source: salt://fwdriver/files/sudoers
{% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %}
{% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian'
or grains['osfinger'] == 'Ubuntu-16.04'
%}
systemd-sysctl:
systemd-sysctl:
cmd.run:
cmd.run:
- name: /bin/systemctl restart systemd-sysctl
- name: /bin/systemctl restart systemd-sysctl
...
...
salt/fwdriver/init.sls
View file @
24ed6fa7
...
@@ -18,7 +18,7 @@ firewall:
...
@@ -18,7 +18,7 @@ firewall:
- python-dev
- python-dev
- libmemcached-dev
- libmemcached-dev
- openvswitch-switch
- openvswitch-switch
{% if grains['os'] != 'Debian' %}
{% if grains['os'] != 'Debian'
and grains['osfinger'] != 'Ubuntu-16.04'
%}
{# No such package in Debian Jessie! #}
{# No such package in Debian Jessie! #}
- openvswitch-controller
- openvswitch-controller
{% endif %}
{% endif %}
...
...
salt/fwdriver/virtualenv.sls
View file @
24ed6fa7
virtualenv_fwdriver:
virtualenv_fwdriver:
virtualenv.managed:
virtualenv.managed:
- name: /home/{{ pillar['fwdriver']['user'] }}/.virtualenvs/fw
- name: /home/{{ pillar['fwdriver']['user'] }}/.virtualenvs/fw
- requirements: /home/{{ pillar['fwdriver']['user'] }}/fwdriver/requirements.txt
- requirements: /home/{{ pillar['fwdriver']['user'] }}/fwdriver/requirements
/production
.txt
- user: {{ pillar['fwdriver']['user'] }}
- user: {{ pillar['fwdriver']['user'] }}
- no_chown: true
- no_chown: true
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