Ansible Study Note 2-playbooks's hosts

Source: Internet
Author: User

Host: Define a remote host group


User: Users who are executing the task group


Remote_user: Same as user


sudo: If set to Yes, the user performing the task group gets root privileges when performing a task


Sudo_user: If you set user to Tom,sudo as Yes,sudo_user for Jerry, then Tom will get the permissions of the Jerry user


Connection: How to connect to a remote host by default SSH


Gather_facts: Unless you explicitly indicate that you do not need to execute the Setup module on a remote host, it will be performed automatically by default. If you do not need the variables passed by the Setup module, you can enable this option.


---

-hosts:192.168.80.20

Remote_user:root

...

This article from "Eight Miles" blog, declined reprint!

Ansible Study Note 2-playbooks's hosts

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.