Skip to content

Commit

Permalink
Swap out heredoc for pipe expression
Browse files Browse the repository at this point in the history
Using heredoc in this way exposes platform specific behaviour in 'unless'
This was leading to different behaviour between Ubuntu and RHEL
Possibly fixed in later versions of SaltStack

PNDA-4514
  • Loading branch information
trsmith2 committed Apr 10, 2018
1 parent 534259d commit 9c2e33b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions salt/volumes/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@
volumes-format-{{ device }}:
cmd.run:
- name: mkfs -t {{ fs_type }} {{ mkfs_opts }} {{ device }}
- unless:
- 'grep "{{ device }}" <<< "$(cat /etc/fstab)"'
- unless: cat /etc/fstab | grep "{{ device }}"
volumes-mount-{{ device }}:
mount.mounted:
Expand Down

0 comments on commit 9c2e33b

Please sign in to comment.