Skip to content

Commit

Permalink
Added more documentation for variable declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
Tejeda, Engelbert committed Aug 14, 2019
1 parent 1546651 commit 2f4efa7
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,32 @@ Remember, the task runner will ultimately be calling the `ansible-playbook` comm
- mylistvalue2
- mylistvalue3
- mylistvalue4
myvar6: $(grep somestring /some/file.txt)
```

</details>

As you can see, we've defined a number of variables holding different values.

The rules for defining these play out as follows:

```
Variable | Ansible Evaluation | Bash Evaluation
-------------------------------------------- | ----------------------- | -----------------------
str_var: myvalue1 | String | String
num_var: 3 | Digit | String
multiline_var: | | Multiline String | String (heredoc)
This is a multi-line value
of type string
list_var: | List Object | String (heredoc)
- item1
- item2
dict_var: | Dictionary Object | None, Skipped # TODO Add interpolation of yaml dictionary objects for subprocess
key1: somevalue1
key2: somevalue2
shell_var: $(grep somestring /some/file.txt) | Depends on output | String
```

[Back To Top](#top)
<a name="populate-the-vars-block---cli-options"></a>
## Populate the vars block - cli options
Expand All @@ -241,6 +263,7 @@ Remember, the task runner will ultimately be calling the `ansible-playbook` comm
- mylistvalue2
- mylistvalue3
- mylistvalue4
myvar6: $(grep somestring /some/file.txt)
required_parameters:
-d|--db-hosts: dbhosts ## Specify DB Host targets
-w|--web-hosts: webhosts ## Specify Web Host targets
Expand Down Expand Up @@ -328,6 +351,7 @@ Again, this variable is made available to the underlying subprocess call, and wi
- mylistvalue2
- mylistvalue3
- mylistvalue4
myvar6: $(grep somestring /some/file.txt)
required_parameters:
-d|--db-hosts: dbhosts ## Specify DB Host targets
-w|--web-hosts: webhosts ## Specify Web Host targets
Expand Down Expand Up @@ -376,6 +400,7 @@ Again, this variable is made available to the underlying subprocess call, and wi
- mylistvalue2
- mylistvalue3
- mylistvalue4
myvar6: $(grep somestring /some/file.txt)
required_parameters:
-d|--db-hosts: dbhosts ## Specify DB Host targets
-w|--web-hosts: webhosts ## Specify Web Host targets
Expand Down Expand Up @@ -432,6 +457,7 @@ Again, this variable is made available to the underlying subprocess call, and wi
- mylistvalue2
- mylistvalue3
- mylistvalue4
myvar6: $(grep somestring /some/file.txt)
required_parameters:
-d|--db-hosts: dbhosts ## Specify DB Host targets
-w|--web-hosts: webhosts ## Specify Web Host targets
Expand Down Expand Up @@ -564,6 +590,7 @@ The syntax for nesting these under the _functions_ key is as follows:
- mylistvalue2
- mylistvalue3
- mylistvalue4
myvar6: $(grep somestring /some/file.txt)
required_parameters:
-d|--db-hosts: dbhosts ## Specify DB Host targets
-w|--web-hosts: webhosts ## Specify Web Host targets
Expand Down

0 comments on commit 2f4efa7

Please sign in to comment.