Merge remote-tracking branch 'origin/master' into playbook-analytics

This commit is contained in:
Geoff Jacobs
2024-08-19 11:48:43 +10:00
175 changed files with 2877 additions and 1874 deletions

View File

@@ -3,6 +3,9 @@
# Empty values to simplify logic (no undefineds)
atl_latest_version: ''
atl_cached_version: ''
# 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: ''
atl_product_latest_version_url: "https://marketplace.atlassian.com/rest/2/products/key/{{ atl_product_family }}/versions"
atl_product_version_cache_dir: "{{ atl_product_home_shared }}"
@@ -16,7 +19,8 @@ atl_download_suffix: "{{ atl_download_format_suffix_map[atl_download_format] }}"
atl_release_base_url: "https://product-downloads.atlassian.com/software"
atl_product_base_url: "{{ atl_release_base_url }}/{{ atl_product_family }}/downloads"
atl_product_download_url: "{{ atl_product_base_url }}/atlassian-{{ atl_download_edition | default(atl_product_edition) }}-{{ atl_product_version }}{{ atl_download_suffix }}"
atl_product_download_default_url: "{{ atl_product_base_url }}/atlassian-{{ atl_download_edition | default(atl_product_edition) }}-{{ atl_product_version }}{{ atl_download_suffix }}"
atl_product_download_url: "{{ lookup('env', 'ATL_PRODUCT_DOWNLOAD_URL') or atl_product_download_default_url }}"
atl_product_download_filename: "{{ atl_download_edition | default(atl_product_edition) }}.{{ atl_product_version }}{{ atl_download_suffix }}"
atl_product_temp_download: "{{ atl_installer_temp }}/{{ atl_product_download_filename }}"
@@ -41,3 +45,4 @@ atl_source_obr_from_marketplace: true
atl_servicedesk_download_file: "{{ atl_installer_temp }}/jira-servicedesk.{{ atl_product_version }}.obr"
force_version_update: false
skip_shared_home_symlink: false

View File

@@ -6,8 +6,8 @@ FROM {{ item.registry.url }}/{{ item.image }}
FROM {{ item.image }}
{% endif %}
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash && dnf clean all; \
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python3 sudo bash ca-certificates file && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python3.11 sudo python3.11-devel python*-dnf bash && dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \

View File

@@ -7,6 +7,7 @@
atl_product_user: "bitbucket"
atl_product_home: "{{ atl_shared_mountpoint }}/{{ atl_product_edition }}"
skip_shared_home_symlink: true
roles:
- role: linux_common
- role: product_common

View File

@@ -1,19 +1,21 @@
---
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
platform: linux/amd64
- name: ubuntu_lts
image: ubuntu:bionic
image: ubuntu:jammy
groups:
- aws_node_local
platform: linux/amd64
provisioner:
name: ansible
env:
ANSIBLE_COLLECTIONS_PATH: "../../../../"
options:
skip-tags: runtime_pkg
inventory:

View File

@@ -6,8 +6,8 @@ FROM {{ item.registry.url }}/{{ item.image }}
FROM {{ item.image }}
{% endif %}
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash && dnf clean all; \
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python3 sudo bash ca-certificates file && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python3.11 sudo python3.11-devel python*-dnf bash && dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \

View File

@@ -1,19 +1,21 @@
---
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
platform: linux/amd64
- name: ubuntu_lts
image: ubuntu:bionic
image: ubuntu:jammy
groups:
- aws_node_local
platform: linux/amd64
provisioner:
name: ansible
env:
ANSIBLE_COLLECTIONS_PATH: "../../../../"
options:
skip-tags: runtime_pkg
inventory:

View File

@@ -6,8 +6,8 @@ FROM {{ item.registry.url }}/{{ item.image }}
FROM {{ item.image }}
{% endif %}
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash && dnf clean all; \
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python3 sudo bash ca-certificates file && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python3.11 sudo python3.11-devel python*-dnf bash && dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \

View File

@@ -1,19 +1,21 @@
---
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
platform: linux/amd64
- name: ubuntu_lts
image: ubuntu:bionic
image: ubuntu:jammy
groups:
- aws_node_local
platform: linux/amd64
provisioner:
name: ansible
env:
ANSIBLE_COLLECTIONS_PATH: "../../../../"
options:
skip-tags: runtime_pkg
inventory:

View File

@@ -6,8 +6,8 @@ FROM {{ item.registry.url }}/{{ item.image }}
FROM {{ item.image }}
{% endif %}
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash && dnf clean all; \
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python3 sudo bash ca-certificates file && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python3.11 sudo python3.11-devel python*-dnf bash && dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \

View File

