deploy_software_stack_script.yml
910 Bytes
---
- hosts: 06_deploy-dma-singlehost-script
become: true
tasks:
- name: Copy Script
command: cp /tmp/source/script.singlehost.tar.gz /opt/stack/script.singlehost.tar.gz
- name: Extract Script
command: tar -zxvf /opt/stack/script.singlehost.tar.gz -C /opt/stack/
- name: Delete File
command: rm /opt/stack/script.singlehost.tar.gz
- hosts: 06_deploy-dma-singlehost-script-3.1.4
become: true
tasks:
- name: Unarchive a file that is already on the remote machine
unarchive:
src: /tmp/source/stackscript.singlehost.zip
dest: /opt/stack
remote_src: yes
group: wdadmin
owner: wdadmin
mode: 0711
- file:
path: '/opt/stack/{{ item.dir }}'
group: wdadmin
owner: wdadmin
mode: 0755
state: directory
recurse: yes
with_items:
- { dir: 'script' }