skipping: no hosts matched

hello all,

my ansible.cfg is

[defaults]
host_key_checking = False
#hostfile=ec2.py
deprecation_warnings=False
interpreter_python = auto_silent

Use the YAML callback plugin.

stdout_callback = yaml

Use the stdout_callback when running ad-hoc commands.

bin_ansible_callbacks = True
remote_tmp =/tmp
#ANSIBLE_STDOUT_CALLBACK=debug

My playbook is:

  • hosts: staging_green
    become: yes
    serial: 1
    ignore_unreachable: yes
    vars:
    proxy_env:

tasks:

  • name: Patch Green Servers
    include_role:
    name: ryandaniels.server_update_reboot
    when:

  • patch_cycle == “y” and staging_color == “green”

  • hosts: staging_blue
    ignore_unreachable: yes
    serial: 1
    become: yes
    vars:
    proxy_env:

tasks:

  • name: “Patch Staging Blue Servers”
    include_role:
    name: ryandaniels.server_update_reboot
    when:
  • patch_cycle == “y” and staging_color == “blue”

When I run the playbook, I get the following message:

[WARNING]: Could not match supplied host pattern, ignoring: staging_green

PLAY [staging_green] ******************************************************************************************************
skipping: no hosts matched
[WARNING]: Could not match supplied host pattern, ignoring: staging_blue

PLAY [staging_blue] *******************************************************************************************************
skipping: no hosts matched

Can I get some assistance on what is wrong please?

Thank you