Hi everyone, I just need some help regarding Ansible Vault. My .ini inventory is currently encrypted with Ansible Vault, but after running it in the Rundeck GUI, I encountered an error. Here is the error:
[WARNING]: * Failed to parse /opt/ansible-lab/inventories/ubuntu.ini with ini
The INI format file for Ansible inventory cannot be vaulted, nor does it support inline encrypted vault strings. Instead, use a directory structure where your plain inventory.ini file sits next to a group_vars/ or host_vars/ folder containing encrypted YAML vault files.
Vaulted inventory support depends on the inventory plugin itself. Plugins can choose to open the file with functions that support vaulted content, the ini inventory plugin does do this.
#>ansible-inventory -i ../testing/valutedini.ini --ask-vault-pass --list
[WARNING]: You are running the development version of Ansible. You should only run Ansible from "devel" if you are modifying the Ansible engine, or trying out features under development. This is a rapidly changing source of code and can become unstable at any point.
Vault password: test
{
"_meta": {
"hostvars": {},
"profile": "inventory_legacy"
},
"all": {
"children": [
"ungrouped"
]
},
"ungrouped": {
"hosts": [
"host1",
"host2"
]
}
}
#>cat ../testing/valutedini.ini
$ANSIBLE_VAULT;1.1;AES256
32383232653430383435373334393566333566633738336235303637613532383930313032356630
3932643561613133333362623762353133383330383234300a356237343637303666376639306161
36396434666463363831366162386462626630396539343437326138613736333363366162626161
3638623038393964340a353433303336373535356130373561653062656532393733666265663166
3236
Yes, at first i thought only the yaml plugin supported this, but then tested and realized we built this into the ini also. The error they are getting seem unrelated to ansible vault encryption and looks like a different encryption method.