Quellcode durchsuchen

Specify bash shell when validating sudo snippet

Since we are using bash specific features and sometimes you can end up getting /bin/sh - see https://github.com/saltstack-formulas/users-formula/pull/30#issuecomment-44224106
tags/v0.45.0
Ash Berlin vor 10 Jahren
Ursprung
Commit
d5923d82e6
1 geänderte Dateien mit 1 neuen und 0 gelöschten Zeilen
  1. +1
    -0
      users/init.sls

+ 1
- 0
users/init.sls Datei anzeigen

"validate {{ name }} sudo rule {{ loop.index0 }} {{ name }} {{ rule }}": "validate {{ name }} sudo rule {{ loop.index0 }} {{ name }} {{ rule }}":
cmd.run: cmd.run:
- name: 'visudo -cf - <<<"$rule"' - name: 'visudo -cf - <<<"$rule"'
- shell: /bin/bash
- env: - env:
# Specify the rule via an env var to avoid shell quoting issues. # Specify the rule via an env var to avoid shell quoting issues.
- rule: "{{ name }} {{ rule }}" - rule: "{{ name }} {{ rule }}"

Laden…
Abbrechen
Speichern