Last active
September 2, 2022 07:17
Revisions
-
alces revised this gist
May 25, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,5 +11,5 @@ If you have only one host to run your playbook against, your inventory string mu (because otherwise Ansible would interpret it as a name of inventory file, not a hosts' list) for example: ```bash ansible-playbook -i myhost, all -a 'uname -a' ``` -
alces revised this gist
May 25, 2016 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,5 @@ In case you want to run `ansible` (or `ansible-playbook`) command against a set of hosts that makes sense only for one run, you can don't bother to create one-time inventory file, but simply define a comma-separated list of hosts as argument of `--invertory` option (or its short form that's simply `-i`) as follows: ```bash ansible --inventory=myhost1,myhost2,myhost3 all -m setup -a 'filter=*name*' -
alces created this gist
May 25, 2016 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ In case you want to run `ansible` (or `ansible-playbook`) command against a set of hosts that makes sense only for one run, you can don't bother to create one-time inventory file, but define a comma-separated list of hosts as argument of `--invertory` option (or its short form that's simply `-i`) as follows: ```bash ansible --inventory=myhost1,myhost2,myhost3 all -m setup -a 'filter=*name*' ``` (note that `all` in this command line stands for the target hostname) If you have only one host to run your playbook against, your inventory string must ends with `,` (because otherwise Ansible would interpret it as a name of inventory file, not a hosts' list) for example: ```bash ansible-playbook -i myhost, -a 'uname -a' ```