Commit 48613706 by barni2000

Update conditions for xenial

parent d8066af0
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
- user: root - user: root
- group: root - group: root
{% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %} {% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' and grains['oscodename'] == 'xenial' %}
/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' or grains['os'] == 'Debian' %} {% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' and grains['oscodename'] == 'xenial' %}
/etc/systemd/system/firewall.service: /etc/systemd/system/firewall.service:
file.managed: file.managed:
- user: root - user: root
...@@ -55,7 +55,7 @@ include: ...@@ -55,7 +55,7 @@ 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' %} {% if grains['os_family'] != 'RedHat' and grains['os'] != 'Debian' and grains['os'] != 'Ubuntu' and grains['oscodename'] != 'xenial' %}
/etc/init.d/isc-dhcp-server: /etc/init.d/isc-dhcp-server:
file.symlink: file.symlink:
- target: /lib/init/upstart-job - target: /lib/init/upstart-job
...@@ -77,7 +77,7 @@ include: ...@@ -77,7 +77,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['os'] == 'Ubuntu' and grains['oscodename'] == 'xenial' %}
systemd-sysctl: systemd-sysctl:
cmd.run: cmd.run:
- name: /bin/systemctl restart systemd-sysctl - name: /bin/systemctl restart systemd-sysctl
...@@ -111,4 +111,3 @@ firewall-init_semodule: ...@@ -111,4 +111,3 @@ firewall-init_semodule:
- file: /root/firewall-init.te - file: /root/firewall-init.te
- pkg: firewall-selinux_pkgs - pkg: firewall-selinux_pkgs
{% endif %} {% endif %}
...@@ -13,7 +13,7 @@ vm: ...@@ -13,7 +13,7 @@ vm:
- pre_up_cmds: - pre_up_cmds:
{% if grains['os_family'] == 'RedHat' %} {% if grains['os_family'] == 'RedHat' %}
- /bin/systemctl restart openvswitch - /bin/systemctl restart openvswitch
{% elif grains['os'] == 'Debian' %} {% elif grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' and grains['oscodename'] == 'xenial' %}
- /bin/systemctl restart openvswitch-switch - /bin/systemctl restart openvswitch-switch
{% else %} {% else %}
- /etc/init.d/openvswitch-switch restart - /etc/init.d/openvswitch-switch restart
...@@ -24,7 +24,7 @@ vm: ...@@ -24,7 +24,7 @@ vm:
{# -- DHCP server configuration -- #} {# -- DHCP server configuration -- #}
{% if grains['os'] == 'Debian' %} {% if grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' and grains['oscodename'] == 'xenial' %}
symlink_dhcpd: symlink_dhcpd:
file.symlink: file.symlink:
- name: /etc/init.d/dhcpd - name: /etc/init.d/dhcpd
...@@ -42,7 +42,7 @@ fix_dhcp: ...@@ -42,7 +42,7 @@ fix_dhcp:
- name: salt://fwdriver/files/fix_dhcp.sh - name: salt://fwdriver/files/fix_dhcp.sh
{% endif %} {% endif %}
{% if grains['os'] == 'Debian' %} {% if grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' and grains['oscodename'] == 'xenial' %}
{# For next reboot #} {# For next reboot #}
after_openvswitch_conf: after_openvswitch_conf:
file.managed: file.managed:
......
...@@ -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' or grains['os'] == 'Debian' %} {% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' and grains['oscodename'] == 'xenial' %}
/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' or grains['os'] == 'Debian' %} {% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' and grains['oscodename'] == 'xenial' %}
- 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' or grains['os'] == 'Debian' %} {% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' and grains['oscodename'] == 'xenial' %}
{% 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' or grains['os'] == 'Debian' %} {% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' and grains['oscodename'] == 'xenial' %}
/etc/systemd/system/manager.service: /etc/systemd/system/manager.service:
file.managed: file.managed:
- user: root - user: root
......
...@@ -60,7 +60,7 @@ manager: ...@@ -60,7 +60,7 @@ manager:
- enable: True - enable: True
- watch: - watch:
- file: manager_postactivate - file: manager_postactivate
{% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %} {% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' and grains['oscodename'] == 'xenial' %}
- 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' or grains['os'] == 'Debian' %} {% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' and grains['oscodename'] == 'xenial' %}
/etc/systemd/system/monitor-client.service: /etc/systemd/system/monitor-client.service:
file.managed: file.managed:
- user: root - user: root
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
- group: {{ pillar['user'] }} - group: {{ pillar['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['os'] == 'Ubuntu' and grains['oscodename'] == 'xenial' %}
/etc/systemd/system/storagecelery@.service: /etc/systemd/system/storagecelery@.service:
file.managed: file.managed:
- user: root - user: root
...@@ -52,4 +52,3 @@ ...@@ -52,4 +52,3 @@
- mode: 755 - mode: 755
- require: - require:
- file: /datastore - file: /datastore
...@@ -9,10 +9,11 @@ include: ...@@ -9,10 +9,11 @@ include:
- group: {{ pillar['user'] }} - group: {{ pillar['user'] }}
- mode: 700 - mode: 700
{% set service_dir = "/etc/systemd/system/" if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' else "/etc/init/" %} {% set service_dir = "/etc/systemd/system/" if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' and grains['oscodename'] == 'xenial' 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' if grains['os_family'] == 'RedHat'
or grains['os'] == 'Debian' else or grains['os'] == 'Debian'
or grains['os'] == 'Ubuntu' and grains['oscodename'] == 'xenial' else
("vmcelery.conf", "netcelery.conf", "node.conf")) %} ("vmcelery.conf", "netcelery.conf", "node.conf")) %}
{% for file in service_files %} {% for file in service_files %}
......
...@@ -53,7 +53,7 @@ vmdriver: ...@@ -53,7 +53,7 @@ vmdriver:
{% endif %} {% endif %}
- require_in: - require_in:
- file: /etc/default/libvirt-bin - file: /etc/default/libvirt-bin
{% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' %} {% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' and grains['oscodename'] == 'xenial' %}
- 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' or grains['os'] == 'Debian' %} {% if grains['os_family'] == 'RedHat' or grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' and grains['oscodename'] == 'xenial' %}
libvirtd: libvirtd:
{% else %} {% else %}
libvirt-bin: libvirt-bin:
...@@ -68,7 +68,7 @@ vmdriver_semodule: ...@@ -68,7 +68,7 @@ vmdriver_semodule:
- file: /root/vmdriver.te - file: /root/vmdriver.te
- pkg: selinux_pkgs - pkg: selinux_pkgs
{% elif grains['os'] == 'Debian' %} {% elif grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' and grains['oscodename'] == 'xenial' %}
/usr/bin/kvm: /usr/bin/kvm:
file.replace: file.replace:
...@@ -150,5 +150,3 @@ open_libvirt_ports: ...@@ -150,5 +150,3 @@ open_libvirt_ports:
file.append: file.append:
- text: LIBVIRTD_ARGS="--listen" - text: LIBVIRTD_ARGS="--listen"
{% endif %} {% endif %}
...@@ -9,7 +9,7 @@ virtualenv_vmdriver: ...@@ -9,7 +9,7 @@ virtualenv_vmdriver:
{% set targets = { 'libvirtmod_qemu.so': 'libvirtmod_qemu.x86_64-linux-gnu.so', {% set targets = { 'libvirtmod_qemu.so': 'libvirtmod_qemu.x86_64-linux-gnu.so',
'libvirtmod.so': 'libvirtmod.x86_64-linux-gnu.so' 'libvirtmod.so': 'libvirtmod.x86_64-linux-gnu.so'
} if grains['os'] == 'Debian' else {} %} } if grains['os'] == 'Debian' or grains['os'] == 'Ubuntu' and grains['oscodename'] == 'xenial' else {} %}
{% for file in ("libvirtmod_qemu.so", "libvirtmod.so", "libvirt_qemu.py", "libvirt.py", "libvirt_qemu.pyc", "libvirt.pyc") %} {% for file in ("libvirtmod_qemu.so", "libvirtmod.so", "libvirt_qemu.py", "libvirt.py", "libvirt_qemu.pyc", "libvirt.pyc") %}
/home/{{ pillar['user'] }}/.virtualenvs/vmdriver/lib/python2.7/site-packages/{{ file }}: /home/{{ pillar['user'] }}/.virtualenvs/vmdriver/lib/python2.7/site-packages/{{ file }}:
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
- group: {{ pillar['user'] }} - group: {{ pillar['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['os'] == 'Ubuntu' and grains['oscodename'] == 'xenial' %}
/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