Refresh Embedded Ansible playbooks


#1

Can somebody tell me how to refresh the ansible playbooks in the embedded ansible programatically?

Ansible playbooks get imported from a git repository. If somebody commit changes in that git repository, we would like to automatically make these changes available in ManageIQ.

I would imagine I could trigger a refresh through a webhook, but I would like to know how to do this in ManageIQ.


#2

You can grab a repo object and then invoke the refresh_in_provider method

e.g.
ManageIQ::Providers::EmbeddedAnsible::AutomationManager::ConfigurationScriptSource.first.refresh_in_provider


#3

Also possible via REST API - see /api/configuration_script_sources