Restconfig fertig

This commit is contained in:
aschwarz 2022-11-24 09:22:44 +01:00
parent 958ce2c41e
commit 4e26cbd803
3 changed files with 24 additions and 2 deletions

Binary file not shown.

View File

@ -107,6 +107,26 @@
recurse: no
register: files
- debug: msg="{{ files.files[1] | sort(attribute='path', reverse=True) | map(attribute='path') | join(',') }}"
# hoechste ORACLE_HOME Version - soweit dies ueber alphabetische Sortierung moeglich ist
- debug: msg="{{ files.files | sort(attribute='path', reverse=True) | map(attribute='path') | list }}"
register: sortiert
# sortiert.msg[0] enthaelt die hoechste OH Version "/opt/oracle/db/19.13"
- debug: msg="{{ files }}"
- name: Check if directory exists
stat:
path: "{{ emagent_inst_dir }}"
register: directory_data
- name: Softlink emagent
file:
src: "{{ sortiert.msg[0] }}/perl"
dest: "{{ emagent_inst_dir }}/perl"
force: yes
owner: oracle
group: dba
follow: no
state: link
when: directory_data.stat.exists
- debug: msg="Verzeichnis {{ emagent_inst_dir }} auf Server nicht gefunden"
when: not directory_data.stat.exists

View File

@ -1,3 +1,5 @@
---
# vars file for restconfig
# linkink perl in emagent
emagent_inst_dir: /opt/oracle/agent/agent_inst