Save remote property value to registered variable?

13 views
Skip to first unread message

burn...@umn.edu

unread,
Nov 15, 2016, 5:01:37 PM11/15/16
to Ansible Project
Hello - 

Is there a way to save a remote property value to a registered variable?

Example: Remote server has file stuff.properties with below sample content:
var1=Hello
var2=World

Can Ansible reach out to that file, crack it open, find key "var2", then register value "World"? I dont' want the entire stuff.properties file, but just the value "World" from key "var2".

In my head, I imagine there may be some way to setup a regex backrefrence to slurp out "World". Or, perhaps first fetch, then lookup, with a fancy INI plugin logic?

Thanks

Reply all
Reply to author
Forward
0 new messages