@@ -1,19 +1,21 @@
---
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
platform: linux/amd64
- name: ubuntu_lts
image: ubuntu:bionic
image: ubuntu:jammy
groups:
- aws_node_local
platform: linux/amd64
provisioner:
name: ansible
env:
ANSIBLE_COLLECTIONS_PATH: "../../../../"
options:
skip-tags: runtime_pkg
inventory:

View File

@@ -6,8 +6,8 @@ FROM {{ item.registry.url }}/{{ item.image }}
FROM {{ item.image }}
{% endif %}
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash && dnf clean all; \
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python3 sudo bash ca-certificates file && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python3.11 sudo python3.11-devel python*-dnf bash && dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \

View File

@@ -1,19 +1,21 @@
---
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
platform: linux/amd64
- name: ubuntu_lts
image: ubuntu:bionic
image: ubuntu:jammy
groups:
- aws_node_local
platform: linux/amd64
provisioner:
name: ansible
env:
ANSIBLE_COLLECTIONS_PATH: "../../../../"
options:
skip-tags: runtime_pkg
inventory:

View File

@@ -6,8 +6,8 @@ FROM {{ item.registry.url }}/{{ item.image }}
FROM {{ item.image }}
{% endif %}
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash && dnf clean all; \
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python3 sudo bash ca-certificates file && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python3.11 sudo python3.11-devel python*-dnf bash && dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \

View File

@@ -16,11 +16,11 @@
atl_jdbc_template: 'template0'
pre_tasks:
- name: Create cache dir
file:
ansible.builtin.file:
path: '/media/atl/jira/shared/'
state: directory
- name: Seed version
copy:
ansible.builtin.copy:
dest: '/media/atl/jira/shared/jira-core.version'
content: "8.14.0"
force: false # For idempotency check

View File

@@ -1,19 +1,21 @@
---
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
platform: linux/amd64
- name: ubuntu_lts
image: ubuntu:bionic
image: ubuntu:jammy
groups:
- aws_node_local
platform: linux/amd64
provisioner:
name: ansible
env:
ANSIBLE_COLLECTIONS_PATH: "../../../../"
options:
skip-tags: runtime_pkg
inventory:

View File

@@ -6,8 +6,8 @@ FROM {{ item.registry.url }}/{{ item.image }}
FROM {{ item.image }}
{% endif %}
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash && dnf clean all; \
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python3 sudo bash ca-certificates file && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python3.11 sudo python3.11-devel python*-dnf bash && dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \

View File

@@ -10,11 +10,11 @@
pre_tasks:
- name: Create cache dir
file:
ansible.builtin.file:
path: '/media/atl/jira/shared/'
state: directory
- name: Seed version
copy:
ansible.builtin.copy:
dest: '/media/atl/jira/shared/jira-core.version'
content: "7.10.2"
force: false # For idempotency check

View File

@@ -1,19 +1,21 @@
---
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
platform: linux/amd64
- name: ubuntu_lts
image: ubuntu:bionic
image: ubuntu:jammy
groups:
- aws_node_local
platform: linux/amd64
provisioner:
name: ansible
env:
ANSIBLE_COLLECTIONS_PATH: "../../../../"
options:
vvv: true
skip-tags: runtime_pkg

View File

@@ -6,8 +6,8 @@ FROM {{ item.registry.url }}/{{ item.image }}
FROM {{ item.image }}
{% endif %}
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash && dnf clean all; \
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python3 sudo bash ca-certificates file && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python3.11 sudo python3.11-devel python*-dnf bash && dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \

View File

@@ -10,11 +10,11 @@
pre_tasks:
- name: Create cache dir
file:
ansible.builtin.file:
path: '/media/atl/jira/shared/'
state: directory
- name: Seed version
copy:
ansible.builtin.copy:
dest: '/media/atl/jira/shared/jira-core.version'
content: "7.9.0"
force: false # For idempotency check

View File

@@ -1,19 +1,21 @@
---
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
platform: linux/amd64
- name: ubuntu_lts
image: ubuntu:bionic
image: ubuntu:jammy
groups:
- aws_node_local
platform: linux/amd64
provisioner:
name: ansible
env:
ANSIBLE_COLLECTIONS_PATH: "../../../../"
options:
vvv: true
skip-tags: runtime_pkg

View File

@@ -6,8 +6,8 @@ FROM {{ item.registry.url }}/{{ item.image }}
FROM {{ item.image }}
{% endif %}
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash && dnf clean all; \
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python3 sudo bash ca-certificates file && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python3.11 sudo python3.11-devel python*-dnf bash && dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \

View File

