mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 08:53:07 -06:00
only replace bitbucket.properties with template if file does not already exist
This commit is contained in:
@@ -8,12 +8,18 @@
|
|||||||
mode: 0750
|
mode: 0750
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
|
- name: Check if Bitbucket config file exists
|
||||||
|
ansible.builtin.stat:
|
||||||
|
path: "{{ atl_product_home_shared }}/bitbucket.properties"
|
||||||
|
register: bitbucket_config
|
||||||
|
|
||||||
- name: Create Bitbucket config file
|
- name: Create Bitbucket config file
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: bitbucket.properties.j2
|
src: bitbucket.properties.j2
|
||||||
dest: "{{ atl_product_home_shared }}/bitbucket.properties"
|
dest: "{{ atl_product_home_shared }}/bitbucket.properties"
|
||||||
owner: "{{ atl_product_user }}"
|
owner: "{{ atl_product_user }}"
|
||||||
group: "{{ atl_product_user }}"
|
group: "{{ atl_product_user }}"
|
||||||
|
when: not bitbucket_config.stat.exists
|
||||||
|
|
||||||
- name: Remove write permissions from installation directory
|
- name: Remove write permissions from installation directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
|||||||
Reference in New Issue
Block a user