Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module throws errors when running ansible-playbook with -C #50

Open
johnrmiller opened this issue Sep 3, 2019 · 0 comments
Open

Module throws errors when running ansible-playbook with -C #50

johnrmiller opened this issue Sep 3, 2019 · 0 comments

Comments

@johnrmiller
Copy link

johnrmiller commented Sep 3, 2019

Getting errors when running ansible-playbook with -C:

RUNNING HANDLER [rossmcdonald.telegraf : assert running] *****************************************************************************************
fatal: [my.host.name]: FAILED! => {"msg": "The conditional check 'telegraf_service_status.rc == 0' failed. The error was: error while evaluating conditional (telegraf_service_status.rc == 0): 'dict object' has no attribute 'rc'"}

When running with -C, ansible-playbook doesn't execute command resources; therefore telegraf_service_status doesn't get set and the check fails. This precludes this role from being run in an automated fashion; for example via a cron or Jenkins job.

Role should probably be changed instead to use a service resource rather than trying to call the service command (which doesn't exist for all systems) directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant