Ansible is an open-source automation engine that automates software provisioning, configuration management, and application deployment.
When installing new server very often you have to download a script and execute it on the server. When you try to automate the installation process with ANSIBLE, you have two options.
The first option is to donload it localy on the machine that will execute the ANSIBLE play/role and specify its path in the script module like in this task:
- name: local script.sh will be transferred to the remote node and then executed
Or you can download the script to the remote node and execute it. this would take two task to be done:
- name: download script.sh file to tmp dir
- name: execute script.sh script
I prefer the second method because this way I am sure getting the latest script version.
I hope this help you complete your ANSIBLE play or role. If you have better solutions, all comments are welcomed.