ryanycoleman / os_patching_control_repo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to patch nodes using Puppet

  • Add mod 'albatrossflavour-os_patching', '0.13.0' to your Puppetfile and deploy your control repo
  • Classify the linux nodes you wish to be able to patch with the os_patching module
  • Run puppet on these nodes and expect the following changes:
    • The file /usr/local/bin/os_patching_fact_generation.sh will be installed
    • Cron jobs will be setup to run the script every hour (using fqdn_rand) and at reboot
    • The directory /var/cache/os_patching will be created
    • /usr/local/bin/os_patching_fact_generation.sh will run and will populate files into /var/cache/os_patching
    • A new fact (os_patching) will be available
  • View the contents of the os_patching fact on the nodes you classified:
    • facter -p os_patching
    • puppet-task run facter_task fact=os_patching --nodes centos.example.com
    • Use the console to view the fact
  • Execute a patch run on these nodes:
    • puppet task run os_patching::patch_server --query='nodes[certname] { facts.os_patching.package_update_count > 0 and facts.os_patching.blocked = false }'
    • Run the task through the console

About


Languages

Language:Ruby 52.4%Language:Puppet 36.1%Language:Shell 11.6%