Skip to content

Instantly share code, notes, and snippets.

@piniv piniv/aws-logs.yml
Last active May 15, 2019

What would you like to do?
install and configure awslogs
- block: #install and config awslogs
- name: AWSLOGS | check if configuration file is present
stat: "path={{ awslogs_config_file }}"
register: awslogs_status
- block: #only download when awslogs does not exist
- name: AWSLOGS | download installer
url: "{{ awslogs_agent_url }}"
dest: /tmp/
- name: AWSLOGS | install deamon
shell: >
"/usr/bin/python /tmp/
--non-interactive --region {{ aws_region }}
-c {{ awslogs_config_file }}
when: not awslogs_status.stat.exists
- name: AWSLOGS | place configuration file
src: awslogs.conf.j2
dest: /var/awslogs/etc/awslogs.conf
- name: AWSLOGS | place configuration file for daemon logging
src: awslogs_logging.conf.j2
dest: /var/awslogs/etc/logging.conf
- name: AWSLOGS | restart agent
name: awslogs
state: restarted
enabled: yes
tags: awslogs
when: common_install_awslogs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.