Ansible Docs: Display multiline examples in block
This commit is contained in:
parent
edb59ebeff
commit
d584a56ac2
|
@ -120,16 +120,17 @@ The Ansible provisioner also includes a number of additional options that can be
|
||||||
all of which get passed to the `ansible-playbook` command that ships with Ansible.
|
all of which get passed to the `ansible-playbook` command that ships with Ansible.
|
||||||
|
|
||||||
* `ansible.extra_vars` can be used to pass additional variables (with highest priority) to the playbook. This parameter can be a path to a JSON or YAML file, or a hash. For example:
|
* `ansible.extra_vars` can be used to pass additional variables (with highest priority) to the playbook. This parameter can be a path to a JSON or YAML file, or a hash. For example:
|
||||||
```
|
|
||||||
ansible.extra_vars = {
|
```
|
||||||
ntp_server: "pool.ntp.org",
|
ansible.extra_vars = {
|
||||||
nginx: {
|
ntp_server: "pool.ntp.org",
|
||||||
port: 8008,
|
nginx: {
|
||||||
workers: 4
|
port: 8008,
|
||||||
}
|
workers: 4
|
||||||
}
|
}
|
||||||
```
|
}
|
||||||
These variables take the highest precedence over any other variables.
|
```
|
||||||
|
These variables take the highest precedence over any other variables.
|
||||||
* `ansible.sudo` can be set to `true` to cause Ansible to perform commands using sudo.
|
* `ansible.sudo` can be set to `true` to cause Ansible to perform commands using sudo.
|
||||||
* `ansible.sudo_user` can be set to a string containing a username on the guest who should be used
|
* `ansible.sudo_user` can be set to a string containing a username on the guest who should be used
|
||||||
by the sudo command.
|
by the sudo command.
|
||||||
|
@ -147,12 +148,13 @@ by the sudo command.
|
||||||
* Any supported options (described above) will override conflicting `raw_arguments` value (e.g. `--tags` or `--start-at-task`)
|
* Any supported options (described above) will override conflicting `raw_arguments` value (e.g. `--tags` or `--start-at-task`)
|
||||||
* Vagrant default user authentication can be overridden via `raw_arguments` (with custom values for `--user` and `--private-key`)
|
* Vagrant default user authentication can be overridden via `raw_arguments` (with custom values for `--user` and `--private-key`)
|
||||||
* `ansible.groups` can be used to pass a hash of group names and group members to be included in the generated inventory file. For example:
|
* `ansible.groups` can be used to pass a hash of group names and group members to be included in the generated inventory file. For example:
|
||||||
```
|
|
||||||
ansible.groups = {
|
```
|
||||||
"group1" => ["machine1"],
|
ansible.groups = {
|
||||||
"group2" => ["machine2", "machine3"],
|
"group1" => ["machine1"],
|
||||||
"all_groups:children" => ["group1", "group2"]
|
"group2" => ["machine2", "machine3"],
|
||||||
}
|
"all_groups:children" => ["group1", "group2"]
|
||||||
```
|
}
|
||||||
Note that only the current machine and its related groups will be added to the inventory file.
|
```
|
||||||
|
Note that only the current machine and its related groups will be added to the inventory file.
|
||||||
* `ansible.host_key_checking` can be set to `false` which will disable host key checking and prevent `"FAILED: (25, 'Inappropriate ioctl for device')"` errors from being reported during provisioner runs. The default value is `true`, which matches the default behavior of Ansible 1.2.1 and later.
|
* `ansible.host_key_checking` can be set to `false` which will disable host key checking and prevent `"FAILED: (25, 'Inappropriate ioctl for device')"` errors from being reported during provisioner runs. The default value is `true`, which matches the default behavior of Ansible 1.2.1 and later.
|
||||||
|
|
Loading…
Reference in New Issue