@@ -1,19 +1,21 @@
---
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
platform: linux/amd64
- name: ubuntu_lts
image: ubuntu:bionic
image: ubuntu:jammy
groups:
- aws_node_local
platform: linux/amd64
provisioner:
name: ansible
env:
ANSIBLE_COLLECTIONS_PATH: "../../../../"
options:
skip-tags: runtime_pkg
inventory:

View File

@@ -6,8 +6,8 @@ FROM {{ item.registry.url }}/{{ item.image }}
FROM {{ item.image }}
{% endif %}
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash && dnf clean all; \
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python3 sudo bash ca-certificates file && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python3.11 sudo python3.11-devel python*-dnf bash && dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \

View File

@@ -1,19 +1,21 @@
---
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
platform: linux/amd64
- name: ubuntu_lts
image: ubuntu:bionic
image: ubuntu:jammy
groups:
- aws_node_local
platform: linux/amd64
provisioner:
name: ansible
env:
ANSIBLE_COLLECTIONS_PATH: "../../../../"
options:
skip-tags: runtime_pkg
inventory:

View File

@@ -6,8 +6,8 @@ FROM {{ item.registry.url }}/{{ item.image }}
FROM {{ item.image }}
{% endif %}
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash && dnf clean all; \
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python3 sudo bash ca-certificates file && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python3.11 sudo python3.11-devel python*-dnf bash && dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \

View File

@@ -1,19 +1,21 @@
---
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
platform: linux/amd64
- name: ubuntu_lts
image: ubuntu:bionic
image: ubuntu:jammy
groups:
- aws_node_local
platform: linux/amd64
provisioner:
name: ansible
env:
ANSIBLE_COLLECTIONS_PATH: "../../../../"
options:
skip-tags: runtime_pkg
inventory:

View File

@@ -6,8 +6,8 @@ FROM {{ item.registry.url }}/{{ item.image }}
FROM {{ item.image }}
{% endif %}
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash && dnf clean all; \
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python3 sudo bash ca-certificates file && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python3.11 sudo python3.11-devel python*-dnf bash && dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \

View File

@@ -10,11 +10,11 @@
pre_tasks:
- name: Create cache dir
file:
ansible.builtin.file:
path: '/media/atl/jira/shared/'
state: directory
- name: Seed version
copy:
ansible.builtin.copy:
dest: '/media/atl/jira/shared/jira-core.version'
content: "7.9.0"
force: false # For idempotency check

View File

@@ -1,19 +1,21 @@
---
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
platform: linux/amd64
- name: ubuntu_lts
image: ubuntu:bionic
image: ubuntu:jammy
groups:
- aws_node_local
platform: linux/amd64
provisioner:
name: ansible
env:
ANSIBLE_COLLECTIONS_PATH: "../../../../"
options:
skip-tags: runtime_pkg
inventory:

View File

@@ -6,8 +6,8 @@ FROM {{ item.registry.url }}/{{ item.image }}
FROM {{ item.image }}
{% endif %}
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash && dnf clean all; \
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python3 sudo bash ca-certificates file && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python3.11 sudo python3.11-devel python*-dnf bash && dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \

View File

@@ -1,19 +1,21 @@
---
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
platform: linux/amd64
- name: ubuntu_lts
image: ubuntu:bionic
image: ubuntu:jammy
groups:
- aws_node_local
platform: linux/amd64
provisioner:
name: ansible
env:
ANSIBLE_COLLECTIONS_PATH: "../../../../"
options:
skip-tags: runtime_pkg
inventory:

View File

@@ -6,8 +6,8 @@ FROM {{ item.registry.url }}/{{ item.image }}
FROM {{ item.image }}
{% endif %}
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash && dnf clean all; \
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python3 sudo bash ca-certificates file && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python3.11 sudo python3.11-devel python*-dnf bash && dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \

View File

@@ -1,19 +1,21 @@
---
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
platform: linux/amd64
- name: ubuntu_lts
image: ubuntu:bionic
image: ubuntu:jammy
groups:
- aws_node_local
platform: linux/amd64
provisioner:
name: ansible
env:
ANSIBLE_COLLECTIONS_PATH: "../../../../"
options:
skip-tags: runtime_pkg
inventory:

View File

@@ -6,8 +6,8 @@ FROM {{ item.registry.url }}/{{ item.image }}
FROM {{ item.image }}
{% endif %}
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash && dnf clean all; \
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python3 sudo bash ca-certificates file && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python3.11 sudo python3.11-devel python*-dnf bash && dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \

View File

