Skip to content

Commit

Permalink
Merge pull request #60 from cisagov/improvement/prefer-dict-to-ternar…
Browse files Browse the repository at this point in the history
…y-logic

Prefer a dictionary to ternary logic
  • Loading branch information
jsf9k authored Jun 18, 2024
2 parents 8d63ed9 + 8ce82fc commit 6fdb83f
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
10 changes: 9 additions & 1 deletion vars/Amazon.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
---
# A dictionary whose keys are values of the Ansible fact
# ansible_architecture and whose values are processor architecture for
# which CloudWatch Agent is to be installed, as specified in the
# CloudWatch Agent package filename
architectures:
aarch64: arm64
x86_64: amd64

# The Amazon CloudWatch Agent URL
url: https://s3.amazonaws.com/amazoncloudwatch-agent/amazon_linux/{{ 'amd64' if ansible_architecture == 'x86_64' else 'arm64' }}/latest/amazon-cloudwatch-agent.rpm
url: https://s3.amazonaws.com/amazoncloudwatch-agent/amazon_linux/{{ architectures[ansible_architecture] }}/latest/amazon-cloudwatch-agent.rpm
10 changes: 9 additions & 1 deletion vars/Debian.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
---
# A dictionary whose keys are values of the Ansible fact
# ansible_architecture and whose values are processor architecture for
# which CloudWatch Agent is to be installed, as specified in the
# CloudWatch Agent package filename
architectures:
aarch64: arm64
x86_64: amd64

# The Amazon CloudWatch Agent URL
url: https://s3.amazonaws.com/amazoncloudwatch-agent/debian/{{ 'amd64' if ansible_architecture == 'x86_64' else 'arm64' }}/latest/amazon-cloudwatch-agent.deb
url: https://s3.amazonaws.com/amazoncloudwatch-agent/debian/{{ architectures[ansible_architecture] }}/latest/amazon-cloudwatch-agent.deb
10 changes: 9 additions & 1 deletion vars/RedHat.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
---
# A dictionary whose keys are values of the Ansible fact
# ansible_architecture and whose values are processor architecture for
# which CloudWatch Agent is to be installed, as specified in the
# CloudWatch Agent package filename
architectures:
aarch64: arm64
x86_64: amd64

# The Amazon CloudWatch Agent URL
url: https://s3.amazonaws.com/amazoncloudwatch-agent/redhat/{{ 'amd64' if ansible_architecture == 'x86_64' else 'arm64' }}/latest/amazon-cloudwatch-agent.rpm
url: https://s3.amazonaws.com/amazoncloudwatch-agent/redhat/{{ architectures[ansible_architecture] }}/latest/amazon-cloudwatch-agent.rpm
10 changes: 9 additions & 1 deletion vars/Ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
---
# A dictionary whose keys are values of the Ansible fact
# ansible_architecture and whose values are processor architecture for
# which CloudWatch Agent is to be installed, as specified in the
# CloudWatch Agent package filename
architectures:
aarch64: arm64
x86_64: amd64

# The Amazon CloudWatch Agent URL
url: https://s3.amazonaws.com/amazoncloudwatch-agent/ubuntu/{{ 'amd64' if ansible_architecture == 'x86_64' else 'arm64' }}/latest/amazon-cloudwatch-agent.deb
url: https://s3.amazonaws.com/amazoncloudwatch-agent/ubuntu/{{ architectures[ansible_architecture] }}/latest/amazon-cloudwatch-agent.deb

0 comments on commit 6fdb83f

Please sign in to comment.