Closed ranjanp75 closed 2 years ago
Hi @ranjanp75
You are not using the proper environment variable, to configure the default log path.
ansible
documentation could be misunderstood, because the name of the parameter and the name of environment variable that sets that parameter, does not have the same name. You need to use ANSIBLE_LOG_PATH
Take a look at these: https://docs.ansible.com/ansible/latest/reference_appendices/config.html#default-log-path
Just to let you know, thanks to @alexandrevilain, who has prepared #81, there will be soon on master a better way to set up environment variables on DefaultExecutor.
hi @ranjanp75 there is any update about this issue?
@ranjanp75 since there is no update on that issue, I am going to close it
Hi @apenella, I am trying to understand how I can set the env variables for running Ansible playbook. I tried setting the env variable "ANSIBLE_LOG_PATH" by doing
os.Setenv("ANSIBLE_LOG_PATH", "test.log")
before triggering the following command. The ansible does not seem to log even with the env set. Could you please help me with this?The code snippet is as follows