You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
咱们可以在 play 或任务级别,设置控制 `become` 的指令。可以通过设置连接变量,咱们可覆盖这些指令,不同主机的连接变量往往不同。这些变量和指令是独立的。例如,设置 `become_user` 并不会设置 `become`。
16
+
17
+
18
+
-`become`
19
+
设置为 `true` 以激活权限提升。
20
+
21
+
-`become_user`
22
+
设置为有着所需权限的用户 - 咱们要 *成为* 的用户,而 **不是** 咱们登录的用户。这 **不** 意味着在主机级别允许设置的 `become:true`,Does NOT imply `become: true`, to allow it to be set at the host level。默认值为 `root`。
23
+
24
+
-`become_method`
25
+
(于 play 或任务级别)覆盖 `ansible.cfg` 中设置的默认方式,设置为使用某种 [`become` 插件](https://docs.ansible.com/ansible/latest/plugins/become.html#become-plugins)。
0 commit comments