docs/ansible: Fix small issues
- fix alpha-order listing of the shared options ansible_common.html.md - fix two wrong indentations in ansible_intro.html.md [ci skip]
This commit is contained in:
parent
585ee76a00
commit
80fb6be61f
|
@ -34,20 +34,27 @@ Some of these options are for advanced usage only and should not be used unless
|
||||||
```
|
```
|
||||||
These variables take the highest precedence over any other variables.
|
These variables take the highest precedence over any other variables.
|
||||||
|
|
||||||
- `host_vars` (hash) - Set of inventory host variables to be included in the [auto-generated inventory file](https://docs.ansible.com/ansible/intro_inventory.html#host-variables).
|
- `galaxy_command` (template string) - The command pattern used to install Galaxy roles when `galaxy_role_file` is set.
|
||||||
|
|
||||||
Example:
|
The following (optional) placeholders can be used in this command pattern:
|
||||||
|
- `%{role_file}` is replaced by the absolute path to the `galaxy_role_file` option
|
||||||
|
- `%{roles_path}` is
|
||||||
|
- replaced by the absolute path to the `galaxy_roles_path` option when such option is defined, or
|
||||||
|
- replaced by the absolute path to a `roles` subdirectory sitting in the `playbook` parent directory.
|
||||||
|
|
||||||
```ruby
|
By default, this option is set to
|
||||||
ansible.host_vars = {
|
|
||||||
"host1" => {"http_port" => 80,
|
|
||||||
"maxRequestsPerChild" => 808},
|
|
||||||
"host2" => {"http_port" => 303,
|
|
||||||
"maxRequestsPerChild" => 909}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Note: This option has no effect when the `inventory_path` option is defined.
|
`ansible-galaxy install --role-file=%{role_file} --roles-path=%{roles_path} --force`
|
||||||
|
|
||||||
|
- `galaxy_role_file` (string) - The path to the Ansible Galaxy role file.
|
||||||
|
|
||||||
|
By default, this option is set to `nil` and Galaxy support is then disabled.
|
||||||
|
|
||||||
|
Note: if an absolute path is given, the `ansible_local` provisioner will assume that it corresponds to the exact location on the guest system.
|
||||||
|
|
||||||
|
- `galaxy_roles_path` (string) - The path to the directory where Ansible Galaxy roles must be installed
|
||||||
|
|
||||||
|
By default, this option is set to `nil`, which means that the Galaxy roles will be installed in a `roles` subdirectory located in the parent directory of the `playbook` file.
|
||||||
|
|
||||||
- `groups` (hash) - Set of inventory groups to be included in the [auto-generated inventory file](/docs/provisioning/ansible_intro.html).
|
- `groups` (hash) - Set of inventory groups to be included in the [auto-generated inventory file](/docs/provisioning/ansible_intro.html).
|
||||||
|
|
||||||
|
@ -74,42 +81,35 @@ Some of these options are for advanced usage only and should not be used unless
|
||||||
- Alphanumeric patterns are not supported (e.g. `db-[a:f]`, `vm[01:10]`).
|
- Alphanumeric patterns are not supported (e.g. `db-[a:f]`, `vm[01:10]`).
|
||||||
- This option has no effect when the `inventory_path` option is defined.
|
- This option has no effect when the `inventory_path` option is defined.
|
||||||
|
|
||||||
|
- `host_vars` (hash) - Set of inventory host variables to be included in the [auto-generated inventory file](https://docs.ansible.com/ansible/intro_inventory.html#host-variables).
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```ruby
|
||||||
|
ansible.host_vars = {
|
||||||
|
"host1" => {"http_port" => 80,
|
||||||
|
"maxRequestsPerChild" => 808},
|
||||||
|
"host2" => {"http_port" => 303,
|
||||||
|
"maxRequestsPerChild" => 909}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Note: This option has no effect when the `inventory_path` option is defined.
|
||||||
|
|
||||||
- `inventory_path` (string) - The path to an Ansible inventory resource (e.g. a [static inventory file](https://docs.ansible.com/intro_inventory.html), a [dynamic inventory script](https://docs.ansible.com/intro_dynamic_inventory.html) or even [multiple inventories stored in the same directory](https://docs.ansible.com/intro_dynamic_inventory.html#using-multiple-inventory-sources)).
|
- `inventory_path` (string) - The path to an Ansible inventory resource (e.g. a [static inventory file](https://docs.ansible.com/intro_inventory.html), a [dynamic inventory script](https://docs.ansible.com/intro_dynamic_inventory.html) or even [multiple inventories stored in the same directory](https://docs.ansible.com/intro_dynamic_inventory.html#using-multiple-inventory-sources)).
|
||||||
|
|
||||||
By default, this option is disabled and Vagrant generates an inventory based on the `Vagrantfile` information.
|
By default, this option is disabled and Vagrant generates an inventory based on the `Vagrantfile` information.
|
||||||
|
|
||||||
- `playbook_command` (string) - The command used to run playbooks.
|
|
||||||
|
|
||||||
The default value is `ansible-playbook`
|
|
||||||
|
|
||||||
- `galaxy_command` (template string) - The command pattern used to install Galaxy roles when `galaxy_role_file` is set.
|
|
||||||
|
|
||||||
The following (optional) placeholders can be used in this command pattern:
|
|
||||||
- `%{role_file}` is replaced by the absolute path to the `galaxy_role_file` option
|
|
||||||
- `%{roles_path}` is
|
|
||||||
- replaced by the absolute path to the `galaxy_roles_path` option when such option is defined, or
|
|
||||||
- replaced by the absolute path to a `roles` subdirectory sitting in the `playbook` parent directory.
|
|
||||||
|
|
||||||
By default, this option is set to
|
|
||||||
|
|
||||||
`ansible-galaxy install --role-file=%{role_file} --roles-path=%{roles_path} --force`
|
|
||||||
|
|
||||||
- `galaxy_role_file` (string) - The path to the Ansible Galaxy role file.
|
|
||||||
|
|
||||||
By default, this option is set to `nil` and Galaxy support is then disabled.
|
|
||||||
|
|
||||||
Note: if an absolute path is given, the `ansible_local` provisioner will assume that it corresponds to the exact location on the guest system.
|
|
||||||
|
|
||||||
- `galaxy_roles_path` (string) - The path to the directory where Ansible Galaxy roles must be installed
|
|
||||||
|
|
||||||
By default, this option is set to `nil`, which means that the Galaxy roles will be installed in a `roles` subdirectory located in the parent directory of the `playbook` file.
|
|
||||||
|
|
||||||
- `limit` (string or array of strings) - Set of machines or groups from the inventory file to further control which hosts [are affected](https://docs.ansible.com/glossary.html#limit-groups).
|
- `limit` (string or array of strings) - Set of machines or groups from the inventory file to further control which hosts [are affected](https://docs.ansible.com/glossary.html#limit-groups).
|
||||||
|
|
||||||
The default value is set to the machine name (taken from `Vagrantfile`) to ensure that `vagrant provision` command only affect the expected machine.
|
The default value is set to the machine name (taken from `Vagrantfile`) to ensure that `vagrant provision` command only affect the expected machine.
|
||||||
|
|
||||||
Setting `limit = "all"` can be used to make Ansible connect to all machines from the inventory file.
|
Setting `limit = "all"` can be used to make Ansible connect to all machines from the inventory file.
|
||||||
|
|
||||||
|
- `playbook_command` (string) - The command used to run playbooks.
|
||||||
|
|
||||||
|
The default value is `ansible-playbook`
|
||||||
|
|
||||||
- `raw_arguments` (array of strings) - a list of additional `ansible-playbook` arguments.
|
- `raw_arguments` (array of strings) - a list of additional `ansible-playbook` arguments.
|
||||||
|
|
||||||
It is an *unsafe wildcard* that can be used to apply Ansible options that are not (yet) supported by this Vagrant provisioner. As of Vagrant 1.7, `raw_arguments` has the highest priority and its values can potentially override or break other Vagrant settings.
|
It is an *unsafe wildcard* that can be used to apply Ansible options that are not (yet) supported by this Vagrant provisioner. As of Vagrant 1.7, `raw_arguments` has the highest priority and its values can potentially override or break other Vagrant settings.
|
||||||
|
@ -128,6 +128,8 @@ Some of these options are for advanced usage only and should not be used unless
|
||||||
|
|
||||||
- `tags` (string or array of strings) - Only plays, roles and tasks [tagged with these values will be executed](https://docs.ansible.com/playbooks_tags.html) .
|
- `tags` (string or array of strings) - Only plays, roles and tasks [tagged with these values will be executed](https://docs.ansible.com/playbooks_tags.html) .
|
||||||
|
|
||||||
|
- `vault_password_file` (string) - The path of a file containing the password used by [Ansible Vault](https://docs.ansible.com/playbooks_vault.html#vault).
|
||||||
|
|
||||||
- `verbose` (boolean or string) - Set Ansible's verbosity to obtain detailed logging
|
- `verbose` (boolean or string) - Set Ansible's verbosity to obtain detailed logging
|
||||||
|
|
||||||
Default value is `false` (minimal verbosity).
|
Default value is `false` (minimal verbosity).
|
||||||
|
@ -135,5 +137,3 @@ Some of these options are for advanced usage only and should not be used unless
|
||||||
Examples: `true` (equivalent to `v`), `-vvv` (equivalent to `vvv`), `vvvv`.
|
Examples: `true` (equivalent to `v`), `-vvv` (equivalent to `vvv`), `vvvv`.
|
||||||
|
|
||||||
Note that when the `verbose` option is enabled, the `ansible-playbook` command used by Vagrant will be displayed.
|
Note that when the `verbose` option is enabled, the `ansible-playbook` command used by Vagrant will be displayed.
|
||||||
|
|
||||||
- `vault_password_file` (string) - The path of a file containing the password used by [Ansible Vault](https://docs.ansible.com/playbooks_vault.html#vault).
|
|
||||||
|
|
|
@ -11,9 +11,8 @@ description: |-
|
||||||
|
|
||||||
The information below is applicable to both Vagrant Ansible provisioners:
|
The information below is applicable to both Vagrant Ansible provisioners:
|
||||||
|
|
||||||
- [`ansible`](/docs/provisioning/ansible.html), where Ansible is executed on the **Vagrant host**
|
- [`ansible`](/docs/provisioning/ansible.html), where Ansible is executed on the **Vagrant host**
|
||||||
|
- [`ansible_local`](/docs/provisioning/ansible_local.html), where Ansible is executed on the **Vagrant guest**
|
||||||
- [`ansible_local`](/docs/provisioning/ansible_local.html), where Ansible is executed on the **Vagrant guest**
|
|
||||||
|
|
||||||
The list of common options for these two provisioners is documented in a [separate documentation page](/docs/provisioning/ansible_common.html).
|
The list of common options for these two provisioners is documented in a [separate documentation page](/docs/provisioning/ansible_common.html).
|
||||||
|
|
||||||
|
@ -237,9 +236,9 @@ config.vm.network :private_network, ip: "192.168.111.222"
|
||||||
|
|
||||||
**Notes:**
|
**Notes:**
|
||||||
|
|
||||||
- The machine names in `Vagrantfile` and `ansible.inventory_path` files should correspond, unless you use `ansible.limit` option to reference the correct machines.
|
- The machine names in `Vagrantfile` and `ansible.inventory_path` files should correspond, unless you use `ansible.limit` option to reference the correct machines.
|
||||||
- The SSH host addresses (and ports) must obviously be specified twice, in `Vagrantfile` and `ansible.inventory_path` files.
|
- The SSH host addresses (and ports) must obviously be specified twice, in `Vagrantfile` and `ansible.inventory_path` files.
|
||||||
- Sharing hostnames across Vagrant host and guests might be a good idea (e.g. with some Ansible configuration task, or with a plugin like [`vagrant-hostmanager`](https://github.com/smdahlen/vagrant-hostmanager)).
|
- Sharing hostnames across Vagrant host and guests might be a good idea (e.g. with some Ansible configuration task, or with a plugin like [`vagrant-hostmanager`](https://github.com/smdahlen/vagrant-hostmanager)).
|
||||||
|
|
||||||
### The Ansible Configuration File
|
### The Ansible Configuration File
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue