0

我正在尝试oracle_home使用以下设置

---
- name: setting up the ORACLE_HOME
  hosts: localhost
  become: yes
  environment:
    ORACLE_BASE: "/u01/app/oracle/"
    ORACLE_HOME: $ORACLE_BASE/product/12.1.0.2/cl_100
    PATH: $PATH:$HOME/bin:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch

脚本执行但未设置请帮忙

4

1 回答 1

0

我会选择以下内容:

  vars:
    ORACLE_BASE: "/u01/app/oracle"
    ORACLE_HOME: "{{ORACLE_BASE}}/product/12.1.0.2/cl_100"
    ADD_PATH: "{{ORACLE_HOME}}/bin:{{ORACLE_HOME}}/OPatch"
  environment:
    ORACLE_BASE: "{{ORACLE_BASE}}"
    ORACLE_HOME: "{{ORACLE_HOME}}"
    PATH: "{{ansible_env.PATH}}:{{ansible_env.HOME}}/bin:{{ADD_PATH}}"
于 2019-05-31T14:48:57.620 回答