O'Reilly logo

Troubleshooting Puppet by Thomas Uphill

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Explicit ordering

When you are trying to determine an error in the evaluation of your class, it can be helpful to use the chaining arrow syntax to force your resources to evaluate in the order that you specified. For instance, if you have an exec resource that is failing, you can create another exec resource that outputs the information used within your failing exec. For example, we have the following exec code:

file {'arrow':
  path => '/tmp/arrow',
  ensure => 'directory',
}
exec {'arrow_debug_before':
  command => 'echo debug_before',
  path => '/usr/bin:/bin',
}
exec {'arrow_example':
  command => 'echo arrow',
  path => '/usr/bin:/bin',
  require => File['arrow'],
}
exec {'arrow_debug_after':
  command => 'echo debug_after',
  path => '/usr/bin:/bin',
}

Now, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required