@@ -1,19 +1,21 @@
---
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
platform: linux/amd64
- name: ubuntu_lts
image: ubuntu:bionic
image: ubuntu:jammy
groups:
- aws_node_local
platform: linux/amd64
provisioner:
name: ansible
env:
ANSIBLE_COLLECTIONS_PATH: "../../../../"
options:
vv: true
skip-tags: runtime_pkg

View File

@@ -6,8 +6,8 @@ FROM {{ item.registry.url }}/{{ item.image }}
FROM {{ item.image }}
{% endif %}
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash && dnf clean all; \
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python3 sudo bash ca-certificates file && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python3.11 sudo python3.11-devel python*-dnf bash && dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \

View File

@@ -1,19 +1,21 @@
---
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
platform: linux/amd64
- name: ubuntu_lts
image: ubuntu:bionic
image: ubuntu:jammy
groups:
- aws_node_local
platform: linux/amd64
provisioner:
name: ansible
env:
ANSIBLE_COLLECTIONS_PATH: "../../../../"
options:
vv: true
skip-tags: runtime_pkg

View File

@@ -6,8 +6,8 @@ FROM {{ item.registry.url }}/{{ item.image }}
FROM {{ item.image }}
{% endif %}
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python sudo python-devel python*-dnf bash && dnf clean all; \
RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python3 sudo bash ca-certificates file && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install python3.11 sudo python3.11-devel python*-dnf bash && dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl bash && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml && zypper clean -a; \
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \

View File

@@ -1,19 +1,21 @@
---
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: amazon_linux2
image: amazonlinux:2
- name: amazon_linux2023
image: amazonlinux:2023
groups:
- aws_node_local
platform: linux/amd64
- name: ubuntu_lts
image: ubuntu:bionic
image: ubuntu:jammy
groups:
- aws_node_local
platform: linux/amd64
provisioner:
name: ansible
env:
ANSIBLE_COLLECTIONS_PATH: "../../../../"
options:
vv: true
skip-tags: runtime_pkg

View File

@@ -1 +0,0 @@
no_op.yml

View File

@@ -0,0 +1,17 @@
---
- name: Create the product local home directory
ansible.builtin.file:
path: "{{ atl_product_home }}"
state: directory
owner: "{{ atl_product_user }}"
group: "{{ atl_product_user }}"
mode: "0754"
changed_when: false # For Molecule idempotence check
- name: Symlink the the shared home
ansible.builtin.file:
src: "{{ atl_shared_mountpoint }}/{{ atl_product_edition }}/shared"
dest: "{{ atl_product_home }}/shared"
state: link
force: true
when: not skip_shared_home_symlink | bool

View File

@@ -1,9 +1,9 @@
---
- name: Fetch the latest version from URL
set_fact:
ansible.builtin.set_fact:
atl_product_version_json: "{{ lookup('url', 'https://marketplace.atlassian.com/rest/2/products/key/jira-software/versions') }}"
- name: Set the local var to retrieved version
set_fact:
ansible.builtin.set_fact:
atl_latest_version: "{{ atl_product_version_json._embedded.versions[0].name }}"

View File

