cloudforms, manageiq

Updating CloudForms advanced settings without a Web UI

To update the advanced settings of a CloudForms appliance you need to be logged in to the web interface of the actual appliance that needs updating. This is somewhat different to other general settings, which can be updated from any appliance or even from the appliance console.

“So what?” you ask. Well, things get complicated when you do not have access to the web interface. Perhaps it has not been enabled on one or more appliances in your cluster. Perhaps you are load balancing your web UI and are experiencing SSL certificate woes when trying to access appliance URLs. Or maybe, just maybe, you forgot to enable the Web Services role when upgrading from CloudForms 4.2 to 4.6 (CFME 5.7 => 5.9), effectively disabling authentication via the UI, like I may or may not have done…

Continue reading

ansible

Complex data structures and the Ansible json_query filter

While Ansible is busy fighting its own internal battle not to become a fully fledged programming language, instead remaining as simple and purely declarative as possible, it is still often necessary to work with more complex data structures. This is where the Jinja2 and Ansible filters can really shine.

Recently I stumbled across the Ansible json_query filter as a very neat solution to a problem that would have been otherwise messy to solve in Ansible. The filter is already well-documented, but I thought I would share a few examples of how it came in handy for me.

Continue reading

ansible, cloudforms, manageiq

Querying the CloudForms VMDB via the REST API

I have been playing around a lot more with the embedded Ansible feature of CloudForms 4.6. While this functionality was introduced in version 4.5, the ability to call a playbook method from a state machine in version 4.6 opens up a lot of possibilities.

One thing I was caught up on though was how to query VMDB collections for a specific item from within a playbook. Initially I thought it was going to be necessary to iterate through every item in the collection, something that would require a large amount of API calls and become totally impractical for larger collections. Luckily my initial thoughts were incorrect – the expansion and filtering capabilities allow for a single API query.

Continue reading