You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
给另一台远程服务器 config 报错
ansible-linux]# ansible-playbook -u root -i inventory/all playbooks/config.yml
TASK [configure hosts] **********************************************************************************
fatal: [202]: FAILED! => {"changed": false, "msg": "Could not find or access 'files/hosts.j2'\nSearched in:\n\t/root/ansible-linux/playbooks/templates/files/hosts.j2\n\t/root/ansible-linux/playbooks/files/hosts.j2\n\t/root/ansible-linux/playbooks/templates/files/hosts.j2\n\t/root/ansible-linux/playbooks/files/hosts.j2 on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option"}
需要在哪里添加remote_src
ansible-linux]# ansible-playbook -u root -i inventory/all playbooks/config.yml
远程系统如下
[root@202 ~]# uname -a
Linux 202 5.17.7-1.el7.elrepo.x86_64 #1 SMP PREEMPT Tue May 10 17:29:34 EDT 2022 x86_64 x86_64 x86_64 GNU/Linux
[root@202 ~]#
The text was updated successfully, but these errors were encountered:
给另一台远程服务器 config 报错
ansible-linux]# ansible-playbook -u root -i inventory/all playbooks/config.yml
TASK [configure hosts] **********************************************************************************
fatal: [202]: FAILED! => {"changed": false, "msg": "Could not find or access 'files/hosts.j2'\nSearched in:\n\t/root/ansible-linux/playbooks/templates/files/hosts.j2\n\t/root/ansible-linux/playbooks/files/hosts.j2\n\t/root/ansible-linux/playbooks/templates/files/hosts.j2\n\t/root/ansible-linux/playbooks/files/hosts.j2 on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option"}
需要在哪里添加remote_src
ansible-linux]# ansible-playbook -u root -i inventory/all playbooks/config.yml
远程系统如下
[root@202 ~]# uname -a
Linux 202 5.17.7-1.el7.elrepo.x86_64 #1 SMP PREEMPT Tue May 10 17:29:34 EDT 2022 x86_64 x86_64 x86_64 GNU/Linux
[root@202 ~]#
The text was updated successfully, but these errors were encountered: