Commit 4c42939b by Dóbé Péter

towards Debian comp

parent 6f9c3e6a
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
- user: root - user: root
- group: root - group: root
{% if grains['os_family'] == 'RedHat' %} {% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %}
/etc/systemd/system/agentdriver.service: /etc/systemd/system/agentdriver.service:
file.managed: file.managed:
- user: root - user: root
......
...@@ -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' %} {% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %}
/etc/systemd/system/firewall.service: /etc/systemd/system/firewall.service:
file.managed: file.managed:
- user: root - user: root
......
...@@ -18,7 +18,10 @@ firewall: ...@@ -18,7 +18,10 @@ firewall:
- python-dev - python-dev
- libmemcached-dev - libmemcached-dev
- openvswitch-switch - openvswitch-switch
{% if grains['os'] != 'Debian' %}
{# No such package in Debian Jessie! #}
- openvswitch-controller - openvswitch-controller
{% endif %}
- isc-dhcp-server - isc-dhcp-server
{% endif %} {% endif %}
- git - git
......
...@@ -17,7 +17,7 @@ requirements: ...@@ -17,7 +17,7 @@ requirements:
- require: - require:
- user: {{ pillar['graphite']['user'] }} - user: {{ pillar['graphite']['user'] }}
{% if grains['os_family'] == 'RedHat' %} {% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %}
/etc/systemd/system/graphite.service: /etc/systemd/system/graphite.service:
file.managed: file.managed:
......
...@@ -8,7 +8,7 @@ manager_postactivate: ...@@ -8,7 +8,7 @@ manager_postactivate:
portal.conf: portal.conf:
file.managed: file.managed:
{% if grains['os_family'] == 'RedHat' %} {% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %}
- name: /etc/systemd/system/portal.service - name: /etc/systemd/system/portal.service
{% else %} {% else %}
- name: /etc/init/portal.conf - name: /etc/init/portal.conf
...@@ -16,7 +16,7 @@ portal.conf: ...@@ -16,7 +16,7 @@ portal.conf:
- user: root - user: root
- group: root - group: root
- template: jinja - template: jinja
{% if grains['os_family'] == 'RedHat' %} {% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %}
{% if pillar['deployment_type'] == 'production' %} {% if pillar['deployment_type'] == 'production' %}
- source: file:///home/{{ pillar['user'] }}/circle/miscellaneous/portal-uwsgi.service - source: file:///home/{{ pillar['user'] }}/circle/miscellaneous/portal-uwsgi.service
...@@ -34,7 +34,7 @@ portal.conf: ...@@ -34,7 +34,7 @@ portal.conf:
{% endif %} {% endif %}
{% if grains['os_family'] == 'RedHat' %} {% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %}
/etc/systemd/system/manager.service: /etc/systemd/system/manager.service:
file.managed: file.managed:
- user: root - user: root
......
...@@ -61,7 +61,7 @@ manager: ...@@ -61,7 +61,7 @@ manager:
- enable: True - enable: True
- watch: - watch:
- file: manager_postactivate - file: manager_postactivate
{% if grains['os_family'] == 'RedHat' %} {% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %}
- file: /etc/systemd/system/manager.service - file: /etc/systemd/system/manager.service
- file: /etc/systemd/system/managercelery@.service - file: /etc/systemd/system/managercelery@.service
{% else %} {% else %}
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
- group: {{ pillar['user'] }} - group: {{ pillar['user'] }}
- mode: 700 - mode: 700
{% if grains['os_family'] == 'RedHat' %} {% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %}
/etc/systemd/system/monitor-client.service: /etc/systemd/system/monitor-client.service:
file.managed: file.managed:
- user: root - user: root
......
...@@ -11,7 +11,7 @@ vm: ...@@ -11,7 +11,7 @@ vm:
- ipaddr: {{ pillar['fwdriver']['vm_net_ip'] }} - ipaddr: {{ pillar['fwdriver']['vm_net_ip'] }}
- netmask: {{ pillar['fwdriver']['vm_net_mask'] }} - netmask: {{ pillar['fwdriver']['vm_net_mask'] }}
- pre_up_cmds: - pre_up_cmds:
{% if grains['os_family'] == 'RedHat' %} {% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %}
- /bin/systemctl restart openvswitch - /bin/systemctl restart openvswitch
{% else %} {% else %}
- /etc/init.d/openvswitch-switch restart - /etc/init.d/openvswitch-switch restart
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
- group: {{ pillar['user'] }} - group: {{ pillar['user'] }}
- mode: 700 - mode: 700
{% if grains['os_family'] == 'RedHat' %} {% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %}
/etc/systemd/system/storagecelery@.service: /etc/systemd/system/storagecelery@.service:
file.managed: file.managed:
- user: root - user: root
......
...@@ -9,9 +9,10 @@ include: ...@@ -9,9 +9,10 @@ include:
- group: {{ pillar['user'] }} - group: {{ pillar['user'] }}
- mode: 700 - mode: 700
{% set service_dir = "/etc/systemd/system/" if grains['os_family'] == 'RedHat' else "/etc/init/" %} {% set service_dir = "/etc/systemd/system/" if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' else "/etc/init/" %}
{% set service_files = (("vmcelery@.service", "netcelery@.service", "node.service") {% set service_files = (("vmcelery@.service", "netcelery@.service", "node.service")
if grains['os_family'] == 'RedHat' else if grains['os_family'] == 'RedHat'
or grains['os'] == 'Debian' else
("vmcelery.conf", "netcelery.conf", "node.conf")) %} ("vmcelery.conf", "netcelery.conf", "node.conf")) %}
{% for file in service_files %} {% for file in service_files %}
......
...@@ -32,7 +32,10 @@ vmdriver: ...@@ -32,7 +32,10 @@ vmdriver:
- libxslt1-dev - libxslt1-dev
- openvswitch-common - openvswitch-common
- openvswitch-switch - openvswitch-switch
{% if grains['os'] != 'Debian' %}
{# No such package in Debian Jessie! #}
- openvswitch-controller - openvswitch-controller
{% endif %}
- python-dev - python-dev
- python-libvirt - python-libvirt
- virtualenvwrapper - virtualenvwrapper
...@@ -41,7 +44,7 @@ vmdriver: ...@@ -41,7 +44,7 @@ vmdriver:
{% endif %} {% endif %}
- require_in: - require_in:
- file: /etc/default/libvirt-bin - file: /etc/default/libvirt-bin
{% if grains['os_family'] == 'RedHat' %} {% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %}
- service: libvirtd - service: libvirtd
{% else %} {% else %}
- file: /etc/apparmor.d/libvirt/TEMPLATE - file: /etc/apparmor.d/libvirt/TEMPLATE
......
...@@ -15,7 +15,7 @@ libvirtconf: ...@@ -15,7 +15,7 @@ libvirtconf:
file.append: file.append:
- text: libvirtd_opts="-d -l" - text: libvirtd_opts="-d -l"
{% if grains['os_family'] == 'RedHat' %} {% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %}
libvirtd: libvirtd:
{% else %} {% else %}
libvirt-bin: libvirt-bin:
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
- group: {{ pillar['user'] }} - group: {{ pillar['user'] }}
- mode: 700 - mode: 700
{% if grains['os_family'] == 'RedHat' %} {% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %}
/etc/systemd/system/vncproxy.service: /etc/systemd/system/vncproxy.service:
file.managed: file.managed:
- user: root - user: root
......
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