See my answer here:

https://groups.google.com/forum/#!topic/ansible-devel/hzCOJJT9qyE


On Wednesday, 30 March 2016 14:46:22 UTC+1, anil kumar wrote:
>
> When I try playbook I see below error
>
>
> ok: [resoxapp-ch2f-01c.email.comcast.net]
>
> ERROR! the field 'hosts' is required but was not set
>
>
> my inventory file
>
> [hosts]
>
> resoxapp-ch2f-01c.email.comcast.net
>
> resoxapp-ch2f-02c.email.comcast.net 
>
> resoxui-ch2f-02c.email.comcast.net
>
> resoxui-ch2f-01c.email.comcast.net
>
> reshaproxy-ch2f-21c.email.comcast.net
>
>
>
>
> Below is the playbook
>
> ######################################
>
>
> ---
>
> # Please pass AUTOUSER (Automation user with ssh key access) and BUILDNAME 
> variables to this script.
>
> - hosts: resoxapp-ch2f-01c.email.comcast.net:r
> esoxui-ch2f-02c.email.comcast.net 
>
>   user: "{{ AUTOUSER }}"
>
>   sudo: yes
>
> # Disable Middlware-01 from UI-02 and UI-01 from haproxy
>
>   tasks:
>
>    - name : Disable the Middleware Host in UserInterface host 
>
>      shell: /var/tmp/en_dis_mw.sh resoxapp-ch2f-01c.email.comcast.net -d
>
>      delegate_to: resoxui-ch2f-02c.email.comcast.net
>
>
> - hosts: reshaproxy-ch2f-21c.email.comcast.net
>
>   user: "{{ AUTOUSER }}"
>
>   sudo: yes
>
>   vars:
>
>     dc: "{{ DC }}"
>
>   tasks:
>
>    - name : disable UI server from haproxy
>
>      shell : echo "disable server ox_beta_{{dc}}/oxbetaui1" |socat stdio 
> /var/lib/haproxy/stats 
>
>      delegate_to : reshaproxy-ch2f-21c.email.comcast.net
>
>
> # UPGRADE PLAY
>
> - hosts: resoxapp-ch2f-01c.email.comcast.net 
>
> - name: Upgrade the BETA MIDDLEWARE environment to the specified release
>

-- 
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 
https://groups.google.com/d/msgid/ansible-project/ec7ed1f1-4fe3-484b-a6e2-1af63c0e30bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to