<commit_before>---

  - name: Check if DB-server is already installed
    shell: grep "{{ oracle_home_db  }}" "{{ oracle_inventory_loc }}/ContentsXML/inventory.xml" |wc -l
    with_dict: oracle_databases 
    tags: 
    - checkifdbinstall
    register: checkdbswinstall

  - name: Mount nfs share with installation media
    mount: src="{{ nfs_server_sw }}:{{ nfs_server_sw_path }}" name={{ oracle_stage_remote }} fstype=nfs state=mounted
    when: not oracle_sw_copy|bool and not oracle_sw_unpack|bool
    tags:
      - nfsmountdb


#  - debug: var=checkdbswinstall.stdout
#    with_items: checkdbswinstall.results
#    when: master_node
#    tags:
#     - checkifdbinstall

  - name: Add new dotprofile (DB)
    template: src=dotprofile-db.j2 dest={{ oracle_user_home }}/{{oracle_profile_name }} owner={{ oracle_user }} group={{ oracle_group }} mode=775 backup=yes
    with_dict: oracle_databases
    tags: 
    - dotprofiledb

  - name: Add oraInst.loc
    template: src=oraInst.loc.j2 dest=/etc/oraInst.loc owner={{ oracle_user }} group={{ oracle_group }} mode=644 backup=yes
    tags: 
    - orainst

  - name: Create stage directory (base)
    file: dest={{ oracle_stage }} mode=775 owner={{ oracle_user }} group={{ oracle_group }} state=directory
    tags:
      - directoriesdb
  
  - name: Create stage directory (version specific)
    file: dest={{ oracle_stage }}/{{ item.version }} mode=775 owner={{ oracle_user }} group={{ oracle_group }} state=directory
    with_items: oracle_sw_image_db
    tags:
      - directoriesdb

  - name: Create rsp stage directory
    file: dest={{ oracle_rsp_stage }} mode=775 owner={{ oracle_user }} group={{ oracle_group }} state=directory
    tags:
      - directoriesdb

  - name: Create ORACLE_BASE directory
    file: dest={{ oracle_base }} mode=775 owner={{ oracle_user }} group={{ oracle_group }} state=directory
    tags:
      - directoriesdb
  
  - name: Create cfgtoollogs directory
    file: dest={{ oracle_base }}/cfgtoollogs mode=775 owner={{ oracle_user }} group={{ oracle_group }} state=directory recurse=yes
    sudo: yes
    tags:
      - directoriesdb
  
  - name: Create admin directory
    file: dest={{ oracle_base }}/admin mode=775 owner={{ oracle_user }} group={{ oracle_group }} state=directory
    sudo: yes
    tags:
      - directoriesdb<commit_msg>fix for permissions issue when using role separation<commit_after>---

  - name: Check if DB-server is already installed
    shell: grep "{{ oracle_home_db  }}" "{{ oracle_inventory_loc }}/ContentsXML/inventory.xml" |wc -l
    with_dict: oracle_databases 
    tags: 
    - checkifdbinstall
    register: checkdbswinstall

  - name: Mount nfs share with installation media
    mount: src="{{ nfs_server_sw }}:{{ nfs_server_sw_path }}" name={{ oracle_stage_remote }} fstype=nfs state=mounted
    when: not oracle_sw_copy|bool and not oracle_sw_unpack|bool
    tags:
      - nfsmountdb


#  - debug: var=checkdbswinstall.stdout
#    with_items: checkdbswinstall.results
#    when: master_node
#    tags:
#     - checkifdbinstall

  - name: Add new dotprofile (DB)
    template: src=dotprofile-db.j2 dest={{ oracle_user_home }}/{{oracle_profile_name }} owner={{ oracle_user }} group={{ oracle_group }} mode=775 backup=yes
    with_dict: oracle_databases
    tags: 
    - dotprofiledb

  - name: Add oraInst.loc
    template: src=oraInst.loc.j2 dest=/etc/oraInst.loc owner={{ oracle_user }} group={{ oracle_group }} mode=644 backup=yes
    tags: 
    - orainst

  - name: Create stage directory (base)
    file: dest={{ oracle_stage }} mode=775 owner={{ oracle_user }} group={{ oracle_group }} state=directory
    tags:
      - directoriesdb
  
  - name: Create stage directory (version specific)
    file: dest={{ oracle_stage }}/{{ item.version }} mode=775 owner={{ oracle_user }} group={{ oracle_group }} state=directory
    with_items: oracle_sw_image_db
    tags:
      - directoriesdb

  - name: Create rsp stage directory
    file: dest={{ oracle_rsp_stage }} mode=775 owner={{ oracle_user }} group={{ oracle_group }} state=directory
    tags:
      - directoriesdb

  - name: Create ORACLE_BASE directory
    file: dest={{ oracle_base }} mode=775 owner={{ oracle_user }} group={{ oracle_group }} state=directory
    tags:
      - directoriesdb
  
  - name: Create cfgtoollogs directory
    file: dest={{ oracle_base }}/cfgtoollogs mode=775 owner={{ oracle_user }} group={{ oracle_group }} state=directory recurse=yes
    sudo: yes
    tags:
      - directoriesdb
  
  - name: Create admin directory
    file: dest={{ oracle_base }}/admin mode=775 owner={{ oracle_user }} group={{ oracle_group }} state=directory
    sudo: yes
    tags:
      - directoriesdb

  - name: Create audit directory
    file: dest={{ oracle_base }}/audit mode=775 owner={{ oracle_user }} group={{ oracle_group }} state=directory
    sudo: yes
    tags:
      - directoriesdb
{'fraction_non_alphanumeric': 0.11899876897825194, 'fraction_numerical': 0.011284366023799754, 'mean_word_length': 3.55607476635514, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5084359', 'n_tokens_mistral': 1609, 'n_tokens_neox': 1531, 'n_words': 404}