Use cmd with runas parameter

Replace the deprecated user and group parameters with runas to fix
deprecation warnings.
This commit is contained in:
Jan Dittberner 2016-09-24 23:53:49 +02:00
parent 95b2e521eb
commit ef7fbd0afd
4 changed files with 6 additions and 12 deletions

View file

@ -34,15 +34,13 @@ gnuviechadmin-packages:
gnuviechadmin-venv:
cmd.run:
- name: virtualenv {{ venv }}
- user: vagrant
- group: vagrant
- runas: vagrant
- unless: test -f {{ venv }}/bin/pip
gnuviechadmin-requires:
cmd.run:
- name: {{ venv }}/bin/pip install -U -r requirements/local.txt && touch {{ venv }}/lastinstall
- user: vagrant
- group: vagrant
- runas: vagrant
- cwd: {{ checkout }}
- require:
- cmd: gnuviechadmin-venv

View file

@ -3,8 +3,7 @@
gnuviechadmin-dbschema:
cmd.wait:
- name: . {{ home }}/gvasettings.sh ; unset LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME ; {{ venv }}/bin/python manage.py migrate --noinput
- user: vagrant
- group: vagrant
- runas: vagrant
- cwd: {{ appdir }}
- watch:
- cmd: gnuviechadmin-requires
@ -13,8 +12,7 @@ gnuviechadmin-dbschema:
gnuviechadmin-locale-data-compile:
cmd.wait:
- name: . {{ home }}/gvasettings.sh ; {{ venv }}/bin/python {{ appdir }}/manage.py compilemessages
- user: vagrant
- group: vagrant
- runas: vagrant
- cwd: {{ appdir }}
- require:
- pkg: gnuviechadmin-packages

View file

@ -15,6 +15,5 @@ base-ldap-objects:
cmd.script:
- source: salt://gnuviechadmin/gvaldap/create_base_ldap_objects.sh
- template: jinja
- user: root
- group: root
- runas: root
- unless: ldapsearch -Y EXTERNAL -H ldapi:// -b "{{ salt['pillar.get']('gnuviechadmin:ldap_base_dn') }}" "cn={{ salt['pillar.get']('gnuviechadmin:ldap_admin_user') }}" | grep -q numEntries

View file

@ -18,8 +18,7 @@ generate-dhparam-nginx:
cmd.run:
- name: openssl dhparam -out {{ ssldir }}/dhparams.pem 2048
- umask: 022
- user: root
- group: root
- runas: root
- creates: {{ ssldir }}/dhparams.pem
- require_in:
- file: /etc/nginx/conf.d/ssl.conf