Issue
I'm using mqperf repo for benchmarking messaging queue using AWS. I'm trying to tell ansible to instead to download from a link of messaging queue, it should just copy from my machine a builded package for specific MQ.
Example when installing Artemis:
- name: Create artemis user
user:
name: "{{ artemis_username }}"
shell: /bin/bash
- name: Download artemis
get_url:
dest: "{{ artemis_download_dest }}"
url: "{{ artemis_download_url }}"
- name: Unpack archive
unarchive:
copy: no
dest: /opt
src: "{{ artemis_download_dest }}"
creates: /opt/{{ artemis_name }}
owner: "{{ artemis_username }}"
- name: Create user-friendly link
file:
state: link
src: /opt/{{ artemis_name }}
dest: /opt/artemis
I want instead of to download from specific URL , I want to tell it to do that instead from location on my machine.
Is this possible to do that?
Solution
You want to use the copy module in Ansible, https://docs.ansible.com/ansible/2.9/modules/copy_module.html
- name: Copy file onto remote machine
copy:
src: /srv/myfiles/foo.conf
dest: /etc/foo.conf
Answered By - user7610 Answer Checked By - Mildred Charles (WPSolving Admin)