Hi all,

I am a beginner in ansible. If anyone can help me in finding the answer. It 
would be great. My problem was finding a phrase in ansible which one of the 
person have helped me. But unfortunately i am not able to fit the piece of 
code in my playbook.

    hostclass: 'puppet'
    hostclass: 'ess'
    hostclass: 'mdb'

the code was::

- debug: 
  msg: "{{ hostinfo|dictsort|selectattr('1.hostclass', 'equalto', 
'ess')|first|first }}"

Now i am writing the code as given below. I know in this piece of code i am 
making mistakes. But since i am a beginner i am not able to understand it. 
Can anyone help me?

- hosts: test
  gather_facts: no 

- debug: 
  msg: "{{ hostinfo|dictsort|selectattr('1.hostclass', 'equalto', 
'ess')|first|first }}"

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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to