4 ms·
Ansible is writing bash scripts in YAML, templates using system that doesn't grok YAML and causes parsing errors due to whitespace, interpreted by schizophrenic
by p_l 6y ago
Ansible is writing bash scripts in YAML, templates using system that doesn't grok YAML and causes parsing errors due to whitespace, interpreted by schizophrenic Python that might be 2 or it might be 3.
... I guess pure bash might be better.
- pnutjam 6y agoyou can run pure bash from ansible, either by copying a script or using the shell module: examples: both with sudo ansible all -m shell -a "hostname" -b ansible all -m script -a "script=/home/user/myscript.sh" -b I love to throw together a quick inventory list and run adhoc ansible commands against a bunch of servers.
- partdavid 6y agoI have my issues with Ansible, and I'm really not a fan of "templated YAML"-based tools, which has been an unfortunate trend that's not limited to Ansible (GCDM and helm share this problem). But if you're writing a lot of bash scripts into your plays you're probably doing it wrong.