@@ -1,7 +1,7 @@
---
- name: Check for alternate obr download url
set_fact:
ansible.builtin.set_fact:
atl_source_obr_from_marketplace: false
when:
- atl_obr_download_url is defined
@@ -10,40 +10,40 @@
block:
- name: Marketplace OBR - Get the installer product version info
uri:
ansible.builtin.uri:
url: "{{ atl_mpac_products }}/key/jira/versions/name/{{ atl_product_version }}"
return_content: yes
register: atl_product_version_info
- name: Marketplace OBR - Show the returned build number
debug:
ansible.builtin.debug:
msg="buildNumber={{ atl_product_version_info.json.buildNumber }}"
- name: Marketplace OBR - Get the JSD build version info
uri:
ansible.builtin.uri:
url: "{{ atl_mpac_products }}/key/jira-servicedesk/versions/latest?application=\
jira&applicationBuild={{ atl_product_version_info.json.buildNumber }}"
return_content: yes
register: atl_jsd_build_info
- name: Marketplace OBR - Show the returned obr binary href
debug:
ansible.builtin.debug:
msg="obr_ref={{ atl_jsd_build_info.json._embedded.artifact._links.binary.href }}"
- name: Marketplace OBR - Set atl_obr_download_url
set_fact:
ansible.builtin.set_fact:
atl_obr_download_url: "{{ atl_jsd_build_info.json._embedded.artifact._links.binary.href }}"
- name: Marketplace OBR - Set atl_jsd_build
set_fact:
ansible.builtin.set_fact:
atl_jsd_build: "{{ atl_jsd_build_info.json.name }}"
- name: Marketplace OBR - Show the obr filename
debug:
ansible.builtin.debug:
msg="obr_name=jira-servicedesk-application-{{ atl_jsd_build }}.obr"
- name: Marketplace OBR - Set the obr filename
set_fact:
ansible.builtin.set_fact:
atl_obr_filename: "jira-servicedesk-application-{{ atl_jsd_build }}.obr"
when:
@@ -56,18 +56,18 @@
block:
- name: Alternate URL OBR - Show the obr filename
debug:
ansible.builtin.debug:
msg="obr_name=jira-servicedesk-application-{{ atl_jsd_build }}.obr"
- name: Alternate OBR - Set the obr filename
set_fact:
ansible.builtin.set_fact:
atl_obr_filename: "jira-servicedesk-application-{{ atl_jsd_build }}.obr"
when:
- not atl_source_obr_from_marketplace | bool
- name: is shared_home set ?
debug:
ansible.builtin.debug:
msg="atl_product_home_shared_download_dir={{ atl_product_home_shared_download_dir }}"
# For the first run a temp obr should be downloaded but moved to
@@ -77,7 +77,7 @@
# a directory is used as a lockfile (atomic operation) when moving obr.
- name: Set assumptions to avoid race condition
set_fact:
ansible.builtin.set_fact:
download_obr: true
move_obr: false
atl_obr_download: "{{ atl_installer_temp }}/{{ atl_obr_filename }}"
@@ -87,22 +87,22 @@
# Check for pre-downloaded obr on shared_home and completed lock dir.
- name: Check for completed lock directory
stat:
ansible.builtin.stat:
path: "{{ atl_obr_completed_lock }}"
register: completed_lock
- name: Check for obr in home_shared
stat:
ansible.builtin.stat:
path: "{{ atl_obr_shared_download }}"
register: home_shared_download
- name: debug home_shared_download
debug:
ansible.builtin.debug:
var: home_shared_download
# If obr exists and lockdir exists use this obr instead
- name: Check lock directory and obr exists on shared_home
set_fact:
ansible.builtin.set_fact:
download_obr: false
atl_obr_download: "{{ atl_obr_shared_download }}"
when:
@@ -114,14 +114,14 @@
# Fetch obr if required - note we validate it by mimetype rather than checksum due to https://ecosystem.atlassian.net/browse/AMKT-25526
- name: download_obr is true so fetch and do all the things
block:
- debug:
- ansible.builtin.debug:
var: atl_obr_download_url
- debug:
- ansible.builtin.debug:
var: atl_obr_download
# Fetch obr and copy to temp
- name: Fetch obr
get_url:
ansible.builtin.get_url:
url: "{{ atl_obr_download_url }}"
dest: "{{ atl_obr_download }}"
mode: 0755
@@ -130,12 +130,12 @@
register: atl_obr_completed
- name: Confirm the output from the download task
debug:
ansible.builtin.debug:
var: atl_obr_completed
# get details about the obr
- name: Stat the new obr file
stat:
ansible.builtin.stat:
path: "{{ atl_obr_completed.dest }}"
get_mime: yes
register: atl_obr_stats
@@ -143,14 +143,14 @@
- atl_obr_completed.dest is defined
- name: fail if the downloaded OBR is not a zip file
fail:
ansible.builtin.fail:
msg: "The downloaded OBR was not detected as being a valid ZIP file: {{ atl_obr_stats }}"
when:
- (atl_obr_stats.stat.mimetype is not defined) or (atl_obr_stats.stat.mimetype is not match("application/zip"))
# If obr was fetched make the lock directory
- name: Create moving_lock.
file:
ansible.builtin.file:
path: "{{ atl_obr_moving_lock }}"
state: directory
when:
@@ -160,7 +160,7 @@
# Directory lock was created by this run?
# If so, then set a fact intending to move obr
- name: Move obr Scenario - lock created by this run
set_fact:
ansible.builtin.set_fact:
move_obr: true
when:
- moving_lock_created is succeeded
@@ -168,28 +168,28 @@
# Otherwise directory lock was either already created or
# could not be created. Fall back is to continue and install from temp
when: download_obr
when: download_obr | bool
# If the intention is to move obr to home_shared
- name: Move obr to home_shared
block:
- name: Copy temp installer to home_shared
copy:
ansible.builtin.copy:
src: "{{ atl_obr_download }}"
dest: "{{ atl_obr_shared_download }}"
remote_src: true
register: copied
- name: Create completed_lock once obr downloaded and copied
file:
ansible.builtin.file:
path: "{{ atl_obr_completed_lock }}"
state: directory
when: copied is succeeded
register: completed_lock_created
- name: Remove moving_lock to show that obr is completed
file:
ansible.builtin.file:
path: "{{ atl_obr_moving_lock }}"
state: absent
when:
@@ -198,24 +198,24 @@
register: moving_lock_removed
- name: Delete old temp installer
file:
ansible.builtin.file:
path: "{{ atl_obr_download }}"
state: absent
when: moving_lock_removed is succeeded
register: temp_deleted
- name: Set install to home_shared location
set_fact:
ansible.builtin.set_fact:
atl_obr_download: "{{ atl_obr_shared_download }}"
when: temp_deleted is succeeded
when: move_obr
when: move_obr | bool
# At this point the binary is in {{ atl_obr_download }}
# (which is either on home_shared or temp)
- name: Ensure instaled-plugins dir exists
file:
ansible.builtin.file:
path: "{{ atl_product_home_shared }}/plugins/installed-plugins"
state: directory
mode: 0750
@@ -224,7 +224,7 @@
# Note as ansible unarchive cant handle "-j junk paths" we need to ignore errors to bypass the path verify
- name: Unpack the obr into the atlassian-bundled-plugins dir
unarchive:
ansible.builtin.unarchive:
remote_src: yes
src: "{{ atl_obr_download }}"
dest: "{{ atl_product_installation_versioned }}/atlassian-jira/WEB-INF/atlassian-bundled-plugins"
@@ -238,15 +238,15 @@
mode: 0644
register: obr_unpack
- name: Move JSD dependency jars into the bundled-plugins dir # noqa 503 - ignore lint info about when changed
copy:
- name: Move JSD dependency jars into the bundled-plugins dir # noqa no-handler - ignore lint info about when changed
ansible.builtin.copy:
remote_src: yes
src: "{{ atl_product_installation_versioned }}/atlassian-jira/WEB-INF/atlassian-bundled-plugins/dependencies/"
dest: "{{ atl_product_installation_versioned }}/atlassian-jira/WEB-INF/atlassian-bundled-plugins/"
when: obr_unpack.changed
- name: Remove the empty dependencies folder # noqa 503 - ignore lint info about when changed
file:
- name: Remove the empty dependencies folder # noqa no-handler - ignore lint info about when changed
ansible.builtin.file:
path: "{{ atl_product_installation_versioned }}/atlassian-jira/WEB-INF/atlassian-bundled-plugins/dependencies"
state: absent
when: obr_unpack.changed

