Hello
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
------------------------------
francois Van Heerden
------------------------------
Original Message:
Sent: 02-14-2023 11:27
From: Unknown User
Subject: Ansible to delete file.
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
Thanks.