Hi Team,

I have created one file where I have specify a variable:

path: /opt/si/ansible/conf/virtual_host

transient_partition_size = 200G

And then trying to print the variable by using lookup through another 
playbook:

- debug:
msg: "{{ lookup('ini', 'transient_partition_size 
section={{control_environment}} file=/opt/si/ansible/conf/virtual-host') }}"

Result:
Error was a <class 'ansible.errors.AnsibleError'>, original message: An 
unhandled exception occurred while running the lookup plugin 'ini'. Error 
was a <class 'ConfigParser.MissingSectionHeaderError'>, original message: 
File contains no section headers.\nfile: <???>, line: 
1\nu'transient_partition_size = 200G\\n'"}

Can you help me here..?
Please find more info regarding version
 ansible --version
ansible 2.9.27
python version = 2.7.5 (default, May 27 2022, 11:27:32) [GCC 4.8.5 20150623 
(Red Hat
 4.8.5-44)]

Thanks
Neha

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/c80f627b-cdc9-4cf2-94f2-f3727fc175d1n%40googlegroups.com.

Reply via email to