Ask Your Question

What does the '+>' operator do?

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

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

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

It's called the plusignment operator, see here:

It basically appends a value into a array.

edit flag offensive delete link more

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

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


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 -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


Asked: 2014-06-27 03:55:58 -0600

Seen: 774 times

Last updated: Jun 27 '14