Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add test for blockinfile to *always* have a marker #51

Open
RyanSquared opened this issue Jun 26, 2018 · 4 comments
Open

add test for blockinfile to *always* have a marker #51

RyanSquared opened this issue Jun 26, 2018 · 4 comments

Comments

@RyanSquared
Copy link
Member

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!

@RyanSquared
Copy link
Member Author

i'm adding a PR to fix the blockinfile issues that are currently in master

@RyanSquared
Copy link
Member Author

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

@RyanSquared
Copy link
Member Author

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 ]

@RyanSquared
Copy link
Member Author

This will need to be changed when #68 is completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant