ansible-callback-plugin | custom ansible callback plugin for sending task | REST library
kandi X-RAY | ansible-callback-plugin Summary
kandi X-RAY | ansible-callback-plugin Summary
This repository shows how to use a custom ansible callback plugin to send the output of every task to an API endpoint. The plugin will record the play and upon detecting a succesfull or failed task will be triggered to store the output of that task and send it using the python requests module to an API endpoint. Configuration of the plugin is done by passing extra_vars to the playbook that will use the callback plugin. We will be using a mock api server to be found in the api_server directory to handle the requests that we send to it to demonstrate the working of the callback plugin.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Return the pwd for username
- Return a list of tasks
- Get tasks
ansible-callback-plugin Key Features
ansible-callback-plugin Examples and Code Snippets
Community Discussions
Trending Discussions on ansible-callback-plugin
QUESTION
I am installing Openshift 3.11 version cluster on my Centos 7.8 VMS. The configuration is that there are there are three Centos VMs (one master node + two worker nodes). I have configured my inventory file also and 'prerequisites.yml' playbook also ran successfully. But when I am running the playbook 'deploy_cluster.yml', then it is generating errors as follows ----
...ANSWER
Answered 2020-Jun-23 at 17:41Copied from comments (as this seems to have been the issue):
So it seems that the repoquery is looking for "origin-3.11.0*". What is the output when you run yum search origin-3.11.0*? I am guessing that this will not find anything, check if the correct YUM repositories are attached.
It seems that you are mixing OpenShift versions, you have the 3.9 repository attached but are trying to install 3.11. You'll need to attach the 3.11 repository. I would recommend that you refer to the official documentation for the installation: https://docs.okd.io/3.11/install/index.html
QUESTION
I have a play below and am trying to get the resolved value of the remote_user attribute inside the callback plugin.
...ANSWER
Answered 2017-Sep-20 at 16:15I don't think there is an easy way to achieve this.
PlayContext is templated inside task_executor here.
And this happens after all callback methods are already notified.
So you should use Templar class manually (but I'm not sure you can get correct variables context for it to work correctly).
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ansible-callback-plugin
python3 -m venv env or virtualenv env (for python2.x)
source env/bin/activate
pip install -r requirements.txt
optionally configure api server defaults in server_config.ini
make run
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page