-
Notifications
You must be signed in to change notification settings - Fork 0
/
oracle_unarchive.yml
36 lines (32 loc) · 1 KB
/
oracle_unarchive.yml
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
- hosts: localhost
vars:
oracle_user: oracle
oracle_group: oinstall
oracle_base: /opt/oracle
install_unpacked: /opt/install/unpacked/
oracle_dirs:
- '{{ oracle_base }}'
- '{{ oracle_base }}/product'
- '{{ oracle_base }}/oraInventory'
tasks:
- name: Create unpacked folder
file:
owner: "{{ oracle_user }}"
group: "{{ oracle_group }}"
path: "{{ install_unpacked }}"
state: directory
become: yes
become_user: root
- name: Unarchive
unarchive:
remote_src: yes
src: '{{ item.name }}'
dest: '{{ install_unpacked }}'
owner: '{{ oracle_user }}'
group: '{{ oracle_group }}'
creates: '{{ item.creates }}'
with_items:
- { name: '/opt/install/linuxamd64_12102_database_1of2.zip', creates: '/opt/install/database/runInstaller' }
- { name: '/opt/install/linuxamd64_12102_database_2of2.zip', creates: '/opt/install/database/stage/Components/oracle.ctx' }
become: yes
become_user: root