View File

@@ -1,5 +1,5 @@
---
- name: Set the download edition for ServiceDesk
set_fact:
ansible.builtin.set_fact:
atl_download_edition: "servicedesk"

View File

@@ -1,9 +1,9 @@
---
- name: Fetch the latest version from URL
set_fact:
ansible.builtin.set_fact:
atl_product_version_json: "{{ lookup('url', 'https://marketplace.atlassian.com/rest/2/products/key/jira-servicedesk/versions') }}"
- name: Set the local var to retrieved version
set_fact:
ansible.builtin.set_fact:
atl_latest_version: "{{ atl_product_version_json._embedded.versions[0].name }}"

View File

@@ -1,9 +1,9 @@
---
- name: Fetch the latest version from URL
set_fact:
ansible.builtin.set_fact:
atl_product_version_json: "{{ lookup('url', 'https://marketplace.atlassian.com/rest/2/products/key/jira-software/versions') }}"
- name: Set the local var to retrieved version
set_fact:
ansible.builtin.set_fact:
atl_latest_version: "{{ atl_product_version_json._embedded.versions[0].name }}"

View File

@@ -1,8 +1,6 @@
---
- name: Check for existing version cache file
stat:
ansible.builtin.stat:
path: "{{ atl_product_version_cache }}"
register: cached
@@ -11,19 +9,19 @@
block:
- name: Read cached version from file
command: "cat {{ atl_product_version_cache }}"
ansible.builtin.command: "cat {{ atl_product_version_cache }}"
register: atl_product_version_file
changed_when: false
- name: Set the local var to cached version
set_fact:
ansible.builtin.set_fact:
atl_cached_version: "{{ atl_product_version_file.stdout }}"
when: cached.stat.exists
- name: Determine if requested version is 'latest'
set_fact:
ansible.builtin.set_fact:
version_is_latest: "{{ atl_product_version is undefined or
not atl_product_version or
atl_product_version == 'latest' }}"
@@ -33,9 +31,9 @@
block:
- name: Fetch the latest edition version
include_tasks: "{{ atl_product_edition }}_version_latest.yml"
ansible.builtin.include_tasks: "{{ atl_product_edition }}_version_latest.yml"
when: not cached.stat.exists and version_is_latest
when: not cached.stat.exists and version_is_latest | bool
######################################################################
@@ -63,64 +61,63 @@
block:
- name: "Case: Cached version exists, has precedence over 'latest'"
set_fact:
ansible.builtin.set_fact:
atl_download_version: "{{ atl_cached_version }}"
when: cached.stat.exists
- name: "Case: No cached version, use latest"
set_fact:
ansible.builtin.set_fact:
atl_download_version: "{{ atl_latest_version }}"
when: not cached.stat.exists
when: version_is_latest
when: version_is_latest | bool
- name: "Case: Version is not latest"
block:
- name: "create atlassian z versioning for comparison"
set_fact:
ansible.builtin.set_fact:
atl_z_product_version: "{{ atl_product_version ~ '-z' }}"
atl_z_cached_version: "{{ atl_cached_version ~ '-z' }}"
- name: "create atlassian ordered versioning for comparison"
set_fact:
ansible.builtin.set_fact:
atl_product_normalised_version: "{{ atl_z_product_version | replace('-m', '-am') }}"
atl_cached_normalised_version: "{{ atl_z_cached_version | replace('-m', '-am') }}"
- name: "Case: No cached version, or supplied is higher; use supplied"
set_fact:
ansible.builtin.set_fact:
atl_download_version: "{{ atl_product_version }}"
when: force_version_update | bool or
not cached.stat.exists or
atl_product_normalised_version is version(atl_cached_normalised_version, '>')
- name: "Case: Cached version is higher or forced, ignore supplied"
set_fact:
ansible.builtin.set_fact:
atl_download_version: "{{ atl_cached_version }}"
when: cached.stat.exists and
atl_product_normalised_version is version(atl_cached_normalised_version, '<=') and
not force_version_update | bool
when: not version_is_latest
when: not version_is_latest | bool
- name: "Fallthrough guard: Use cached or supplied version if nothing set"
set_fact:
ansible.builtin.set_fact:
atl_download_version: "{{ atl_cached_version or atl_product_version }}"
when: atl_download_version is not defined or
atl_download_version|length == 0
atl_download_version | length == 0
- name: Override the supplied version with the calculated one
set_fact:
ansible.builtin.set_fact:
atl_product_version: "{{ atl_download_version }}"
######################################################################
- name: Perform any additional per-edition version setup
include_tasks: "{{ atl_product_edition }}_extra_tasks.yml"
ansible.builtin.include_tasks: "{{ atl_product_edition }}_extra_tasks.yml"
- name: Create installation directories
file:
ansible.builtin.file:
path: "{{ item }}"
state: directory
mode: 0750
@@ -136,9 +133,12 @@
# At this point atl_product_version should be set, cache if necessary.
- name: Write override cached version when specified
template:
ansible.builtin.template:
src: version.j2
dest: "{{ atl_product_version_cache }}"
owner: "root"
group: "root"
mode: "u=rwX,g=rX,o=rX"
force: true
# For the first run a temp binary should be downloaded but moved to
@@ -148,25 +148,25 @@
# a directory is used as a lockfile (atomic operation) when moving binary.
- name: Set assumptions to avoid race condition
set_fact:
ansible.builtin.set_fact:
download_binary: true
move_binary: false
atl_product_download: "{{ atl_product_temp_download }}"
# Check for pre-downloaded binary on shared_home and completed lock dir.
- name: Check for completed lock directory
stat:
ansible.builtin.stat:
path: "{{ atl_product_home_shared_completed_lock }}"
register: completed_lock
- name: Check for product installer in home_shared
stat:
ansible.builtin.stat:
path: "{{ atl_product_home_shared_download }}"
register: home_shared_download
# If binary exists and lockdir exists use this binary instead
- name: Check lock directory and binary exists on shared_home
set_fact:
ansible.builtin.set_fact:
download_binary: false
atl_product_download: "{{ atl_product_home_shared_download }}"
when:
@@ -178,11 +178,28 @@
- name: download_binary is true so fetch and do all the things
block:
# Fetch binary and copy to temp
# optionally grab basic_auth creds from secrets_manager secret called 'download_atlassian'
- name: set basic_auth facts if the secret exists
ansible.builtin.set_fact:
download_atlassian_password: "{{ lookup('amazon.aws.secretsmanager_secret', atl_download_secret_name + '.password', region=ansible_ec2_placement_region, bypath=false, nested=true, on_denied='skip', on_missing='skip') }}"
download_atlassian_username: "{{ lookup('amazon.aws.secretsmanager_secret', atl_download_secret_name + '.username', region=ansible_ec2_placement_region, bypath=false, nested=true, on_denied='skip', on_missing='skip') }}"
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
get_url:
ansible.builtin.get_url:
url: "{{ atl_product_download_url }}"
dest: "{{ atl_product_temp_download }}"
url_password: "{{ download_atlassian_password | default(omit) }}"
url_username: "{{ download_atlassian_username | default(omit) }}"
mode: 0755
force: false
http_agent: "ansible-httpget_{{ ansible_play_name }}"
@@ -190,7 +207,7 @@
# If product installer was fetched make the lock directory
- name: Create moving_lock.
file:
ansible.builtin.file:
path: "{{ atl_product_home_shared_moving_lock }}"
state: directory
when:
@@ -200,7 +217,7 @@
# Directory lock was created by this run?
# If so, then set a fact intending to move binary
- name: Move binary Scenario - lock created by this run
set_fact:
ansible.builtin.set_fact:
move_binary: true
when:
- moving_lock_created is succeeded
@@ -208,14 +225,14 @@
# Otherwise directory lock was either already created or
# could not be created. Fall back is to continue and install from temp
when: download_binary
when: download_binary | bool
# If the intention is to move binary to home_shared
- name: Move product installer to home_shared
block:
- name: Copy temp installer to home_shared
copy:
ansible.builtin.copy:
src: "{{ atl_product_temp_download }}"
dest: "{{ atl_product_home_shared_download }}"
remote_src: true
@@ -225,14 +242,14 @@
register: copied
- name: Create completed_lock once product installer downloaded and copied
file:
ansible.builtin.file:
path: "{{ atl_product_home_shared_completed_lock }}"
state: directory
when: copied is succeeded
register: completed_lock_created
- name: Remove moving_lock to show that binary is completed
file:
ansible.builtin.file:
path: "{{ atl_product_home_shared_moving_lock }}"
state: absent
when:
@@ -241,33 +258,33 @@
register: moving_lock_removed
- name: Delete old temp installer
file:
ansible.builtin.file:
path: "{{ atl_product_temp_download }}"
state: absent
when: moving_lock_removed is succeeded
register: temp_deleted
- name: Set install to home_shared location
set_fact:
ansible.builtin.set_fact:
atl_product_download: "{{ atl_product_home_shared_download }}"
when: temp_deleted is succeeded
when: move_binary
when: move_binary | bool
# At this point the binary is in {{ atl_product_download }}
# (which is either on home_shared or temp)
- name: Unpack the downloaded application depending on format
include_tasks: "unpack_{{ atl_download_format }}.yml"
ansible.builtin.include_tasks: "unpack_{{ atl_download_format }}.yml"
- name: Symlink the installed version to current
file:
ansible.builtin.file:
src: "{{ atl_product_installation_versioned }}"
dest: "{{ atl_product_installation_current }}"
state: link
force: true
- name: "Ensure catalina.out log dir exists after product is installed (except bitbucket)"
file:
ansible.builtin.file:
path: "{{ atl_product_installation_current }}/logs"
state: directory
mode: 0750
@@ -277,5 +294,5 @@
changed_when: false # For Molecule idempotence check
- name: Include if jsd is requested to be installed from OBR
include_tasks: "jira-servicedesk_as_obr.yml"
when: atl_install_jsd_as_obr
ansible.builtin.include_tasks: "jira-servicedesk_as_obr.yml"
when: atl_install_jsd_as_obr | bool

