Skip to content

Commit

Permalink
Improving documentation for VM configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jtyr committed Jul 24, 2018
1 parent 85b49b9 commit 5c69e38
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,6 @@ Examples
tags: vmware_vm_provisioning
when: >
inventory_hostname == 'localhost'
# We can import another playbook to configugure the VM right after it was provisioned
- import_playbook: site.yaml
```
In order to provision only certain VMs, you can use the following approach:
Expand All @@ -232,6 +229,20 @@ ansible-playbook \
vm_provisioning.yaml
```

We can also use execute Ansible with multiple playbooks to configure the VM
right after it was provisioned:

```shell
ansible-playbook \
-i localhost, \
-i hosts \
-l '~(localhost|test0[13])' \
-e '{ vmware_vm_provisioning_limit: "{{ ansible_play_hosts }}" }' \
vm_provisioning.yaml \
# That's the second playbook which configures the provisioned VM(s)
site.yaml
```


Role variables
--------------
Expand Down

0 comments on commit 5c69e38

Please sign in to comment.