Ansible Docs: Fix headers and indentation

Align the headers style and wording in the intro page.

[ci skip]
This commit is contained in:
Gilles Cornu 2017-08-22 19:18:32 +02:00
parent e436f53fe9
commit c3f0b1c1b2
1 changed files with 16 additions and 14 deletions

View File

@ -89,7 +89,7 @@ When using Ansible, it needs to know on which machines a given playbook should r
The first and simplest option is to not provide one to Vagrant at all. Vagrant will generate an inventory file encompassing all of the virtual machines it manages, and use it for provisioning machines.
**Example with the [`ansible`](/docs/provisioning/ansible.html) provisioner:**
#### Example with the [`ansible`](/docs/provisioning/ansible.html) provisioner
```
# Generated by Vagrant
@ -100,7 +100,7 @@ default ansible_ssh_host=127.0.0.1 ansible_ssh_port=2200 ansible_ssh_user='vagra
Note that the generated inventory file is stored as part of your local Vagrant environment in
`.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory`.
**Example with the [`ansible_local`](/docs/provisioning/ansible_local.html) provisioner:**
#### Example with the [`ansible_local`](/docs/provisioning/ansible_local.html) provisioner
```
# Generated by Vagrant
@ -110,10 +110,12 @@ default ansible_connection=local
Note that the generated inventory file is uploaded to the guest VM in a subdirectory of [`tmp_path`](/docs/provisioning/ansible_local.html), e.g. `/tmp/vagrant-ansible/inventory/vagrant_ansible_local_inventory`.
**Host variables:**
#### Host Variables
As of Vagrant 1.8.0, the [`host_vars`](/docs/provisioning/ansible_common.html#host_vars) option can be used to set [variables for individual hosts](https://docs.ansible.com/ansible/intro_inventory.html#host-variables) in the generated inventory file (see also the notes on group variables below).
With this configuration example:
```
Vagrant.configure("2") do |config|
config.vm.define "host1"
@ -130,7 +132,7 @@ Vagrant.configure("2") do |config|
end
```
Generated inventory:
Vagrant would generate the following inventory file:
```
# Generated by Vagrant
@ -139,7 +141,7 @@ host1 ansible_ssh_host=... http_port=80 maxRequestsPerChild=808
host2 ansible_ssh_host=... http_port=303 maxRequestsPerChild=909
```
**How to generate Inventory Groups:**
#### Groups and Group Variables
The [`groups`](/docs/provisioning/ansible_common.html#groups) option can be used to pass a hash of group names and group members to be included in the generated inventory file.
@ -170,7 +172,7 @@ Vagrant.configure("2") do |config|
end
```
Vagrant would generate an inventory file that might look like:
Vagrant would generate the following inventory file:
```
# Generated by Vagrant