address a stack of linting warnings/errors and deprecations

This commit is contained in:
Lee Goolsbee
2022-09-07 17:55:29 -05:00
parent 694f1c2874
commit ac3f6f1f93
22 changed files with 42 additions and 46 deletions

View File

@@ -1,5 +1,4 @@
[defaults] [defaults]
retry_files_enabled = False retry_files_enabled = False
callback_whitelist = profile_tasks callbacks_enabled = profile_tasks
conditional_bare_variables = True
collections_paths = ./ collections_paths = ./

View File

@@ -38,7 +38,7 @@ atl_installer_temp: "{{ atl_installation_base }}/tmp"
# installed and linked to `/usr/lib/jvm/java`. # installed and linked to `/usr/lib/jvm/java`.
# See product_common/task/ubuntu.yml for an example of apropriate # See product_common/task/ubuntu.yml for an example of apropriate
# linking using `alternatives`. # 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_java_binary: "{{ atl_java_home }}/bin/java"
atl_product_logs_default: &logs_default atl_product_logs_default: &logs_default

View File

@@ -5,11 +5,11 @@
name: "amazon-cloudwatch-agent.service" name: "amazon-cloudwatch-agent.service"
daemon_reload: true daemon_reload: true
enabled: true enabled: true
when: atl_aws_agent_restart when: atl_aws_agent_restart | bool
- name: Restart CloudWatch Agent - name: Restart CloudWatch Agent
ansible.builtin.systemd: ansible.builtin.systemd:
name: "amazon-cloudwatch-agent.service" name: "amazon-cloudwatch-agent.service"
enabled: true enabled: true
state: restarted state: restarted
when: atl_aws_agent_restart when: atl_aws_agent_restart | bool

View File

@@ -15,7 +15,7 @@
ansible.builtin.yum: ansible.builtin.yum:
name: name:
- "{{ aws_cloudwatch_agent_rpm }}" - "{{ 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: notify:
- Enable CloudWatch Agent - Enable CloudWatch Agent
vars: vars:

View File

@@ -20,7 +20,7 @@
owner: root owner: root
group: root group: root
mode: 0644 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: notify:
- Restart CloudWatch Agent - Restart CloudWatch Agent

View File

@@ -16,7 +16,7 @@
- block: - block:
# No existing timestamp, so this is a first run. Persist some metadata into the ASG. # 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: ansible.builtin.command:
cmd: git rev-parse HEAD cmd: git rev-parse HEAD
register: git_out register: git_out
@@ -40,7 +40,7 @@
# Set the tags on the ASG and the local instance. We need to # 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, # ignore errors as it's possible we don't have the permissions,
# and we can't check up-front. # 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 ansible.builtin.command: "aws autoscaling
create-or-update-tags create-or-update-tags
--region {{ ansible_ec2_placement_region }} --region {{ ansible_ec2_placement_region }}

View File

