0

How can i get results of puppet apply -t --noop in some script readable way? Are there any resources to apply? I suppose there should be something better then GREP :)

Making some modification to the underling puppet infrastructure and i would like to make sure that applications are not affected.

Scenario of orchestration:

  1. stop puppet agent
  2. do my stuff
  3. run puppet agent -t --noop
  4. if (3) applied resurces => rollback!
  5. start puppet agent
igann
  • 168
  • 1
  • 5

2 Answers2

1

Take a look at the --detailed-exitcodes option:

Provide transaction information via exit codes. If this is enabled, an exit code of '2' means there were changes, an exit code of '4' means there were failures during the transaction, and an exit code of '6' means there were both changes and failures.

womble
  • 96,255
  • 29
  • 175
  • 230
1

Actually /var/lib/puppet/state/last_run_summary.yaml provides all i needed.

igann
  • 168
  • 1
  • 5