Ask Your Question
1

hiera array vs hiera hash

asked 2014-08-31 17:36:07 -0600

lvidler gravatar image

Hi all,

What are some examples of where you would use a hiera array vs when you would use a hiera hash?

Thanks,

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-09-02 07:45:36 -0600

deric gravatar image

Same as in JSON or YAML. You use an array when you don't need a key (e.g. list of server IP addreses). When you need key-value pairs you would use a hash.

hash:

  partitions: 
    sda1: 
      uuid: dda37e09-3176-4787-92bc-b93af42268f7
      size: "583680"
      mount: /boot
      filesystem: ext4

array:

servers:
  - 192.168.1.1
  - 192.168.1.2
edit flag offensive delete link more

Comments

Thanks! :)

lvidler gravatar imagelvidler ( 2014-09-02 09:14:14 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-08-31 17:36:07 -0600

Seen: 624 times

Last updated: Sep 02 '14