如何通过Ansible服务器将文件从Nexus存储库或https Web服务器流式传输到远程服务器
目前,我在本地Ansible服务器上使用get_url,并将文件存储在/tmp中。然后将文件复制到远程服务器。是否有一个选项可以一步完成此操作,而无需从/tmp中删除文件?可能是流方法,因此ansible服务器上不需要磁盘空间 使用此选项的原因是在DMZ区域的服务器上安装了无法访问远程存储库的包如何通过Ansible服务器将文件从Nexus存储库或https Web服务器流式传输到远程服务器,ansible,Ansible,目前,我在本地Ansible服务器上使用get_url,并将文件存储在/tmp中。然后将文件复制到远程服务器。是否有一个选项可以一步完成此操作,而无需从/tmp中删除文件?可能是流方法,因此ansible服务器上不需要磁盘空间 使用此选项的原因是在DMZ区域的服务器上安装了无法访问远程存储库的包 - name: install - Prepare download on the Ansible server local_action: module: file path: &
- name: install - Prepare download on the Ansible server
local_action:
module: file
path: "{{ package_tmp }}"
state: directory
become: no
- name: install - Download the AMQ software to the Ansible server
local_action:
module: get_url
url: "{{ repo_base_url }}/redhat_repo/active-mq/{{ jboss_amq_artifact_name }}"
dest: "{{ package_tmp }}/{{ jboss_amq_artifact_name }}"
url_username: "{{ repo_user }}"
url_password: "{{ repo_password }}"
validate_certs: no
become: no
- name: "install - Unarchive AMQ software in : {{ amq_root_dir }}"
unarchive:
src: "{{ package_tmp }}/{{ jboss_amq_artifact_name }}"
dest: "{{ amq_root_dir }}"
keep_newer: yes
become: yes
become_user: "{{ amq_user }}"
- name: install - Remove download package from the Ansible server
local_action:
module: file
path: "{{ package_tmp }}/{{ jboss_amq_artifact_name }}"
state: absent
become: no