Saturday, August 6, 2016

IntelliJ, Ansible, Vaults and Windows ...

How to integrate ansible-vault in IntelliJ under Windows

Software prerequisites:

- install cygwin (I placed it directly on the C: drive)
- install pip inside cygwin: easy_install pip
- inside cygwin install ansible-vault using pip: pip install ansible-vault

Now we have the tools in place, we can switch to the setup:

- create a password file for example under C:\Users\<your user>\ansible_vault_pass

echo -n "MyStrongPasswordSomething"

As we are on Windows, Ansible will detect the file as executable and try to run it in order to obtain the password.

- last create the 2 new external tools in IntelliJ as in the screenshots bellow:


Parameters example:
-c "/bin/ansible-vault -vvv encrypt $FileName$ --vault-password-file /cygdrive/c/Users/XX/ansible-vault-pass"

Working directory:

No comments:

Post a Comment