Define a nested dictionary in the inventory vars. See this repo for full implementation
vars:
packages:
install: []
remove: []
TASK [packages : debug] ****************************************************************************************************************************************************************************************
ok: [localhost] => {
"packages": {
"install": [
"zsh",
"git",
"fasd"
]
}
}
TASK [packages : removing the following packages] **************************************************************************************************************************************************************
ok: [localhost] => {
"packages.remove": "VARIABLE IS NOT DEFINED!"
}
Why is packages['remove']
not defined?