Commit b56e3bc7 by Desztics Armand

reworked virtualenvwrapper shell sourcing

parent 8df6aa33
...@@ -4,7 +4,3 @@ virtualenv_agentdriver: ...@@ -4,7 +4,3 @@ virtualenv_agentdriver:
- requirements: /home/{{ pillar['user'] }}/agentdriver/requirements.txt - requirements: /home/{{ pillar['user'] }}/agentdriver/requirements.txt
- user: {{ pillar['user'] }} - user: {{ pillar['user'] }}
- no_chown: true - no_chown: true
{% if grains["osfinger"] == "Ubuntu-16.04" %}
- require:
- file: ubuntu_virtualenvwrapper
{% endif %}
git: git:
pkg.installed pkg.installed
{% if grains['osfinger'] == 'Ubuntu-16.04' %}
ubuntu_virtualenvwrapper:
file.append:
- name: /etc/profile
- text:
- "export WORKON_HOME=$HOME/.virtualenvs"
- "source /usr/share/virtualenvwrapper/virtualenvwrapper.sh"
{% endif %}
\ No newline at end of file
...@@ -4,7 +4,3 @@ virtualenv_fwdriver: ...@@ -4,7 +4,3 @@ virtualenv_fwdriver:
- requirements: /home/{{ pillar['fwdriver']['user'] }}/fwdriver/requirements/production.txt - requirements: /home/{{ pillar['fwdriver']['user'] }}/fwdriver/requirements/production.txt
- user: {{ pillar['fwdriver']['user'] }} - user: {{ pillar['fwdriver']['user'] }}
- no_chown: true - no_chown: true
{% if grains["osfinger"] == "Ubuntu-16.04" %}
- require:
- file: ubuntu_virtualenvwrapper
{% endif %}
...@@ -12,9 +12,6 @@ virtualenv_graphite: ...@@ -12,9 +12,6 @@ virtualenv_graphite:
- user: {{ pillar['graphite']['user'] }} - user: {{ pillar['graphite']['user'] }}
- file: /home/{{ pillar['graphite']['user'] }}/requirements.txt - file: /home/{{ pillar['graphite']['user'] }}/requirements.txt
- file: /opt/graphite - file: /opt/graphite
{% if grains["osfinger"] == "Ubuntu-16.04" %}
- file: ubuntu_virtualenvwrapper
{% endif %}
global-site-packages: global-site-packages:
file.absent: file.absent:
......
...@@ -24,9 +24,6 @@ virtualenv_manager: ...@@ -24,9 +24,6 @@ virtualenv_manager:
{% if grains['os_family'] == 'RedHat' %} {% if grains['os_family'] == 'RedHat' %}
- environ: m2crypto_swig_env - environ: m2crypto_swig_env
{% endif %} {% endif %}
{% if grains["osfinger"] == "Ubuntu-16.04" %}
- file: ubuntu_virtualenvwrapper
{% endif %}
salt://manager/files/syncdb.sh: salt://manager/files/syncdb.sh:
cmd.script: cmd.script:
......
...@@ -4,7 +4,3 @@ virtualenv_monitor-client: ...@@ -4,7 +4,3 @@ virtualenv_monitor-client:
- requirements: /home/{{ pillar['user'] }}/monitor-client/requirements.txt - requirements: /home/{{ pillar['user'] }}/monitor-client/requirements.txt
- user: {{ pillar['user'] }} - user: {{ pillar['user'] }}
- no_chown: true - no_chown: true
{% if grains["osfinger"] == "Ubuntu-16.04" %}
- require:
- file: ubuntu_virtualenvwrapper
{% endif %}
{% if grains['os']=='Debian' %} {% if grains['os']=='Debian' or grains['osfinger'] == 'Ubuntu-16.04' %}
{# For non-interactive shells, virtualenvwrapper commands {# For non-interactive shells, virtualenvwrapper commands
('workon' etc.) are not sourced automatically #} ('workon' etc.) are not sourced automatically #}
/etc/profile: /etc/profile:
......
...@@ -6,6 +6,3 @@ virtualenv_storagedriver: ...@@ -6,6 +6,3 @@ virtualenv_storagedriver:
- no_chown: true - no_chown: true
- require: - require:
- pkg: storagedriver - pkg: storagedriver
{% if grains["osfinger"] == "Ubuntu-16.04" %}
- file: ubuntu_virtualenvwrapper
{% endif %}
...@@ -4,10 +4,6 @@ virtualenv_vmdriver: ...@@ -4,10 +4,6 @@ virtualenv_vmdriver:
- requirements: /home/{{ pillar['user'] }}/vmdriver/requirements/production.txt - requirements: /home/{{ pillar['user'] }}/vmdriver/requirements/production.txt
- user: {{ pillar['user'] }} - user: {{ pillar['user'] }}
- no_chown: true - no_chown: true
{% if grains["osfinger"] == "Ubuntu-16.04" %}
- require:
- file: ubuntu_virtualenvwrapper
{% endif %}
{% set libvirt_dir = "/usr/lib64/python2.7/site-packages/" if grains['os_family'] == 'RedHat' else "/usr/lib/python2.7/dist-packages/" %} {% set libvirt_dir = "/usr/lib64/python2.7/site-packages/" if grains['os_family'] == 'RedHat' else "/usr/lib/python2.7/dist-packages/" %}
......
...@@ -4,7 +4,3 @@ virtualenv_vncproxy: ...@@ -4,7 +4,3 @@ virtualenv_vncproxy:
- requirements: /home/{{ pillar['user'] }}/vncproxy/requirements/production.txt - requirements: /home/{{ pillar['user'] }}/vncproxy/requirements/production.txt
- user: {{ pillar['user'] }} - user: {{ pillar['user'] }}
- no_chown: true - no_chown: true
{% if grains["osfinger"] == "Ubuntu-16.04" %}
- require:
- file: ubuntu_virtualenvwrapper
{% endif %}
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