deploy_iconsole_script.yml
1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
- hosts: 06_deployed-iConsole-two-host
become: true
tasks:
- name: Copy iConsole
command: cp /tmp/source/iConsole.tar.gz /opt/stack/iConsole.tar.gz
- name: Extract root
command: tar -zxvf /opt/stack/iConsole.tar.gz -C /opt/
- name: Delete File
command: rm /opt/stack/iConsole.tar.gz
- name: Setup Schedule
command: /opt/Schedule/add_schedule
- hosts: 06_deploy-iConsole-single-host
become: true
tasks:
- name: Copy iConsole
command: cp /tmp/source/iConsole.singlehost.dma.tar.gz /opt/stack/iConsole.singlehost.dma.tar.gz
- name: Extract root
command: tar -zxvf /opt/stack/iConsole.singlehost.dma.tar.gz -C /opt/
- name: Delete File
command: rm /opt/stack/iConsole.singlehost.dma.tar.gz
- name: Setup Schedule
command: /opt/Schedule/add_schedule
- hosts: 06_deploy-iConsole-single-host-3.0.6.0
become: true
tasks:
- name: Unarchive a file that is already on the remote machine
unarchive:
src: /tmp/source/iConsole.singlehost.dma.3.0.6.0.zip
dest: /opt
remote_src: yes
group: wdadmin
owner: wdadmin
mode: 0755
- file:
path: '/opt/{{ item.dir }}'
group: wdadmin
owner: wdadmin
mode: 0755
state: directory
recurse: yes
with_items:
- { dir: 'Accessor' }
- { dir: 'iConsole' }
- { dir: 'json' }
- { dir: 'Schedule' }
- name: Setup Schedule
command: /opt/Schedule/add_schedule