|
|
@ -14,7 +14,7 @@
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
'''
|
|
|
|
r'''
|
|
|
|
DOCUMENTATION:
|
|
|
|
DOCUMENTATION:
|
|
|
|
inventory: host_list
|
|
|
|
inventory: host_list
|
|
|
|
version_added: "2.4"
|
|
|
|
version_added: "2.4"
|
|
|
@ -23,14 +23,14 @@ DOCUMENTATION:
|
|
|
|
- Parses a host list string as a comma separated values of hosts
|
|
|
|
- Parses a host list string as a comma separated values of hosts
|
|
|
|
- This plugin only applies to inventory strings that are not paths and contain a comma.
|
|
|
|
- This plugin only applies to inventory strings that are not paths and contain a comma.
|
|
|
|
EXAMPLES: |
|
|
|
|
EXAMPLES: |
|
|
|
|
# define 2 hosts in command line
|
|
|
|
# define 2 hosts in command line
|
|
|
|
ansible -i '10.10.2.6, 10.10.2.4' -m ping all
|
|
|
|
ansible -i '10.10.2.6, 10.10.2.4' -m ping all
|
|
|
|
|
|
|
|
|
|
|
|
# DNS resolvable names
|
|
|
|
# DNS resolvable names
|
|
|
|
ansible -i 'host1.example.com, host2' -m user -a 'name=me state=abset' all
|
|
|
|
ansible -i 'host1.example.com, host2' -m user -a 'name=me state=abset' all
|
|
|
|
|
|
|
|
|
|
|
|
# just use localhost
|
|
|
|
# just use localhost
|
|
|
|
ansible-playbook -i 'localhost,' play.yml -c local
|
|
|
|
ansible-playbook -i 'localhost,' play.yml -c local
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
|
|
|
|
|
|
|
|
from __future__ import (absolute_import, division, print_function)
|
|
|
|
from __future__ import (absolute_import, division, print_function)
|
|
|
|