mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-15 09:23:06 -06:00
Merged in ITPLT-3591-ansible---hotfix-downloading- (pull request #210)
ITPLT-3591 ansible hotfix for baisc_auth downloading of mesh Approved-by: Alan Cheng
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
mesh_install_dir: /opt/atlassian/mesh
|
mesh_install_dir: /opt/atlassian/mesh
|
||||||
bitbucket_mesh_maven_repo: https://packages.atlassian.com/maven-external
|
bitbucket_mesh_maven_repo: https://packages.atlassian.com/maven-external
|
||||||
bitbucket_mesh_version: "1.3.1"
|
bitbucket_mesh_version: "1.3.1"
|
||||||
|
|
||||||
|
# if basic_auth is required for download of atlassian installable artifact, provide the name of an AWS Secrets Manager secret
|
||||||
|
# with values for both password and username
|
||||||
|
atl_download_secret_name: ''
|
||||||
@@ -13,18 +13,33 @@
|
|||||||
- "{{ atl_home_base }}/{{ atl_product_user }}"
|
- "{{ atl_home_base }}/{{ atl_product_user }}"
|
||||||
- "{{ mesh_install_dir }}"
|
- "{{ mesh_install_dir }}"
|
||||||
|
|
||||||
- name: download the mesh distribution using maven
|
|
||||||
community.general.maven_artifact:
|
# optionally grab basic_auth creds from secrets_manager secret called 'download_atlassian'
|
||||||
group_id: "com.atlassian.bitbucket.mesh"
|
- name: set basic_auth facts if the secret exists
|
||||||
artifact_id: "mesh-distribution"
|
ansible.builtin.set_fact:
|
||||||
extension: "tar.gz"
|
download_atlassian_password: "{{ lookup('amazon.aws.aws_secret', atl_download_secret_name + '.password', region=ansible_ec2_placement_region, bypath=false, nested=true, on_denied='skip', on_missing='skip') }}"
|
||||||
version: "{{ atl_product_version }}"
|
download_atlassian_username: "{{ lookup('amazon.aws.aws_secret', atl_download_secret_name + '.username', region=ansible_ec2_placement_region, bypath=false, nested=true, on_denied='skip', on_missing='skip') }}"
|
||||||
repository_url: "{{ bitbucket_mesh_maven_repo }}"
|
failed_when: false
|
||||||
|
ignore_errors: yes
|
||||||
|
no_log: true
|
||||||
|
when:
|
||||||
|
- ansible_ec2_placement_region is defined
|
||||||
|
- atl_download_secret_name is defined
|
||||||
|
tags:
|
||||||
|
- runtime_pkg
|
||||||
|
|
||||||
|
# Fetch binary and copy to temp
|
||||||
|
# optionally use basic_auth creds from secrets_manager
|
||||||
|
- name: Fetch binary
|
||||||
|
ansible.builtin.get_url:
|
||||||
|
url: "{{ atl_product_download_url }}"
|
||||||
dest: "{{ mesh_install_dir }}"
|
dest: "{{ mesh_install_dir }}"
|
||||||
keep_name: yes
|
url_password: "{{ download_atlassian_password | default(omit) }}"
|
||||||
mode: "0644"
|
url_username: "{{ download_atlassian_username | default(omit) }}"
|
||||||
owner: "{{ atl_product_user_uid }}"
|
owner: "{{ atl_product_user }}"
|
||||||
group: "{{ atl_product_user_uid }}"
|
group: "{{ atl_product_user }}"
|
||||||
|
mode: 0644
|
||||||
|
force: false
|
||||||
register: maven_download
|
register: maven_download
|
||||||
|
|
||||||
- name: extract the downloaded artifact
|
- name: extract the downloaded artifact
|
||||||
|
|||||||
Reference in New Issue
Block a user