Log in to ask questions, share your expertise, or stay connected to content you value. Don’t have a login? Learn how to become a member.
I am trying to delete a file from my Juniper device using Ansible, but it is not working. This is the code I am using:
tasks: - name: Remove file (delete file) ansible.builtin.file: path: /var/home/remote/.ssh/test.txt state: absent
ansible.builtin.file is specifically for windows/linux operating systems , rather use the file delete junos_command to remove files from a juniper device
- name: delete a file on Juniper devices junos_command: commands: file delete /var/home/remote/.ssh/test.txt
Thanks! Works Great!