14 Commits

Author SHA1 Message Date
John Westcott IV
3784f9515e More refinement of examples 2020-07-14 09:38:26 -04:00
John Westcott IV
6638d6c2bb Update examples 2020-07-14 09:38:26 -04:00
John Westcott IV
381e9d2901 Reverting commit 81b192c3b0520be0897f95e2630edab295e6bf24, we should fail only if we are > max_objects 2020-07-14 09:38:26 -04:00
John Westcott IV
0424370d49 Revamp of the examples 2020-07-14 09:38:26 -04:00
John Westcott IV
1a4bb42ac5 When using return_ids send back a list of strings instead of ints.
When we used ints and passed this data into a nother call like:
    - name: Create a job template with a looked up credential from a folded lookup
      tower_job_template:
        name: "{{ job_template_name }}"
        credentials: >-
            {{ lookup(
                'awx.awx.tower_api',
                'credentials',
                query_params={ 'name' : credential_name },
                return_ids=True,
                expect_one=True,
                wantlist=True
            ) }}
        project: "{{ project_name }}"
        inventory: Demo Inventory
        playbook: hello_world.yml
        job_type: run
        state: present
      register: create_jt

Ansible would raise this warning:
[WARNING]: The value 30 (type int) in a string field was converted to '30' (type string). If this does not look like what you expect, quote the entire value to ensure it does not change.

Returning a list of strings prevents that.
2020-07-14 09:38:26 -04:00
John Westcott IV
fdb008fb8c Added note about exception if list view return is > max_objects 2020-07-14 09:38:26 -04:00
John Westcott IV
d793f0bc99 Making the count check >= instead of just > 2020-07-14 09:38:26 -04:00
John Westcott IV
a9c16a6c90 Fixing undefined variabe 2020-07-14 09:38:26 -04:00
Alan Rominger
34c23caed3 make lookup plugin compatible with ansible.tower namespace (#9) 2020-07-14 09:38:26 -04:00
AlanCoding
30ff112c87 Pull in functionality from lookup plugin get_id into tower_api itself 2020-07-14 09:38:26 -04:00
John Westcott IV
f4454a6c93 Make tower_api a generic GET'er 2020-07-14 09:38:26 -04:00
John Westcott IV
3c02265986 Fixing doc issue 2020-07-14 09:38:26 -04:00
beeankha
6715ea493f Fix documentation in api lookup plugin, fix typos in integration tests 2020-07-14 09:38:26 -04:00
John Westcott IV
6d626b3793 Adding tower_api and tower_get_id lookup plugins 2020-07-14 09:38:26 -04:00