jpmens, 3 months ago deleted_by_author
deleted_by_author
dirksteins, 3 months ago @jpmens looks like a magic incantation to me.
@jpmens looks like a magic incantation to me.
mdione, 3 months ago @jpmens a) how did you know I had a wrapper? is it that usual?[1] b) can you explain what it does? [1] in my case it's because it's running on a virtualenv
@jpmens
a) how did you know I had a wrapper? is it that usual?[1] b) can you explain what it does?
[1] in my case it's because it's running on a virtualenv
mdione, 3 months ago @jpmens ah, ugh, no wonder I was having issues parsing that. I personally don't quite like that level of shortcuttery, I would prefer a full fledged: # enable YAML metadata output if -v provided if echo "$@" | grep --quiet -- '-v'; then export ANSIBLE_STDOUT_CALLBACK=yaml fi Quite more readable and 'self documented'. Not to mention i hope you never have to give your playbook any argument that actually has -v in it's name...
@jpmens ah, ugh, no wonder I was having issues parsing that. I personally don't quite like that level of shortcuttery, I would prefer a full fledged:
# enable YAML metadata output if -v provided if echo "$@" | grep --quiet -- '-v'; then export ANSIBLE_STDOUT_CALLBACK=yaml fi
# enable YAML metadata output if -v provided
if echo "$@" | grep --quiet -- '-v'; then
export ANSIBLE_STDOUT_CALLBACK=yaml
fi
Quite more readable and 'self documented'. Not to mention i hope you never have to give your playbook any argument that actually has -v in it's name...
-v
ronny, 3 months ago @jpmens put it to ansible.cfg and you have one issue less for other playbooks :)
@jpmens put it to ansible.cfg and you have one issue less for other playbooks :)
ronny, 3 months ago @jpmens you can't do that conditionally, but what you can do is creat ansible.cfg per project, so you don't have that to all of them :)
@jpmens you can't do that conditionally, but what you can do is creat ansible.cfg per project, so you don't have that to all of them :)
Add comment