我正在使用AWS repo对使用mqperf的消息队列进行基准测试。我试图告诉ansible从消息队列的链接下载,它应该只是从我的机器上复制一个为特定MQ构建的包。
安装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我想要的不是从特定的URL下载,而是告诉它从我机器上的位置下载。
这样做是可能的吗?
发布于 2021-03-09 18:04:16
您想要使用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.confhttps://stackoverflow.com/questions/66544742
复制相似问题