thiagomgo / ansible-role-awslogs Goto Github PK
View Code? Open in Web Editor NEWAnsible Role: AWSLogs
Home Page: https://galaxy.ansible.com/thiagomgo/awslogs
Ansible Role: AWSLogs
Home Page: https://galaxy.ansible.com/thiagomgo/awslogs
It seems ec2_facts has been replaced by ec2_metadata_facts. I get the following error
TASK [thiagomgo.awslogs : awslogs | discover EC2 facts] *********************************************
[DEPRECATION WARNING]: ec2_facts is kept for backwards compatibility but usage is discouraged. The
module documentation details page may explain more about this rationale.. This feature will be
removed in a future release. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.
fatal: [...]: FAILED! => {"changed": false, "msg": "This module has been removed. The module documentation for Ansible-2.6 may contain hints for porting"}
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.4 LTS"
root@ip-10-10-12-151:~# systemctl status awslogs
โ awslogs.service - The CloudWatch Logs agent
Loaded: loaded (/lib/systemd/system/awslogs.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Notice the disabled
above. As a result - it never starts. And awslogs-nanny is "smart" enough to bail out if service was never started:
# Bail out if PID file doesn't exist. It implies that the
# process was never started.
if [ ! -f $PIDFILE ]
then
exit 0
fi
Workaround: enable service explicitly.
- name: Make sure a awslogs service is enabled
shell: /bin/systemctl enable awslogs
With the current configuration of systemd unit, whenever the service is stopped, the python child process that actually pushes the logs is left behind, causing lots of processes potentially piling up.
The systemd service should be fixed to handle the current functionality of the agent launcher script.
PR incoming.
The agent supports natively HTTP proxy configuration, but the role does not have support for it.
I'm working on it, just opening this issue as reference.
I want to know how to uninstall this version.
hi @thiagomgo
We're using your role to provision our EC2 instances with Cloud Watch agent and we're very happy with it... so thanks for the work!
One question though: could you tag some releases periodically and publish them on Ansible Galaxy? We like to have some control over which version we're using and right now there is only the master branch to use.
Thank you in advance!
I'm on centos -
TASK [ansible-role-awslogs : awslogs | install the daemon] *******************************************************************************************************************************************
fatal: [xxxxxx-southeast-2.compute.amazonaws.com]: FAILED! => {"changed": true, "cmd": "python /tmp/awslogs-agent-setup.py -n -r ap-southeast-2 -c /tmp/awslogs.conf", "delta": "0:00:00.053346", "end": "2020-03-18 06:49:04.069519", "msg": "non-zero return code", "rc": 3, "start": "2020-03-18 06:49:04.016173", "stderr": "", "stderr_lines": [], "stdout": "\u001b[91mERROR: Failed to determine linux distribution. Exiting.\u001b[0m", "stdout_lines": ["\u001b[91mERROR: Failed to determine linux distribution. Exiting.\u001b[0m"]}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.