I'm working on a playbook to upgrade all our F5 devices but having trouble with the download of the ISO from Artifactory to the F5. When I run the play the file is downloaded but its downloaded to the Ansible control node not the F5. Here's my play,
---
- hosts:
- lab_f5
gather_facts: no
connection: local
vars_prompt:
- name: f5_user
prompt: "Enter F5 Username"
private: no
- name: f5_password
prompt: "Enter F5 Password"
tasks:
- name: Shell download
args:
executable: /bin/bash
chdir: /shared/images
delegate_to: "{{ inventory_hostname }}"
It doesn't seem to matter if I use the delegate_to statement or not. If I run the play I get a message that the /shared/images doesn't exists and if I remove the chdir or change the directory to something that exists on my Ansible control node it works but downloads the file to the control node not the F5.
Any help or suggestions would be appreciated.