fatal: [localhost]: FAILED! => {
“ansible_facts”: {
“server”: {}
},
“ansible_included_var_files”: ,
“changed”: false,
“message”: “Could not find or access ‘/etc/ansible/servers/USAEDSADMP01.yaml’ on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option”
}
It seems to be reading the yaml file from the wrong old location for some reason /etc/ansible.
TASK [Include vars of server.yaml file] *****************************************************************************************************************************************************************************************
task path: /etc/ansible/roles/azurebuild/tasks/main.yml:4
Thursday 21 April 2022 14:35:57 -0500 (0:00:00.020) 0:00:00.020 ********
Thursday 21 April 2022 14:35:57 -0500 (0:00:00.019) 0:00:00.019 ********
fatal: [localhost]: FAILED! => {
“ansible_facts”: {
“server”: {}
},
“ansible_included_var_files”: ,
“changed”: false,
“message”: “Could not find or access ‘/etc/ansible/servers/USAEDSADMP01.yaml’ on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option”
}
Below is my ansible.cfg:
[inventory]
enable_plugins = yaml, ini
ansible executes tasks by copying a file onto the remote host, executing it and reporting the results back to the control machine. #With pipelining enabled, Ansible can send commands directly to STDIN through a persistent SSH connection, which is much faster than the default process.
#[ssh_connection]
pipelining = True
[defaults]
some basic default values…
inventory=./hosts
forks = 10 #find a task’s time consumption and identify which jobs are slowing down your plays
callbacks_enabled = timer, profile_tasks, profile_roles #Facts gathering can be improved using fact caching. #It can use redis or create JSON files on your Ansible host. Following options in the ansible.cfg file will use smart gathering and facts caching with a local json file
gathering = smart
fact_caching = jsonfile
fact_caching_connection = /tmp
strategy_plugins = /usr/local/lib/python3.8/dist-packages/ansible_mitogen/plugins/strategy
strategy = mitogen_linear