1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-06-06 12:06:00 +02:00

ansible: add Chinese translation

This commit is contained in:
Starccy 2019-02-25 22:47:09 +08:00 committed by Agniva De Sarker
parent 787c5b662e
commit f8279f3d5c

View file

@ -6,24 +6,24 @@
- 列出给定组下的所有主机:
`ansible {{group}} --list-hosts`
`ansible {{}} --list-hosts`
- 调用ping模块来ping一组主机:
`ansible {{group}} -m ping`
`ansible {{}} -m ping`
- 通过调用安装模块来显示关于一组主机的信息:
`ansible {{group}} -m setup`
`ansible {{}} -m setup`
- 调用命令模块并使用给定的参数来对一组主机执行命令:
`ansible {{group}} -m command -a '{{my_command}}'`
`ansible {{组}} -m command -a '{{命令}}'`
- 以管理员权限执行一个命令:
`ansible {{group}} --become --ask-become-pass -m command -a '{{my_command}}'`
`ansible {{组}} --become --ask-become-pass -m command -a '{{命令}}'`
- 使用自定义的清单文件执行一个命令:
`ansible {{group}} -i {{inventory_file}} -m command -a '{{my_command}}'`
`ansible {{组}} -i {{清单文件}} -m command -a '{{命令}}'`