Hello.
I want to use `private_key_file` in ansible.cfg as a variable in template 
file.

Say, I have ansible.cfg like this..
[defaults]
hostfile = hosts
remote_user = ubuntu
private_key_file = /home/test/.ssh/id_rsa


And want to use it in Jinja2 format like this..
options[:user] ||= Etc.getlogin
options[:keys] = "{{ private_key_file }}"
# options[:keys] = "/home/test/.ssh/id_rsa"


with playbook calls template modules..
- name: template copy
  template: src=spec.j2 dest=/serverspec/.spec



If you use `ansible_ssh_private_key_file` in inventory host file, you can 
successfuly template it.
But I  want to use good old ansible.cfg.
Any ideas?

-- 
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/e09c76fd-e179-4db9-a464-7c080dbb85bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to