short description, list (or array) is as it sounds, simple list of
items, a dict or a hash is a list that uses an 'name' to locate the
item
1, 2, 3 < = simiple list, in python/yaml/json (stuff ansible uses) it
is normally in brackets mylist= [1,2,3], lists can be referenced by a
number that describes the position (normally starting by 0) mylist[1]
would return 2
a dict, hash or associative array is a special list that uses names,
normally represented with {}
mydict = { 'one': 1, 'two': 2, 'three', 3}, to access an item you use
the names: mydict['two'] returns 2.
in yaml starting with a '-' normally indicates a list item
mylist:
- 1
- 2
- 3
for dicts just ignore the - and add the name
mydict:
one: 1
two: 2
three: 3
On Wed, Sep 10, 2014 at 11:46 AM, Patrick Ansible-ML
<
ans...@puzzled.xs4all.nl> wrote:
>
> Clearly I need to read more about lists, hashes and dicts. Not being a
> developer, please stand by while I try to wrap my head around them :)
--
Brian Coca
Stultorum infinitus est numerus
0110000101110010011001010110111000100111011101000010000001111001011011110111010100100000011100110110110101100001011100100111010000100001
Pedo mellon a minno