I've got a python script that uses the ansible package to ping some remote servers. When executed manually (python devmanager.py) it works ok, but when the script is managed with supervisor it raises the following error:
Could not make dir /$HOME/.ansible/cp: [Errno 13] Permission denied: '/$HOME
The ansible command is quite simple:
runner = ansible.runner.Runner(
module_name='ping',
module_args='',
forks=10,
inventory=inventory
)
Same user in source and target systems. I've check permissions for the $HOME folder and didn't find anything weird.
Any idea what's is going on? Doesn't it know to translate the $HOME variable?