diff --git a/playbook.yml b/playbook.yml index 0acce66..84ce8f0 100644 --- a/playbook.yml +++ b/playbook.yml @@ -14,10 +14,10 @@ CV_ASSUME_DISTID: OEL7.8 roles: -# - filesystem -# - ora_inst_ahf -# - db1913 -# - tvd + - filesystem + - ora_inst_ahf + - db1913 + - tvd - restconfig #handlers: diff --git a/roles/db1913/files/.18cEE_SoftOnly.rsp.swp b/roles/db1913/files/.18cEE_SoftOnly.rsp.swp deleted file mode 100644 index 402ea10..0000000 Binary files a/roles/db1913/files/.18cEE_SoftOnly.rsp.swp and /dev/null differ diff --git a/roles/db1913/tasks/main.yml b/roles/db1913/tasks/main.yml index 57c5b65..213d014 100755 --- a/roles/db1913/tasks/main.yml +++ b/roles/db1913/tasks/main.yml @@ -21,7 +21,7 @@ - name: Run orachk with option nordbms expect: - command: "/opt/ahf/oracle.ahf/bin/orachk -profile preinstall -nordbms" + command: "/opt/oracle.ahf/bin/orachk -profile preinstall -nordbms" responses: '(?m)^This computer is for.*': "S" '(?m)^orachk did not find the inventory.*': "n" @@ -305,7 +305,8 @@ when: inventory_hostname in groups['dbservers'] #remote_user: "{{ root_user }}" shell: "{{ oracle_inventory }}/orainstRoot.sh" - #ignore_errors: True + #teilweise ist das oraInventory vorhanden, daher ignore_errors + ignore_errors: True tags: - db19c_exeorainstroot diff --git a/roles/ora_inst_ahf/defaults/main.yml b/roles/ora_inst_ahf/defaults/main.yml index e14d778..ed97d53 100644 --- a/roles/ora_inst_ahf/defaults/main.yml +++ b/roles/ora_inst_ahf/defaults/main.yml @@ -1,10 +1 @@ --- -# defaults file for ora_inst_ahf -# variables - -os_distrib: RedHat # Actually, not only RH, but also OEL, SuSE, Solaris ... -ahf_archive_repo: /sw/oracle/DB/linux -ahf_archive_dir: AHF-LINUX_v22.2.4 -ahf_archive_name: AHF-LINUX_v22.2.4.zip # Downloadable on MOS note 30166242 -ahf_archive_version: "{{ (ahf_archive_name | regex_replace('v|.zip', '_')).split('_')[2] }}" -ahf_install_dir: /opt diff --git a/roles/ora_inst_ahf/tasks/main.yml b/roles/ora_inst_ahf/tasks/main.yml index c5b193b..c1182c1 100644 --- a/roles/ora_inst_ahf/tasks/main.yml +++ b/roles/ora_inst_ahf/tasks/main.yml @@ -17,7 +17,7 @@ register: stat_ahf - - name: Get current version of already installed AHF - set -o pipefail && {{ ahf_install_dir }}/ahf/oracle.ahf/bin/tfactl version | cut -d' ' -f4 | head -n 1 + - name: Get current version of already installed AHF shell: "set -o pipefail && {{ ahf_install_dir }}/ahf/oracle.ahf/bin/tfactl version | cut -d' ' -f4 | head -n 1" register: ahf_current_version when: stat_ahf.stat.exists @@ -44,18 +44,18 @@ - name: Create ahf installation directory file: - path: "{{ ahf_install_dir }}/ahf" + path: "{{ ahf_install_dir }}/oracle.ahf/data" state: directory mode: 0755 - - name: Create ahf-data directory - file: - path: "{{ ahf_install_dir }}/ahf/data" - state: directory - mode: 0755 + # - name: Create ahf-data directory + # file: + # path: "{{ ahf_install_dir }}/ahf/data" + # state: directory + # mode: 0755 - - name: Run ahf installer {{ ahf_archive_repo }}/{{ ahf_archive_dir }}/ahf_setup -silent -ahf_loc {{ ahf_install_dir }}/ahf -data_dir {{ ahf_install_dir }}/ahf/data - shell: "{{ ahf_archive_repo }}/{{ ahf_archive_dir }}/ahf_setup -silent -ahf_loc {{ ahf_install_dir }}/ahf -data_dir {{ ahf_install_dir }}/ahf/data" + - name: Run ahf installer {{ ahf_archive_repo }}/{{ ahf_archive_dir }}/ahf_setup -silent -ahf_loc {{ ahf_install_dir }}/oracle.ahf -data_dir {{ ahf_install_dir }}/oracle.ahf/data + shell: "{{ ahf_archive_repo }}/{{ ahf_archive_dir }}/ahf_setup -silent -ahf_loc {{ ahf_install_dir }}/oracle.ahf -data_dir {{ ahf_install_dir }}/oracle.ahf/data" # - name: Clean up ahf installer diff --git a/roles/ora_inst_ahf/vars/main.yml b/roles/ora_inst_ahf/vars/main.yml index 64c51e7..c885646 100644 --- a/roles/ora_inst_ahf/vars/main.yml +++ b/roles/ora_inst_ahf/vars/main.yml @@ -1,2 +1,10 @@ --- -# vars file for ora_inst_ahf \ No newline at end of file +# vars for ora_inst_ahf +# variables + +os_distrib: RedHat # Actually, not only RH, but also OEL, SuSE, Solaris ... +ahf_archive_repo: /sw/oracle/DB/linux +ahf_archive_dir: AHF-LINUX_v22.2.4 +ahf_archive_name: AHF-LINUX_v22.2.4.zip # Downloadable on MOS note 30166242 +ahf_archive_version: "{{ (ahf_archive_name | regex_replace('v|.zip', '_')).split('_')[2] }}" +ahf_install_dir: /opt diff --git a/roles/restconfig/tasks/main.yml b/roles/restconfig/tasks/main.yml index a8eba03..848c4a5 100644 --- a/roles/restconfig/tasks/main.yml +++ b/roles/restconfig/tasks/main.yml @@ -96,6 +96,34 @@ loop_control: label: "{{ item.path }}" + +############################## +# addin entries to profile +############################## +- name: Further entries for profile + become_user: oracle + become: yes + lineinfile: + path: /home/oracle/.bash_profile + regexp: '^# Below this line.*\n# --*' + insertafter: '^# -----.*' + line: | + # weitere Aliase + alias cdrman='cd ${BE_ORA_ADMIN_SID}/rman' + alias tf='tail -f ' + alias tan='tail -f nohup.out' + export PATH=$PATH:/sw/RS/LITO/rhl + #Titelzeile + RS_UNAM=`uname` + RS_HOST=`hostname | cut -d. -f1` + RS_SIDLIST=`echo $BE_SIDLIST | sed 's/emagent[^ ]*//g' | sed 's/rdbms[^ ]*//g' | tr -s " "` + if [ "$RS_UNAM" = "Linux" ]; then + RS_IP=`hostname -i` + else + RS_IP=`nslookup $RS_HOST | grep "Address" | tail -1 | awk '{print $2}'` + fi + xtitle "$RS_HOST - $RS_IP ($RS_UNAM) $RS_SIDLIST" + ############################## # linking emagent with latest oracle_home ############################## @@ -128,5 +156,5 @@ state: link when: directory_data.stat.exists -- debug: msg="Verzeichnis {{ emagent_inst_dir }} auf Server nicht gefunden" +- debug: msg="Verzeichnis {{ emagent_inst_dir }} auf Server nicht gefunden ln -s {{ sortiert.msg[0] }}/perl {{ emagent_inst_dir }}/perl" when: not directory_data.stat.exists diff --git a/roles/test/README.md b/roles/test/README.md deleted file mode 100644 index 225dd44..0000000 --- a/roles/test/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Role Name -========= - -A brief description of the role goes here. - -Requirements ------------- - -Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. - -Role Variables --------------- - -A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. - -Dependencies ------------- - -A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. - -Example Playbook ----------------- - -Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: - - - hosts: servers - roles: - - { role: username.rolename, x: 42 } - -License -------- - -BSD - -Author Information ------------------- - -An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/test/defaults/main.yml b/roles/test/defaults/main.yml deleted file mode 100644 index e14d778..0000000 --- a/roles/test/defaults/main.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -# defaults file for ora_inst_ahf -# variables - -os_distrib: RedHat # Actually, not only RH, but also OEL, SuSE, Solaris ... -ahf_archive_repo: /sw/oracle/DB/linux -ahf_archive_dir: AHF-LINUX_v22.2.4 -ahf_archive_name: AHF-LINUX_v22.2.4.zip # Downloadable on MOS note 30166242 -ahf_archive_version: "{{ (ahf_archive_name | regex_replace('v|.zip', '_')).split('_')[2] }}" -ahf_install_dir: /opt diff --git a/roles/test/handlers/main.yml b/roles/test/handlers/main.yml deleted file mode 100644 index 720b1aa..0000000 --- a/roles/test/handlers/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# handlers file for ora_inst_ahf \ No newline at end of file diff --git a/roles/test/meta/main.yml b/roles/test/meta/main.yml deleted file mode 100644 index 3a212a9..0000000 --- a/roles/test/meta/main.yml +++ /dev/null @@ -1,53 +0,0 @@ -galaxy_info: - author: your name - description: your description - company: your company (optional) - - # If the issue tracker for your role is not on github, uncomment the - # next line and provide a value - # issue_tracker_url: http://example.com/issue/tracker - - # Choose a valid license ID from https://spdx.org - some suggested licenses: - # - BSD-3-Clause (default) - # - MIT - # - GPL-2.0-or-later - # - GPL-3.0-only - # - Apache-2.0 - # - CC-BY-4.0 - license: license (GPL-2.0-or-later, MIT, etc) - - min_ansible_version: 2.4 - - # If this a Container Enabled role, provide the minimum Ansible Container version. - # min_ansible_container_version: - - # - # Provide a list of supported platforms, and for each platform a list of versions. - # If you don't wish to enumerate all versions for a particular platform, use 'all'. - # To view available platforms and versions (or releases), visit: - # https://galaxy.ansible.com/api/v1/platforms/ - # - # platforms: - # - name: Fedora - # versions: - # - all - # - 25 - # - name: SomePlatform - # versions: - # - all - # - 1.0 - # - 7 - # - 99.99 - - galaxy_tags: [] - # List tags for your role here, one per line. A tag is a keyword that describes - # and categorizes the role. Users find roles by searching for tags. Be sure to - # remove the '[]' above, if you add tags to this list. - # - # NOTE: A tag is limited to a single word comprised of alphanumeric characters. - # Maximum 20 tags per role. - -dependencies: [] - # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. - \ No newline at end of file diff --git a/roles/test/tasks/main.yml b/roles/test/tasks/main.yml deleted file mode 100644 index fdff395..0000000 --- a/roles/test/tasks/main.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- - - name: Ansible replace orahometab Version - replace: - path: /opt/oracle/trivadis/local/dba/etc/orahometab - regexp: 'rdbms19' - replace: "rdbms1913" diff --git a/roles/test/templates/sqlnet.ora b/roles/test/templates/sqlnet.ora deleted file mode 100644 index 5fe3b80..0000000 --- a/roles/test/templates/sqlnet.ora +++ /dev/null @@ -1,11 +0,0 @@ -# sqlnet.ora Network Configuration File: /opt/oracle/db/12.2.0.1/network/admin/sqlnet.ora -# Generated by Oracle configuration tools. - - -NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME) - -SQLNET.ALLOWED_LOGON_VERSION_CLIENT = 8 - -SQLNET.ALLOWED_LOGON_VERSION_SERVER = 8 - -SQLNET.EXPIRE_TIME = 10 diff --git a/roles/test/templates/tnsnames.ora b/roles/test/templates/tnsnames.ora deleted file mode 100644 index cd47b1b..0000000 --- a/roles/test/templates/tnsnames.ora +++ /dev/null @@ -1,13 +0,0 @@ -# tnsnames.ora Network Configuration File: /opt/oracle/db/19.3/network/admin/tnsnames.ora -# Generated by Oracle configuration tools. - -RMANDB = - (DESCRIPTION = - (ADDRESS = (PROTOCOL = TCP)(HOST = vip-rmandb.polizei-bw.net)(PORT = 1562)) -# (ADDRESS = (PROTOCOL = TCP)(HOST = polsq5701bit03.polizei-bw.net)(PORT = 1562)) - (CONNECT_DATA = - (SERVER = DEDICATED) - (SERVICE_NAME = RMANDB) - ) - ) - diff --git a/roles/test/tests/inventory b/roles/test/tests/inventory deleted file mode 100644 index 878877b..0000000 --- a/roles/test/tests/inventory +++ /dev/null @@ -1,2 +0,0 @@ -localhost - diff --git a/roles/test/tests/test.yml b/roles/test/tests/test.yml deleted file mode 100644 index bda287c..0000000 --- a/roles/test/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - ora_inst_ahf \ No newline at end of file diff --git a/roles/test/vars/.main.yml.swp b/roles/test/vars/.main.yml.swp deleted file mode 100644 index a5eb37f..0000000 Binary files a/roles/test/vars/.main.yml.swp and /dev/null differ diff --git a/roles/test/vars/main.yml b/roles/test/vars/main.yml deleted file mode 100644 index 26e41f2..0000000 --- a/roles/test/vars/main.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -# vars file for TVD -agent_pwd: tibagent -agent_mail: MailAddress="STUTTGART.PTLS.ABT2.REF24.UNIX.DB-ADMIN@polizei.bwl.de" -