Commit 24ed6fa7 by Desztics Armand

fwdriver

parent 8744e7a9
...@@ -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
......
...@@ -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 %}
......
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
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