DCD-436: Make log group unique.

This commit is contained in:
Steve Smith
2019-09-11 13:05:07 +10:00
parent 5a98350702
commit e114fca732
7 changed files with 127 additions and 0 deletions

View File

@@ -8,13 +8,19 @@ lint:
platforms:
- name: amazon_linux2
image: amazonlinux:2
groups:
- aws_node_local
# - name: ubuntu_lts
# image: ubuntu:bionic
provisioner:
name: ansible
lint:
name: ansible-lint
inventory:
links:
group_vars: ../../../../group_vars/
verifier:
name: testinfra
lint:
name: flake8
enabled: false

View File

@@ -6,6 +6,11 @@
ansible_default_ipv4:
address: "9.9.9.9"
ansible_ec2_instance_id: "NONE"
atl_product_family: "jira"
atl_product_edition: "jira-software"
atl_aws_stack_name: "MY_STACK"
atl_aws_agent_restart: false
roles:
- role: aws_common

View File

@@ -15,3 +15,11 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
])
def test_package_exes(host, exe):
assert host.file(exe).exists
def test_service_file(host):
f = host.file('/opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.json')
assert f.contains('"log_group_name": "jira-software-MY_STACK"')
assert f.user == 'root'
assert f.group == 'root'
assert f.mode == 0o0644