View File

@@ -5,9 +5,9 @@
# product that supports the standard marketplace API.
- name: Fetch the latest version from URL
set_fact:
ansible.builtin.set_fact:
atl_product_version_json: "{{ lookup('url', '{{ atl_product_latest_version_url }}') }}"
- name: Set the local var to retrieved version
set_fact:
ansible.builtin.set_fact:
atl_latest_version: "{{ atl_product_version_json._embedded.versions[0].name }}"

View File

@@ -1,7 +1,7 @@
---
- name: Create installer varfile
template:
ansible.builtin.template:
src: "{{ atl_product_family }}.varfile.j2"
dest: "{{ atl_product_varfile }}"
mode: 0755
@@ -13,7 +13,7 @@
# The variable {{ atl_product_download }} will be on temp for first nodes and shared_home for
# subsequent nodes.
- name: Run the installer
command: /bin/sh "{{ atl_product_download }}" -q -varfile "{{ atl_product_varfile }}"
ansible.builtin.command: /bin/sh "{{ atl_product_download }}" -q -varfile "{{ atl_product_varfile }}"
args:
creates: "{{ atl_product_installation_versioned }}/.install4j/"
become: true

View File

@@ -1,7 +1,7 @@
---
- name: Unpack the product packages
unarchive:
ansible.builtin.unarchive:
remote_src: true
src: "{{ atl_product_download }}"
dest: "{{ atl_product_installation_versioned }}"