mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-13 00:13:09 -06:00
address a stack of linting warnings/errors and deprecations
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
[defaults]
|
||||
retry_files_enabled = False
|
||||
callback_whitelist = profile_tasks
|
||||
conditional_bare_variables = True
|
||||
callbacks_enabled = profile_tasks
|
||||
collections_paths = ./
|
||||
|
||||
@@ -38,7 +38,7 @@ atl_installer_temp: "{{ atl_installation_base }}/tmp"
|
||||
# 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') }}"
|
||||
atl_java_home: "{{ '/usr/lib/jvm/java' if atl_use_system_jdk | bool else (atl_product_installation_current + '/jre') }}"
|
||||
atl_java_binary: "{{ atl_java_home }}/bin/java"
|
||||
|
||||
atl_product_logs_default: &logs_default
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
name: "amazon-cloudwatch-agent.service"
|
||||
daemon_reload: true
|
||||
enabled: true
|
||||
when: atl_aws_agent_restart
|
||||
when: atl_aws_agent_restart | bool
|
||||
|
||||
- name: Restart CloudWatch Agent
|
||||
ansible.builtin.systemd:
|
||||
name: "amazon-cloudwatch-agent.service"
|
||||
enabled: true
|
||||
state: restarted
|
||||
when: atl_aws_agent_restart
|
||||
when: atl_aws_agent_restart | bool
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
ansible.builtin.yum:
|
||||
name:
|
||||
- "{{ aws_cloudwatch_agent_rpm }}"
|
||||
when: atl_aws_enable_cloudwatch is defined and atl_aws_enable_cloudwatch
|
||||
when: atl_aws_enable_cloudwatch is defined and atl_aws_enable_cloudwatch | bool
|
||||
notify:
|
||||
- Enable CloudWatch Agent
|
||||
vars:
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
when: atl_aws_enable_cloudwatch is defined and atl_aws_enable_cloudwatch
|
||||
when: atl_aws_enable_cloudwatch is defined and atl_aws_enable_cloudwatch | bool
|
||||
notify:
|
||||
- Restart CloudWatch Agent
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
- block:
|
||||
# No existing timestamp, so this is a first run. Persist some metadata into the ASG.
|
||||
- name: Fetch the git revision for this repo
|
||||
- name: Fetch the git revision for this repo # noqa: command-instead-of-module no-changed-when
|
||||
ansible.builtin.command:
|
||||
cmd: git rev-parse HEAD
|
||||
register: git_out
|
||||
@@ -40,7 +40,7 @@
|
||||
# Set the tags on the ASG and the local instance. We need to
|
||||
# ignore errors as it's possible we don't have the permissions,
|
||||
# and we can't check up-front.
|
||||
- name: Set the first-run tags on the ASG ("FAIL" is not critical)
|
||||
- name: Set the first-run tags on the ASG ("FAIL" is not critical) # noqa: no-changed-when
|
||||
ansible.builtin.command: "aws autoscaling
|
||||
create-or-update-tags
|
||||
--region {{ ansible_ec2_placement_region }}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"run_as_user": "root"
|
||||
},
|
||||
|
||||
{% if atl_aws_enable_cloudwatch_logs is defined and atl_aws_enable_cloudwatch_logs %}
|
||||
{% if atl_aws_enable_cloudwatch_logs is defined and atl_aws_enable_cloudwatch_logs | bool %}
|
||||
"logs": {
|
||||
"logs_collected": {
|
||||
"files": {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
---
|
||||
dependencies:
|
||||
- aws_common
|
||||
- role: aws_common
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
---
|
||||
|
||||
dependencies:
|
||||
- bitbucket_common
|
||||
- role: bitbucket_common
|
||||
|
||||
@@ -13,7 +13,7 @@ hazelcast.network.aws.tag.value={{ atl_aws_stack_name }}
|
||||
hazelcast.group.name={{ atl_aws_stack_name }}
|
||||
hazelcast.group.password={{ atl_aws_stack_name }}
|
||||
plugin.search.elasticsearch.baseurl={{ atl_elasticsearch_endpoint }}
|
||||
{% if elasticsearch_should_auth_with_iam %}
|
||||
{% if elasticsearch_should_auth_with_iam | bool %}
|
||||
plugin.search.elasticsearch.aws.region={{ atl_aws_region }}
|
||||
{% else %}
|
||||
plugin.search.elasticsearch.username={{ atl_elasticsearch_username }}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
---
|
||||
|
||||
dependencies:
|
||||
- bitbucket_common
|
||||
- role: bitbucket_common
|
||||
|
||||
@@ -18,19 +18,16 @@
|
||||
# shared-data and attachments in the shared drive.
|
||||
- name: Symlink local attachments to shared storage
|
||||
ansible.builtin.file:
|
||||
src: "{{ item.0 }}"
|
||||
dest: "{{ item.1 }}"
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
force: false
|
||||
state: link
|
||||
mode: 0750
|
||||
owner: "{{ atl_product_user }}"
|
||||
group: "{{ atl_product_user }}"
|
||||
vars:
|
||||
- links:
|
||||
- ["{{ atl_product_home_shared }}/", "{{ atl_product_home }}/shared-home"]
|
||||
- ["{{ atl_product_home_shared }}/attachments/", "{{ atl_product_home }}/attachments"]
|
||||
with_nested:
|
||||
- "{{ links }}"
|
||||
loop:
|
||||
- {src: "{{ atl_product_home_shared }}/", dest: "{{ atl_product_home }}/shared-home"}
|
||||
- {src: "{{ atl_product_home_shared }}/attachments/", dest: "{{ atl_product_home }}/attachments"}
|
||||
|
||||
- name: Create Tomcat server config
|
||||
ansible.builtin.template:
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
path: "/usr/lib/jvm/temurin-{{ java_major_version }}-jdk"
|
||||
priority: 99
|
||||
|
||||
when: atl_use_system_jdk
|
||||
when: atl_use_system_jdk | bool
|
||||
tags:
|
||||
- runtime_pkg
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
path: "/usr/lib/jvm/temurin-{{ java_major_version }}-jdk-{{ debian_architecture }}"
|
||||
priority: 99
|
||||
|
||||
when: atl_use_system_jdk
|
||||
when: atl_use_system_jdk | bool
|
||||
tags:
|
||||
- runtime_pkg
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
# 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
|
||||
@@ -209,7 +209,7 @@
|
||||
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)
|
||||
@@ -238,14 +238,14 @@
|
||||
mode: 0644
|
||||
register: obr_unpack
|
||||
|
||||
- name: Move JSD dependency jars into the bundled-plugins dir # noqa 503 - ignore lint info about when changed
|
||||
- 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
|
||||
- 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
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
- name: Fetch the latest edition version
|
||||
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
|
||||
|
||||
|
||||
######################################################################
|
||||
@@ -72,7 +72,7 @@
|
||||
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:
|
||||
@@ -100,7 +100,7 @@
|
||||
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"
|
||||
@@ -206,7 +206,7 @@
|
||||
# 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
|
||||
@@ -250,7 +250,7 @@
|
||||
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)
|
||||
@@ -276,4 +276,4 @@
|
||||
|
||||
- name: Include if jsd is requested to be installed from OBR
|
||||
ansible.builtin.include_tasks: "jira-servicedesk_as_obr.yml"
|
||||
when: atl_install_jsd_as_obr
|
||||
when: atl_install_jsd_as_obr | bool
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
name: "{{ atl_systemd_service_name }}"
|
||||
state: restarted
|
||||
when:
|
||||
- atl_startup_restart
|
||||
- atl_startup_restart | bool
|
||||
- molecule_yml is not defined
|
||||
no_log: true
|
||||
|
||||
@@ -14,6 +14,6 @@
|
||||
name: "{{ atl_systemd_service_name }}"
|
||||
enabled: true
|
||||
when:
|
||||
- atl_startup_enable
|
||||
- atl_startup_enable | bool
|
||||
- molecule_yml is not defined
|
||||
no_log: true
|
||||
|
||||
Reference in New Issue
Block a user