Ask Your Question
0

What does the '+>' operator do?

asked 2014-06-27 03:55:58 -0500

gertvdijk gravatar image

In some pieces of Puppet modules I see the use of +> operator in resources. Eg. here:

File<| title == $::puppet::params::puppet_conf |> {
  notify  +> Service[$puppet_agent_service],
}

At first I thought this was a mistake for the => operator, but this code actually works. What does it do? I am unable to find anything about this in the online Puppet documentation.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2014-06-27 06:59:23 -0500

It's called the plusignment operator, see here: http://docs.puppetlabs.com/references...

It basically appends a value into a array.

edit flag offensive delete link more
0

answered 2014-06-27 05:49:28 -0500

starkb gravatar image

Not sure what it is doing in here, but I have seen it used to join two arrays into one.

edit flag offensive delete link more

Comments

Here it is ensuring the file in question always notifies the puppet agent service in addition to any other resources it may be notifying.

lavaman gravatar imagelavaman ( 2014-06-27 13:06:12 -0500 )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-06-27 03:55:58 -0500

Seen: 236 times

Last updated: Jun 27 '14