--- - name: Create Bitbucket shared dir if necessary file: path: "{{ atl_product_home_shared }}" owner: "{{ atl_product_user }}" group: "{{ atl_product_user }}" mode: 0750 state: directory - name: Create Bitbucket config file template: src: bitbucket.properties.j2 dest: "{{ atl_product_home_shared }}/bitbucket.properties" owner: "{{ atl_product_user }}" group: "{{ atl_product_user }}" - name: Remove write permissions from installation directory file: path: "{{ atl_product_installation_versioned }}" owner: "root" group: "root" mode: "u=rwX,g=rX,o=rX" recurse: true changed_when: false # For Molecule idempotence check - name: Set the BITBUCKET_SHARED_HOME location blockinfile: path: "{{ atl_product_installation_versioned }}/bin/set-bitbucket-home.sh" block: | BITBUCKET_SHARED_HOME="{{ atl_product_home_shared }}" export BITBUCKET_SHARED_HOME - name: Make sure elasticsearch data isn't stored in ${BITBUCKET_HOME}/shared lineinfile: path: '{{ elasticsearch_config_template }}' line: ' data: ${BITBUCKET_HOME}/search/data' regexp: '^\s{2}data:\s\$\{BITBUCKET_HOME\}\/s.+$'