From 45c2d01b1778304b5b85119a850819d38e123883 Mon Sep 17 00:00:00 2001 From: Lee Goolsbee Date: Fri, 7 Aug 2020 13:57:08 -0500 Subject: [PATCH 01/14] DCD-1037 use AdoptOpenJDK from official repos --- group_vars/aws_node_local.yml | 3 +- roles/confluence_config/defaults/main.yml | 2 -- roles/crowd_config/tasks/main.yml | 2 +- roles/product_common/tasks/amazon.yml | 24 ++++++++++++--- roles/product_common/tasks/ubuntu.yml | 36 +++++++++++++++-------- 5 files changed, 45 insertions(+), 22 deletions(-) diff --git a/group_vars/aws_node_local.yml b/group_vars/aws_node_local.yml index 4f8cb77..e677015 100644 --- a/group_vars/aws_node_local.yml +++ b/group_vars/aws_node_local.yml @@ -39,8 +39,7 @@ atl_installer_temp: "{{ atl_installation_base }}/tmp" # See product_common/task/ubuntu.yml for an example of apropriate # linking using `alternatives`. atl_java_home: "{{ '/usr/lib/jvm/java' if atl_use_system_jdk else (atl_product_installation_current + '/jre') }}" -atl_jre_home: "{{ '/usr/lib/jvm/jre' if atl_use_system_jdk else atl_java_home }}" -atl_java_binary: "{{ atl_jre_home }}/bin/java" +atl_java_binary: "{{ atl_java_home }}/bin/java" atl_product_logs_default: &logs_default - path: "{{ atl_product_installation_current }}/logs/*" diff --git a/roles/confluence_config/defaults/main.yml b/roles/confluence_config/defaults/main.yml index 4bd4d10..e71288d 100644 --- a/roles/confluence_config/defaults/main.yml +++ b/roles/confluence_config/defaults/main.yml @@ -3,8 +3,6 @@ atl_jvm_heap: "2048m" atl_fonts_fallback_dirs: - "{{ atl_java_home }}/lib/fonts/fallback/" - - "{{ atl_jre_home }}/lib/fonts/fallback/" - atl_autologin_cookie_age: "{{ lookup('env', 'ATL_AUTOLOGIN_COOKIE_AGE') }}" diff --git a/roles/crowd_config/tasks/main.yml b/roles/crowd_config/tasks/main.yml index e3b7c72..87aea58 100644 --- a/roles/crowd_config/tasks/main.yml +++ b/roles/crowd_config/tasks/main.yml @@ -148,7 +148,7 @@ xpath: "/application-configuration/properties/property[@name='hibernate.connection.url']" value: "{{ atl_jdbc_url }}?reWriteBatchedInserts=true" when: crowd_cfg_stat_result.stat.exists - + - name: Remove crowd.xml to prevent duplicates from appearing in cluster reporting file: path: "{{ atl_product_installation_versioned }}/apache-tomcat/conf/Catalina/localhost/crowd.xml" diff --git a/roles/product_common/tasks/amazon.yml b/roles/product_common/tasks/amazon.yml index 4d33f79..c6c836a 100644 --- a/roles/product_common/tasks/amazon.yml +++ b/roles/product_common/tasks/amazon.yml @@ -1,10 +1,26 @@ --- -- name: Install JDK if necessary on Amazon Linux - yum: - name: - - java-1.{{ java_major_version }}.0-openjdk-devel +- name: Add AdoptOpenJDK repo and install if necessary on Amazon Linux + block: + + - name: Add AdoptOpenJDK yum repository + yum_repository: + name: AdoptOpenJDK + file: adoptopenjdk + description: AdoptOpenJDK Repo + baseurl: "https://adoptopenjdk.jfrog.io/adoptopenjdk/rpm/amazonlinux/{{ ansible_distribution_version }}/{{ ansible_architecture }}/" + gpgkey: https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public + gpgcheck: yes + state: present + + - name: Install AdoptOpenJDK + yum: + name: "adoptopenjdk-{{ java_major_version }}-hotspot" + state: present + when: atl_use_system_jdk + tags: + - runtime_pkg - name: Install other base packages on Amazon Linux yum: diff --git a/roles/product_common/tasks/ubuntu.yml b/roles/product_common/tasks/ubuntu.yml index 0b033c5..ad2c0dd 100644 --- a/roles/product_common/tasks/ubuntu.yml +++ b/roles/product_common/tasks/ubuntu.yml @@ -1,25 +1,35 @@ --- -- name: Install JDK if necessary on Ubuntu +- name: Add AdoptOpenJDK repo and install if necessary on Ubuntu block: - - name: Install JDK package - package: - name: - - openjdk-{{ java_major_version }}-jdk-headless + - name: Install gnupg + apt: + name: gnupg + state: present + + - name: Add AdoptOpenJDK debian repo public key + apt_key: + url: https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public + state: present + + - name: Add AdoptOpenJDK debian repository + apt_repository: + repo: "deb https://adoptopenjdk.jfrog.io/adoptopenjdk/deb {{ ansible_distribution_release }} main" + state: present + filename: adoptopenjdk + + - name: Install AdoptOpenJDK + apt: + name: "adoptopenjdk-{{ java_major_version }}-hotspot" + update_cache: yes + state: present - name: Ensure common JDK symlink exists alternatives: link: "/usr/lib/jvm/java" name: "java_sdk" - path: "/usr/lib/jvm/java-8-openjdk-amd64" - priority: 99 - - - name: Ensure common JRE symlink exists - alternatives: - link: "/usr/lib/jvm/jre" - name: "jre" - path: "/usr/lib/jvm/java-8-openjdk-amd64/jre" + path: "/usr/lib/jvm/adoptopenjdk-{{ java_major_version }}-hotspot" priority: 99 when: atl_use_system_jdk From 529df0cafd9c9f912d340c1c2f0f6c47222069a6 Mon Sep 17 00:00:00 2001 From: Lee Goolsbee Date: Wed, 26 Aug 2020 16:34:48 -0500 Subject: [PATCH 02/14] fix tests --- roles/confluence_config/defaults/main.yml | 2 +- .../molecule/default/tests/test_default.py | 3 +-- .../molecule/system_jdk/tests/test_default.py | 3 +-- roles/confluence_config/tasks/main.yml | 1 - .../molecule/system_jdk/tests/test_default.py | 3 +-- roles/product_common/tasks/ubuntu.yml | 17 ++++++++++++++++- 6 files changed, 20 insertions(+), 9 deletions(-) diff --git a/roles/confluence_config/defaults/main.yml b/roles/confluence_config/defaults/main.yml index e71288d..d39d683 100644 --- a/roles/confluence_config/defaults/main.yml +++ b/roles/confluence_config/defaults/main.yml @@ -2,7 +2,7 @@ atl_jvm_heap: "2048m" atl_fonts_fallback_dirs: - - "{{ atl_java_home }}/lib/fonts/fallback/" + - "{{ atl_java_home }}/lib/fonts/fallback/" atl_autologin_cookie_age: "{{ lookup('env', 'ATL_AUTOLOGIN_COOKIE_AGE') }}" diff --git a/roles/confluence_config/molecule/default/tests/test_default.py b/roles/confluence_config/molecule/default/tests/test_default.py index d3ff80e..337240b 100644 --- a/roles/confluence_config/molecule/default/tests/test_default.py +++ b/roles/confluence_config/molecule/default/tests/test_default.py @@ -81,8 +81,7 @@ def test_confluence_config_file(host): assert f.contains('select 1;') @pytest.mark.parametrize('font', [ -# '/usr/lib/jvm/java/lib/fonts/fallback/NotoSansJavanese-Regular.ttf', -# '/usr/lib/jvm/jre/lib/fonts/fallback/NotoSansJavanese-Regular.ttf' +# '/usr/lib/jvm/java/lib/fonts/fallback/NotoSansJavanese-Regular.ttf' '/opt/atlassian/confluence/current/jre/lib/fonts/fallback/NotoSansJavanese-Regular.ttf' ]) def test_fonts_installed_and_linked(host, font): diff --git a/roles/confluence_config/molecule/system_jdk/tests/test_default.py b/roles/confluence_config/molecule/system_jdk/tests/test_default.py index 7cb395e..600b059 100644 --- a/roles/confluence_config/molecule/system_jdk/tests/test_default.py +++ b/roles/confluence_config/molecule/system_jdk/tests/test_default.py @@ -12,8 +12,7 @@ def test_seraph_file(host): assert f.contains('COOKIEAGE') @pytest.mark.parametrize('font', [ - '/usr/lib/jvm/java/lib/fonts/fallback/NotoSansJavanese-Regular.ttf', - '/usr/lib/jvm/jre/lib/fonts/fallback/NotoSansJavanese-Regular.ttf' + '/usr/lib/jvm/java/lib/fonts/fallback/NotoSansJavanese-Regular.ttf' ]) def test_fonts_installed_and_linked(host, font): f = host.file(font) diff --git a/roles/confluence_config/tasks/main.yml b/roles/confluence_config/tasks/main.yml index 07b202c..ea807bb 100644 --- a/roles/confluence_config/tasks/main.yml +++ b/roles/confluence_config/tasks/main.yml @@ -52,7 +52,6 @@ insertafter: "EOF" line: 'export CATALINA_OPTS="${CATALINA_OPTS} {{ atl_catalina_opts }} {{ atl_catalina_opts_extra }}"' - - name: Configure login properties template: src: seraph-config.xml.j2 diff --git a/roles/product_common/molecule/system_jdk/tests/test_default.py b/roles/product_common/molecule/system_jdk/tests/test_default.py index e615c9f..39a5436 100644 --- a/roles/product_common/molecule/system_jdk/tests/test_default.py +++ b/roles/product_common/molecule/system_jdk/tests/test_default.py @@ -15,8 +15,7 @@ def test_user_created(host): @pytest.mark.parametrize('exe', [ '/usr/bin/git', '/usr/bin/javac', - '/usr/lib/jvm/java/bin/java', - '/usr/lib/jvm/java/jre/bin/java' + '/usr/lib/jvm/java/bin/java' ]) def test_package_exes(host, exe): assert host.file(exe).exists diff --git a/roles/product_common/tasks/ubuntu.yml b/roles/product_common/tasks/ubuntu.yml index ad2c0dd..dfd8331 100644 --- a/roles/product_common/tasks/ubuntu.yml +++ b/roles/product_common/tasks/ubuntu.yml @@ -3,6 +3,21 @@ - name: Add AdoptOpenJDK repo and install if necessary on Ubuntu block: + - name: Create translation matrix for ansible_architecture values to Ubuntu/Debian nomenclature + set_fact: + debian_architecture_translations: + x86_64: amd64 + aarch64: arm64 + + - name: Set debian_architecture based on ansible_architecture + set_fact: + debian_architecture: >- + {%- if ansible_architecture in debian_architecture_translations -%} + {{ debian_architecture_translations[ansible_architecture] }} + {%- else -%} + {{ ansible_architecture }} + {%- endif %} + - name: Install gnupg apt: name: gnupg @@ -29,7 +44,7 @@ alternatives: link: "/usr/lib/jvm/java" name: "java_sdk" - path: "/usr/lib/jvm/adoptopenjdk-{{ java_major_version }}-hotspot" + path: "/usr/lib/jvm/adoptopenjdk-{{ java_major_version }}-hotspot-{{ debian_architecture }}" priority: 99 when: atl_use_system_jdk From e0b76696c4a524d8df238f8ce5a0178cb7528b7b Mon Sep 17 00:00:00 2001 From: Lee Goolsbee Date: Thu, 27 Aug 2020 12:27:41 -0500 Subject: [PATCH 03/14] azl2 also needs this symlink --- roles/product_common/tasks/amazon.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/roles/product_common/tasks/amazon.yml b/roles/product_common/tasks/amazon.yml index c6c836a..fad01a6 100644 --- a/roles/product_common/tasks/amazon.yml +++ b/roles/product_common/tasks/amazon.yml @@ -18,6 +18,13 @@ name: "adoptopenjdk-{{ java_major_version }}-hotspot" state: present + - name: Ensure common JDK symlink exists + alternatives: + link: "/usr/lib/jvm/java" + name: "java_sdk" + path: "/usr/lib/jvm/adoptopenjdk-{{ java_major_version }}-hotspot" + priority: 99 + when: atl_use_system_jdk tags: - runtime_pkg From 657efb77ab02e6efc5b3a5d0c48e158b4522f45c Mon Sep 17 00:00:00 2001 From: Steve Smith Date: Fri, 28 Aug 2020 13:07:56 +1000 Subject: [PATCH 04/14] DCD-1089: The systemd installation location depends on the OS. --- roles/product_startup/defaults/main.yml | 5 +++++ roles/product_startup/molecule/bitbucket/playbook.yml | 5 ++++- .../product_startup/molecule/bitbucket/tests/test_default.py | 3 ++- roles/product_startup/molecule/default/playbook.yml | 5 ++++- roles/product_startup/molecule/default/tests/test_default.py | 3 ++- roles/product_startup/molecule/synchrony/playbook.yml | 5 ++++- .../product_startup/molecule/synchrony/tests/test_default.py | 3 ++- roles/product_startup/tasks/main.yml | 2 +- 8 files changed, 24 insertions(+), 7 deletions(-) diff --git a/roles/product_startup/defaults/main.yml b/roles/product_startup/defaults/main.yml index 45d6f8a..70b7708 100644 --- a/roles/product_startup/defaults/main.yml +++ b/roles/product_startup/defaults/main.yml @@ -14,6 +14,11 @@ atl_startup_exec_path: "{{ atl_product_installation_current }}/{{ atl_startup_sc atl_startup_exec_options: ["-fg"] atl_startup_systemd_params: [] +atl_systemd_service_dir_map: + amazon: "/usr/lib/systemd/system" + ubuntu: "/lib/systemd/system" +atl_systemd_service_dir: "{{ atl_systemd_service_dir_map[ansible_distribution|lower] }}" + atl_systemd_service_name: "{{ atl_product_edition }}.service" atl_systemd_service_target: "multi-user.target" diff --git a/roles/product_startup/molecule/bitbucket/playbook.yml b/roles/product_startup/molecule/bitbucket/playbook.yml index bc50920..dffb8ea 100644 --- a/roles/product_startup/molecule/bitbucket/playbook.yml +++ b/roles/product_startup/molecule/bitbucket/playbook.yml @@ -29,8 +29,11 @@ pre_tasks: - name: Create systemd dir if necessary file: - path: '/usr/lib/systemd/system/' + path: "{{ item }}" state: directory + with_items: + - '/usr/lib/systemd/system/' + - '/lib/systemd/system/' roles: - role: product_startup diff --git a/roles/product_startup/molecule/bitbucket/tests/test_default.py b/roles/product_startup/molecule/bitbucket/tests/test_default.py index 8bec4b7..c895f75 100644 --- a/roles/product_startup/molecule/bitbucket/tests/test_default.py +++ b/roles/product_startup/molecule/bitbucket/tests/test_default.py @@ -7,7 +7,8 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( def test_service_file(host): - f = host.file('/usr/lib/systemd/system/bitbucket.service') + systemd_prefix = "/lib" if host.system_info.distribution == "ubuntu" else "/usr/lib" + f = host.file(systemd_prefix+'/systemd/system/bitbucket.service') assert f.contains("^ExecStart=/opt/atlassian/bitbucket/current/bin/start-bitbucket.sh -fg --no-search$") assert f.contains("^UMask=0027$") assert f.contains("^LimitNOFILE=4096$") diff --git a/roles/product_startup/molecule/default/playbook.yml b/roles/product_startup/molecule/default/playbook.yml index 71e2f53..5cff089 100644 --- a/roles/product_startup/molecule/default/playbook.yml +++ b/roles/product_startup/molecule/default/playbook.yml @@ -12,8 +12,11 @@ pre_tasks: - name: Create systemd dir if necessary file: - path: '/usr/lib/systemd/system/' + path: "{{ item }}" state: directory + with_items: + - '/usr/lib/systemd/system/' + - '/lib/systemd/system/' roles: - role: product_startup diff --git a/roles/product_startup/molecule/default/tests/test_default.py b/roles/product_startup/molecule/default/tests/test_default.py index 3ef51d9..d3b1994 100644 --- a/roles/product_startup/molecule/default/tests/test_default.py +++ b/roles/product_startup/molecule/default/tests/test_default.py @@ -7,7 +7,8 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( def test_service_file(host): - f = host.file('/usr/lib/systemd/system/jira-software.service') + systemd_prefix = "/lib" if host.system_info.distribution == "ubuntu" else "/usr/lib" + f = host.file(systemd_prefix+'/systemd/system/jira-software.service') assert f.contains("^ExecStart=/opt/atlassian/jira-software/current/bin/start-jira.sh -fg$") assert f.user == 'root' assert f.group == 'root' diff --git a/roles/product_startup/molecule/synchrony/playbook.yml b/roles/product_startup/molecule/synchrony/playbook.yml index 0ee7b71..b4fa14b 100644 --- a/roles/product_startup/molecule/synchrony/playbook.yml +++ b/roles/product_startup/molecule/synchrony/playbook.yml @@ -20,8 +20,11 @@ pre_tasks: - name: Create systemd dir if necessary file: - path: '/usr/lib/systemd/system/' + path: "{{ item }}" state: directory + with_items: + - '/usr/lib/systemd/system/' + - '/lib/systemd/system/' roles: - role: product_startup diff --git a/roles/product_startup/molecule/synchrony/tests/test_default.py b/roles/product_startup/molecule/synchrony/tests/test_default.py index 5451915..0e748f5 100644 --- a/roles/product_startup/molecule/synchrony/tests/test_default.py +++ b/roles/product_startup/molecule/synchrony/tests/test_default.py @@ -7,7 +7,8 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( def test_service_file(host): - f = host.file('/usr/lib/systemd/system/synchrony.service') + systemd_prefix = "/lib" if host.system_info.distribution == "ubuntu" else "/usr/lib" + f = host.file(systemd_prefix+'/systemd/system/synchrony.service') assert f.contains("^ExecStart=/opt/atlassian/bin/start-synchrony$") assert f.contains("^EnvironmentFile=/etc/atl$") assert f.contains("^EnvironmentFile=/etc/atl.synchrony$") diff --git a/roles/product_startup/tasks/main.yml b/roles/product_startup/tasks/main.yml index c604379..99a40e4 100644 --- a/roles/product_startup/tasks/main.yml +++ b/roles/product_startup/tasks/main.yml @@ -3,7 +3,7 @@ - name: "Install systemd service file" template: src: "product.service.j2" - dest: "/usr/lib/systemd/system/{{ atl_systemd_service_name }}" + dest: "{{ atl_systemd_service_dir }}/{{ atl_systemd_service_name }}" owner: root group: root mode: 0640 From 73a3dea47dd362b0a9884e58bb46ea3475cef49d Mon Sep 17 00:00:00 2001 From: Lee Goolsbee Date: Thu, 10 Sep 2020 12:21:15 -0500 Subject: [PATCH 05/14] remove a few straggling references to linking fonts to the JRE --- group_vars/aws_node_local.yml | 2 +- roles/confluence_config/tasks/amazon_fonts.yml | 4 ++-- roles/confluence_config/tasks/ubuntu_fonts.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/group_vars/aws_node_local.yml b/group_vars/aws_node_local.yml index e677015..9db7661 100644 --- a/group_vars/aws_node_local.yml +++ b/group_vars/aws_node_local.yml @@ -35,7 +35,7 @@ atl_product_installation_current: "{{ atl_product_installation_base }}/current" atl_installer_temp: "{{ atl_installation_base }}/tmp" # NOTE: If using the non-installer java we expect to have the full JDK -# installed and linked to `/usr/lib/jvm/java` and # `/usr/lib/jvm/jre`. +# installed and linked to `/usr/lib/jvm/java`. # See product_common/task/ubuntu.yml for an example of apropriate # linking using `alternatives`. atl_java_home: "{{ '/usr/lib/jvm/java' if atl_use_system_jdk else (atl_product_installation_current + '/jre') }}" diff --git a/roles/confluence_config/tasks/amazon_fonts.yml b/roles/confluence_config/tasks/amazon_fonts.yml index 4fc5302..8fa2bda 100644 --- a/roles/confluence_config/tasks/amazon_fonts.yml +++ b/roles/confluence_config/tasks/amazon_fonts.yml @@ -5,8 +5,8 @@ name: - "google-noto-*" -- name: Link the language fonts into the JDK/JRE - # Not idiomatic, but cleaner that messing with nested lookups... +- name: Link the language fonts into the JDK + # Not idiomatic, but cleaner than messing with nested lookups... shell: cmd: "ln -sf /usr/share/fonts/google-noto*/* {{ item }}/" creates: "{{ item }}/NotoSansJavanese-Regular.ttf" diff --git a/roles/confluence_config/tasks/ubuntu_fonts.yml b/roles/confluence_config/tasks/ubuntu_fonts.yml index 084aa3f..20fcbb1 100644 --- a/roles/confluence_config/tasks/ubuntu_fonts.yml +++ b/roles/confluence_config/tasks/ubuntu_fonts.yml @@ -5,8 +5,8 @@ name: - "fonts-noto" -- name: Link the language fonts into the JDK/JRE - # Not idiomatic, but cleaner that messing with nested lookups... +- name: Link the language fonts into the JDK + # Not idiomatic, but cleaner than messing with nested lookups... shell: cmd: "ln -sf /usr/share/fonts/truetype/noto/* {{ item }}/" creates: "{{ item }}/NotoSansJavanese-Regular.ttf" From cfca6d794cf7f6cd7e67ad551e8a8daef9ffae78 Mon Sep 17 00:00:00 2001 From: Lee Goolsbee Date: Thu, 10 Sep 2020 12:22:16 -0500 Subject: [PATCH 06/14] move debian_architecture and debian_architecture_translations to defaults --- roles/product_common/defaults/main.yml | 8 ++++++++ roles/product_common/tasks/ubuntu.yml | 15 --------------- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/roles/product_common/defaults/main.yml b/roles/product_common/defaults/main.yml index 4e9f728..f8a46fd 100644 --- a/roles/product_common/defaults/main.yml +++ b/roles/product_common/defaults/main.yml @@ -5,3 +5,11 @@ postgres_version: "9.6" # Disable these when using the product installer, otherwise we end up # fighting with it. atl_use_system_jdk: false + +# Ubuntu and Ansible use different architecture nomenclature; provide +# an easy method for translating between them +debian_architecture_translations: + x86_64: amd64 + aarch64: arm64 + +debian_architecture: "{{ debian_architecture_translations[ansible_architecture] | default(ansible_architecture) }}" diff --git a/roles/product_common/tasks/ubuntu.yml b/roles/product_common/tasks/ubuntu.yml index dfd8331..c90b6bc 100644 --- a/roles/product_common/tasks/ubuntu.yml +++ b/roles/product_common/tasks/ubuntu.yml @@ -3,21 +3,6 @@ - name: Add AdoptOpenJDK repo and install if necessary on Ubuntu block: - - name: Create translation matrix for ansible_architecture values to Ubuntu/Debian nomenclature - set_fact: - debian_architecture_translations: - x86_64: amd64 - aarch64: arm64 - - - name: Set debian_architecture based on ansible_architecture - set_fact: - debian_architecture: >- - {%- if ansible_architecture in debian_architecture_translations -%} - {{ debian_architecture_translations[ansible_architecture] }} - {%- else -%} - {{ ansible_architecture }} - {%- endif %} - - name: Install gnupg apt: name: gnupg From 88d326be7337b460f665c5aa26b44528f069ac41 Mon Sep 17 00:00:00 2001 From: Geoff Jacobs Date: Wed, 21 Oct 2020 13:54:02 +1100 Subject: [PATCH 07/14] ITPLAT-195 setting owner/group for jira-config.properties. It was being copied across as root:root. --- roles/jira_config/tasks/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/jira_config/tasks/main.yml b/roles/jira_config/tasks/main.yml index 11cf442..9f03d5b 100644 --- a/roles/jira_config/tasks/main.yml +++ b/roles/jira_config/tasks/main.yml @@ -28,6 +28,9 @@ remote_src: true src: "{{ atl_product_home_shared }}/jira-config.properties" dest: "{{ atl_product_home }}/jira-config.properties" + owner: "{{ atl_product_user }}" + group: "{{ atl_product_user }}" + mode: 0644 when: jira_config_properties.stat.exists - name: Override JVM memory settings. From 6d724664df5d307e9c66ceac8982bccb4f367cdc Mon Sep 17 00:00:00 2001 From: Dylan Rathbone Date: Mon, 2 Nov 2020 10:00:13 +1000 Subject: [PATCH 08/14] Add 'lxml' as a depenency to ansible python env --- Pipfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Pipfile b/Pipfile index e78f929..6f243cc 100644 --- a/Pipfile +++ b/Pipfile @@ -7,6 +7,7 @@ name = "pypi" ansible = "==2.8.5" boto3 = "==1.9.242" botocore = "==1.12.242" +lxml = "==4.6.1" [dev-packages] molecule = "==2.20.2" From 3c2b000db530bb13a1f0950a70545824030767fd Mon Sep 17 00:00:00 2001 From: Dylan Rathbone Date: Mon, 2 Nov 2020 16:40:52 +1000 Subject: [PATCH 09/14] Install lxml into system python env --- bin/install-ansible | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/install-ansible b/bin/install-ansible index 12561c6..bdd74b8 100755 --- a/bin/install-ansible +++ b/bin/install-ansible @@ -8,7 +8,8 @@ if [[ $ID = "amzn" ]]; then python3-devel \ python3-pip \ python2-boto3 \ - python2-botocore + python2-botocore \ + python-pip \ else # FIXME: Currently assumes Debian-based @@ -21,6 +22,7 @@ export PATH=/usr/local/bin:$PATH export PIP_DEFAULT_TIMEOUT=60 pip3 install pipenv +python -m pip install lxml echo "Installing ansible and dependencies..." PIPENV_NOSPIN=1 PIPENV_HIDE_EMOJIS=1 pipenv sync 2>&1 | iconv -c -f utf-8 -t ascii From 25ebe4c54b2b88ce11dbe6a7c0bf804f133dae30 Mon Sep 17 00:00:00 2001 From: Dylan Rathbone Date: Mon, 2 Nov 2020 16:41:56 +1000 Subject: [PATCH 10/14] Remove lxml from Pipfile --- Pipfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Pipfile b/Pipfile index 6f243cc..e78f929 100644 --- a/Pipfile +++ b/Pipfile @@ -7,7 +7,6 @@ name = "pypi" ansible = "==2.8.5" boto3 = "==1.9.242" botocore = "==1.12.242" -lxml = "==4.6.1" [dev-packages] molecule = "==2.20.2" From e2e4ce4ba63c025174b63ed2e41bfc968f95f64e Mon Sep 17 00:00:00 2001 From: Dylan Rathbone Date: Tue, 3 Nov 2020 08:37:21 +1000 Subject: [PATCH 11/14] Add python2 pip for Debian installs --- bin/install-ansible | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/install-ansible b/bin/install-ansible index bdd74b8..85824f6 100755 --- a/bin/install-ansible +++ b/bin/install-ansible @@ -16,7 +16,8 @@ else apt-get update && \ apt-get install -y \ python3-dev \ - python3-pip + python3-pip \ + python-pip \ fi export PATH=/usr/local/bin:$PATH export PIP_DEFAULT_TIMEOUT=60 From 301f44cbefb3e0e35d878a06fb4eec2d2cf0eb22 Mon Sep 17 00:00:00 2001 From: Dylan Rathbone Date: Tue, 3 Nov 2020 09:16:49 +1000 Subject: [PATCH 12/14] Add python2 pip for Debian installs --- bin/install-ansible | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/install-ansible b/bin/install-ansible index 85824f6..1d9fa2f 100755 --- a/bin/install-ansible +++ b/bin/install-ansible @@ -9,7 +9,7 @@ if [[ $ID = "amzn" ]]; then python3-pip \ python2-boto3 \ python2-botocore \ - python-pip \ + python-pip else # FIXME: Currently assumes Debian-based @@ -17,7 +17,7 @@ else apt-get install -y \ python3-dev \ python3-pip \ - python-pip \ + python-pip fi export PATH=/usr/local/bin:$PATH export PIP_DEFAULT_TIMEOUT=60 From ccee6e4d8c8509419ac995fdc89448c8bd969618 Mon Sep 17 00:00:00 2001 From: Dylan Rathbone Date: Tue, 3 Nov 2020 10:21:13 +1000 Subject: [PATCH 13/14] Remove python2 pip for Debian installs --- bin/install-ansible | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/install-ansible b/bin/install-ansible index 1d9fa2f..58d7b42 100755 --- a/bin/install-ansible +++ b/bin/install-ansible @@ -10,6 +10,8 @@ if [[ $ID = "amzn" ]]; then python2-boto3 \ python2-botocore \ python-pip + + python -m pip install lxml else # FIXME: Currently assumes Debian-based @@ -23,7 +25,6 @@ export PATH=/usr/local/bin:$PATH export PIP_DEFAULT_TIMEOUT=60 pip3 install pipenv -python -m pip install lxml echo "Installing ansible and dependencies..." PIPENV_NOSPIN=1 PIPENV_HIDE_EMOJIS=1 pipenv sync 2>&1 | iconv -c -f utf-8 -t ascii From 4bda130d5f6b5d58ae0aff3899b359a3346aba56 Mon Sep 17 00:00:00 2001 From: Dylan Rathbone Date: Tue, 3 Nov 2020 10:24:02 +1000 Subject: [PATCH 14/14] Remove python2 pip for Debian installs --- bin/install-ansible | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/install-ansible b/bin/install-ansible index 58d7b42..7b994b8 100755 --- a/bin/install-ansible +++ b/bin/install-ansible @@ -18,8 +18,7 @@ else apt-get update && \ apt-get install -y \ python3-dev \ - python3-pip \ - python-pip + python3-pip fi export PATH=/usr/local/bin:$PATH export PIP_DEFAULT_TIMEOUT=60