ansible file fails search path
A fresh deploy fails, because the task path seems to be wrong. Ansible should look for the file in float/roles/float-base/files/apt
TASK [copy] *******************************************************************************************
task path: /home/kwadronaut/dev/leap/demo/float/playbooks/apt-upgrade.yml:5
The full traceback is:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/ansible/plugins/action/copy.py", line 466, in run
source = self._find_needle('files', source)
File "/usr/lib/python3/dist-packages/ansible/plugins/action/__init__.py", line 1232, in _find_needle
return self._loader.path_dwim_relative_stack(path_stack, dirname, needle)
File "/usr/lib/python3/dist-packages/ansible/parsing/dataloader.py", line 327, in path_dwim_relative_stack
raise AnsibleFileNotFound(file_name=source, paths=[to_native(p) for p in search])
ansible.errors.AnsibleFileNotFound: Could not find or access 'float/roles/float-base/files/apt/deb_autistici_org.gpg'
Searched in:
/home/kwadronaut/dev/leap/demo/float/playbooks/files/float/roles/float-base/files/apt/deb_autistici_org.gpg
/home/kwadronaut/dev/leap/demo/float/playbooks/float/roles/float-base/files/apt/deb_autistici_org.gpg
/home/kwadronaut/dev/leap/demo/float/playbooks/files/float/roles/float-base/files/apt/deb_autistici_org.gpg
/home/kwadronaut/dev/leap/demo/float/playbooks/float/roles/float-base/files/apt/deb_autistici_org.gpg on the Ansible Controller.
If you are using a module and expect the file to exist on the remote, see the remote_src option
fatal: [donkey.bitmask.net]: FAILED! => {
"changed": false,
"invocation": {
"dest": "/usr/share/keyrings/deb.autistici.org.gpg",
"module_args": {
"dest": "/usr/share/keyrings/deb.autistici.org.gpg",
"src": "float/roles/float-base/files/apt/deb_autistici_org.gpg"
},
"src": "float/roles/float-base/files/apt/deb_autistici_org.gpg"
},
"msg": "Could not find or access 'float/roles/float-base/files/apt/deb_autistici_org.gpg'\nSearched in:\n\t/home/kwadronaut/dev/leap/demo/float/playbooks/files/float/roles/float-base/files/apt/deb_autistici_org.gpg\n\t/home/kwadronaut/dev/leap/demo/float/playbooks/float/roles/float-base/files/apt/deb_autistici_org.gpg\n\t/home/kwadronaut/dev/leap/demo/float/playbooks/files/float/roles/float-base/files/apt/deb_autistici_org.gpg\n\t/home/kwadronaut/dev/leap/demo/float/playbooks/float/roles/float-base/files/apt/deb_autistici_org.gpg on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option"
}