less than 1 minute read

With one python script, get an UltraSnips file for VIm Ansible modules completion from Ansible 2.2.1.0 and Python 2.7.13.

Build A Debian 9 Stretch VM

mkdir debian && cd debian
vagrant init debian/stretch64
vagrant ssh

Generate UltraSnips File

apt-get install -y ansible git
git clone https://github.com/z0mbix/ansible_snippet_generator /tmp/snippet_generator
/tmp/snippet_generator/snippet_generator.py --ultisnips /usr/lib/python2.7/dist-packages/ansible/modules > /vagrant/ansible.snippets

Sources

That’s all !

Updated: