Skip to content

Instantly share code, notes, and snippets.

@tadeboro
tadeboro / demo.sh
Created September 3, 2020 19:12
ansible-argspec-gen demo
# Installation
python3 -m venv venv
. venv/bin/activate
pip install ansible-argspec-gen[base]
# Dry run with diagnostics
ansible-argspec-gen --diff --dry-run sample.py
echo $? # Will report back 1
# Perform changes
@tadeboro
tadeboro / input.j2
Created September 11, 2020 09:28
Templatng NGINX config
server {
{% for location in nginx_extra_basic_location_options %}
{{ location }};
{% endfor %}
}
@tadeboro
tadeboro / playbook.yaml
Created September 23, 2020 15:58
with_flattened test
---
- hosts: localhost
gather_facts: false
tasks:
- name: Test
shell: echo {{ item }}
with_flattened:
- [ a, b, c ]
- [ d, e ]