Ansible Ad-hoc command exclude hosts

Exclude one host from group/All
$ ansible all -l '!192.168.0.1' --list-hosts

Exclude multiple host from group/All
$ ansible all -l '!192.168.0.1 !192.168.0.2' --list-hosts

Share on Google Plus

About Penguin Technology

I am a passionate cloud and DevOps professional specializing in Linux and open-source solutions. Through this blog, I share my knowledge and experience with the community, offering tips and insights on cloud technologies and DevOps practices.
    Blogger Comment

0 comments:

Post a Comment