Search code examples
linuxpuppetcentos6

Puppet reboot in stages


I need to do a two step installation of a CentOS6 host with puppet (currently using puppet apply) and got stuck. Not even sure it's currently possible today.

Step 1, setup of base system e.g. setup hosts, ntp, mail and some driver stuff.

reboot required

Step 2, setup of a custom service.

Can this bee done a smooth way? I'm not very familiar with the puppet environment yet.


Solution

  • First off, I very much doubt that any setup steps on a CentOS machine strictly require a reboot. It is usually sufficient to restart the right set of services to make all settings take effect.

    Anyway, basic approach to this type of problem could be to

    1. Define a custom fact that determines whether a machine is ready to receive the final configuration steps (Step 2 in your question)
    2. Protect the pertinent parts of your manifest with an if condition that uses that fact value.