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
This commit is contained in:
Ash Berlin 2014-05-27 22:52:41 +01:00
parent 2032369f0b
commit d5923d82e6
1 changed files with 1 additions and 0 deletions

View File

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