you could use fetch module first to get from remote to local, then use 
with_ini

But on the face of it it does look like a file that should be source 
controlled/with the ansible playbooks/roles etc


On Friday, January 11, 2019 at 9:56:35 AM UTC+13, Hugo Gonzalez wrote:
>
> Hello Chaz,
> On 1/10/19 11:00 AM, Chaz_E wrote:
>
> QUESTION: How can we load or import an env/ini file that is located in 
> a file on the Remote/Target server?
>
> GOAL:
> We have an env/ini file on the remote/target server.
> We want to read in that file and use the values as variables for the tasks 
> on that machine. 
> ( FYI: Our process does not allow for saving these variables in the 
> Inventory - even though that would be nice. )
>
> Here is an example of what our ini/env file looks like:
> Path: /devops/properties/Admin.properties
> username = FooAdmin
> password = bar123XYZ
> activate = no
> (Basically property format or ini format without any sections)
>
> Can't you link/transform your file to be a local facts file? Take a look 
> at 
>
>
> https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#local-facts-facts-d
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7a2f1167-5b37-4452-902d-8e1750d0fa0f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to