Skip to content
This repository was archived by the owner on Sep 16, 2020. It is now read-only.

add new format option to just echo id#320

Merged
AlanCoding merged 1 commit intoansible:masterfrom
AlanCoding:format_id
Jul 11, 2017
Merged

add new format option to just echo id#320
AlanCoding merged 1 commit intoansible:masterfrom
AlanCoding:format_id

Conversation

@AlanCoding
Copy link
Member

So a while ago I was staring at these workarounds: strategicdesignteam/openshift-ansible-contrib@a2c0ec6#diff-ca224404b5a9b5002bd12ea8577bd914R85

and it occurred to me that various moderately sophisticated tasks quickly become almost impossible with tower-cli, if lookups can not be done through a resource's identity tuple. Example scenario: Change the email of a user with a given first name and last name. Solution (made possible by this PR):

tower-cli user modify $(tower-cli user get --last-name="Auditor" --first-name="System" --format=id) --email=dddd@dddd.ddd

This is still using special bash syntax, but if it solves someone's problem, then that seems fine. If someone, instead, were to store the outcome and then use it in a subsequent command, this might be useful as well.

@AlanCoding AlanCoding added this to the release_3.1.5 milestone Jul 9, 2017
@AlanCoding AlanCoding requested a review from jangsutsr July 9, 2017 11:42
@coveralls
Copy link

coveralls commented Jul 9, 2017

Coverage Status

Coverage decreased (-0.08%) to 89.586% when pulling 026b16e on AlanCoding:format_id into d663046 on ansible:master.

@AlanCoding AlanCoding merged commit 25233c8 into ansible:master Jul 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants