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

@@ -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

View File

@@ -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:

View File

@@ -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

View File

@@ -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 }}

View File

@@ -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": {