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:resoxui-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