ktdreyer / ktdreyer.koji_ansible / 0.0.450 / module / koji_call Make low-level Koji API calls Authors: unknown preview | supported by communityktdreyer.koji_ansible.koji_call (0.0.450) — module
Install with ansible-galaxy collection install ktdreyer.koji_ansible:==0.0.450
collections: - name: ktdreyer.koji_ansible version: 0.0.450
Call Koji's RPC API directly.
Why would you use this module instead of the higher level modules like koji_tag, koji_target, etc? This koji_call module has two main uses-cases.
1. You may want to do something that the higher level modules do not yet support. It can be easier to use this module to quickly prototype out your ideas for what actions you need, and then write the Python code to do it in a better way later. If you find that you need to use koji_call to achieve functionality that is not yet present in the other koji-ansible modules, please file a Feature Request issue in GitHub with your use case.
2. You want to write some tests that verify Koji's data at a very low level. For example, you may want to write an integration test to verify that you've set up your Koji configuration in the way you expect.
Note that this module will always report "changed: true" every time, because it simply sends the RPC to the Koji Hub on every ansible run. This module cannot understand if your chosen RPC actually "changes" anything.
Read the full Koji API documentation at https://koji.fedoraproject.org/koji/api
- name: call the Koji API hosts: localhost tasks: - name: call the API koji_call: name: getTag args: [f34-build] register: call_result - debug: var: call_result.data
args: description: - The list or dict of arguments to pass into the call. - 'Example: ["f34-build"]' required: false name: description: - The name of the Koji RPC to send. - 'Example: "getTag"' required: true login: choices: - true - false default: false description: - Whether to authenticate to Koji for this API call or not. Authentication is an extra round-trip to the Hub, so it is slower and more load on the database. You should not authenticate if this call is read-only (one of the "get" API calls). If you are doing some create or write operation, you must authenticate. The default behavior is to do an anonymous (non-authenticated) call.