shell-server
shell-server copied to clipboard
add test for `blockinfile` to *always* have a marker
this should honestly be an issue with Ansible, but blockinfile will remove other blocks from other tasks if not given a task-specific marker!!! just add marker: "# {mark} ANSIBLE - sssd for ssh" or something like that!
i'm adding a PR to fix the blockinfile issues that are currently in master
for file in $(find ansible/tasks -type f -name '*.yml'); do yq -e ".. | .blockinfile? | select(. != null) | .marker" $file | grep "^null$"; done
^ that's a really ghetto way of doing it but it works, if you see "null" you messed up
Tiny tweak:
[ $(for file in $(find ansible/tasks -type f -name '*.yml'); do yq -e ".. | .blockinfile? | select(. != null) | .marker" $file | grep null; done|wc -l) -eq 0 ]
This will need to be changed when #68 is completed.