I want to configure some of edgerouters with ansible
one of the tasks is send a user`s public key then config authenticate with that key
the task is quite simple
but I found although the tasks runs successfully , but the file does not show on edgerouter
- name: “Copy SSH public key to router”
copy:
src: “usera.pub”
dest: “/tmp/usera.pub”
and also I try to generate file by using templates , the same situation, tasks runs ok , but destination file does not exists.
ans here is the playbook
- hosts: all
become: True
become_user: root
become_method: sudo
connection: network_cli
gather_facts: no
vars:- role_users: “{{ technical_users }}”
- server_location: hq
- ansible_network_os: edgeos
- ansible_connection: network_cli
- ansible_become: yes
- ansible_become_method: enable
roles:
- { role: hosts, tags: hosts }
- { role: edgerouter , tags: edgerouter }
any suggestions ?