ERROR: the playbook: cpbe could not be found

Hi All,

I’m facing below error:

[pchaphek@ansible01 updates]$ ansible-playbook -v -i …/…/inventory/production fs diskcheck.yaml --ask-pass --sudo --ask-sudo-pass
SSH password:
sudo password [defaults to SSH password]:
ERROR: the playbook: fs could not be found
[pchaphek@ansible01 updates]$

if I change fs to any other group then also error remains.

but if I use below command, i get the output

[pchaphek@ansible01 updates]$ ansible -v -i …/…/inventory/production fs -m shell -a “df -kh” --ask-pass
SSH password:
Hostname | success | rc=0 >>
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_root-lv_root
18G 7.1G 9.3G 44% /
tmpfs 1.9G 0 1.9G 0% /dev/shm
/dev/sda1 485M 37M 423M 8% /boot
/dev/mapper/vg_data-lv_data
99G 5.6G 88G 6% /data

can anyone help me out.

[pchaphek@ansible01 updates]$ cat diskcheck.yaml

For ansible-playbook, you do not specify the hosts as an argument, they are listed in the playbook itself (you have ‘hosts: all’). If you only wanted to target the system “fs”, then you should use the --limit option:

$ ansible-playbook -v -i …/…/inventory/production diskcheck.yaml --limit=fs --ask-pass --sudo --ask-sudo-pass

Or you could simply change the hosts: option in your playbook to be ‘hosts: fs’