@@ -4,7 +4,7 @@
"run_as_user": "root" "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": {
"logs_collected": { "logs_collected": {
"files": { "files": {

View File

@@ -1,3 +1,3 @@
--- ---
dependencies: dependencies:
- aws_common - role: aws_common

View File

@@ -1,4 +1,4 @@
--- ---
dependencies: dependencies:
- bitbucket_common - role: bitbucket_common

View File

@@ -13,7 +13,7 @@ hazelcast.network.aws.tag.value={{ atl_aws_stack_name }}
hazelcast.group.name={{ atl_aws_stack_name }} hazelcast.group.name={{ atl_aws_stack_name }}
hazelcast.group.password={{ atl_aws_stack_name }} hazelcast.group.password={{ atl_aws_stack_name }}
plugin.search.elasticsearch.baseurl={{ atl_elasticsearch_endpoint }} 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 }} plugin.search.elasticsearch.aws.region={{ atl_aws_region }}
{% else %} {% else %}
plugin.search.elasticsearch.username={{ atl_elasticsearch_username }} plugin.search.elasticsearch.username={{ atl_elasticsearch_username }}

View File

@@ -1,4 +1,4 @@
--- ---
dependencies: dependencies:
- bitbucket_common - role: bitbucket_common

View File

@@ -18,19 +18,16 @@
# shared-data and attachments in the shared drive. # shared-data and attachments in the shared drive.
- name: Symlink local attachments to shared storage - name: Symlink local attachments to shared storage
ansible.builtin.file: ansible.builtin.file:
src: "{{ item.0 }}" src: "{{ item.src }}"
dest: "{{ item.1 }}" dest: "{{ item.dest }}"
force: false force: false
state: link state: link
mode: 0750 mode: 0750
owner: "{{ atl_product_user }}" owner: "{{ atl_product_user }}"
group: "{{ atl_product_user }}" group: "{{ atl_product_user }}"
vars: loop:
- links: - {src: "{{ atl_product_home_shared }}/", dest: "{{ atl_product_home }}/shared-home"}
- ["{{ atl_product_home_shared }}/", "{{ atl_product_home }}/shared-home"] - {src: "{{ atl_product_home_shared }}/attachments/", dest: "{{ atl_product_home }}/attachments"}
- ["{{ atl_product_home_shared }}/attachments/", "{{ atl_product_home }}/attachments"]
with_nested:
- "{{ links }}"
- name: Create Tomcat server config - name: Create Tomcat server config
ansible.builtin.template: ansible.builtin.template:

View File

@@ -27,7 +27,7 @@
path: "/usr/lib/jvm/temurin-{{ java_major_version }}-jdk" path: "/usr/lib/jvm/temurin-{{ java_major_version }}-jdk"
priority: 99 priority: 99
when: atl_use_system_jdk when: atl_use_system_jdk | bool
tags: tags:
- runtime_pkg - runtime_pkg

View File

@@ -32,7 +32,7 @@
path: "/usr/lib/jvm/temurin-{{ java_major_version }}-jdk-{{ debian_architecture }}" path: "/usr/lib/jvm/temurin-{{ java_major_version }}-jdk-{{ debian_architecture }}"
priority: 99 priority: 99
when: atl_use_system_jdk when: atl_use_system_jdk | bool
tags: tags:
- runtime_pkg - runtime_pkg

View File

@@ -168,7 +168,7 @@
# Otherwise directory lock was either already created or # Otherwise directory lock was either already created or
# could not be created. Fall back is to continue and install from temp # 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 # If the intention is to move obr to home_shared
- name: Move obr to home_shared - name: Move obr to home_shared
@@ -209,7 +209,7 @@
atl_obr_download: "{{ atl_obr_shared_download }}" atl_obr_download: "{{ atl_obr_shared_download }}"
when: temp_deleted is succeeded when: temp_deleted is succeeded
when: move_obr when: move_obr | bool
# At this point the binary is in {{ atl_obr_download }} # At this point the binary is in {{ atl_obr_download }}
# (which is either on home_shared or temp) # (which is either on home_shared or temp)
@@ -238,14 +238,14 @@
mode: 0644 mode: 0644
register: obr_unpack 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: ansible.builtin.copy:
remote_src: yes remote_src: yes
src: "{{ atl_product_installation_versioned }}/atlassian-jira/WEB-INF/atlassian-bundled-plugins/dependencies/" 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/" dest: "{{ atl_product_installation_versioned }}/atlassian-jira/WEB-INF/atlassian-bundled-plugins/"
when: obr_unpack.changed 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: ansible.builtin.file:
path: "{{ atl_product_installation_versioned }}/atlassian-jira/WEB-INF/atlassian-bundled-plugins/dependencies" path: "{{ atl_product_installation_versioned }}/atlassian-jira/WEB-INF/atlassian-bundled-plugins/dependencies"
state: absent state: absent

View File

@@ -35,7 +35,7 @@
- name: Fetch the latest edition version - name: Fetch the latest edition version
ansible.builtin.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
###################################################################### ######################################################################
@@ -72,7 +72,7 @@
atl_download_version: "{{ atl_latest_version }}" atl_download_version: "{{ atl_latest_version }}"
when: not cached.stat.exists when: not cached.stat.exists
when: version_is_latest when: version_is_latest | bool
- name: "Case: Version is not latest" - name: "Case: Version is not latest"
block: block:
@@ -100,7 +100,7 @@
atl_product_normalised_version is version(atl_cached_normalised_version, '<=') and atl_product_normalised_version is version(atl_cached_normalised_version, '<=') and
not force_version_update | bool 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" - name: "Fallthrough guard: Use cached or supplied version if nothing set"
@@ -206,7 +206,7 @@
# Otherwise directory lock was either already created or # Otherwise directory lock was either already created or
# could not be created. Fall back is to continue and install from temp # 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 # If the intention is to move binary to home_shared
- name: Move product installer to home_shared - name: Move product installer to home_shared
@@ -250,7 +250,7 @@
atl_product_download: "{{ atl_product_home_shared_download }}" atl_product_download: "{{ atl_product_home_shared_download }}"
when: temp_deleted is succeeded when: temp_deleted is succeeded
when: move_binary when: move_binary | bool
# At this point the binary is in {{ atl_product_download }} # At this point the binary is in {{ atl_product_download }}
# (which is either on home_shared or temp) # (which is either on home_shared or temp)
@@ -276,4 +276,4 @@
- name: Include if jsd is requested to be installed from OBR - name: Include if jsd is requested to be installed from OBR
ansible.builtin.include_tasks: "jira-servicedesk_as_obr.yml" ansible.builtin.include_tasks: "jira-servicedesk_as_obr.yml"
when: atl_install_jsd_as_obr when: atl_install_jsd_as_obr | bool

View File

@@ -5,7 +5,7 @@
name: "{{ atl_systemd_service_name }}" name: "{{ atl_systemd_service_name }}"
state: restarted state: restarted
when: when:
- atl_startup_restart - atl_startup_restart | bool
- molecule_yml is not defined - molecule_yml is not defined
no_log: true no_log: true
@@ -14,6 +14,6 @@
name: "{{ atl_systemd_service_name }}" name: "{{ atl_systemd_service_name }}"
enabled: true enabled: true
when: when:
- atl_startup_enable - atl_startup_enable | bool
- molecule_yml is not defined - molecule_yml is not defined
no_log: true no_log: true