Skip to content

Instantly share code, notes, and snippets.

@grdnrio
Created May 15, 2017 08:26
Show Gist options
  • Save grdnrio/d81c550c1184735f6d6a99d55ce1c3de to your computer and use it in GitHub Desktop.
Save grdnrio/d81c550c1184735f6d6a99d55ce1c3de to your computer and use it in GitHub Desktop.
Attribute orchestration
On node 1 you will need something like this:
# package installation and configuration
# set an attribute key as the last action
node.set['master']['key'] = 6B0FEJFM
Then on node 2 you are looking for the key that you set during node 1’s run:
# all the node configuration up to master node requirement / dependency
result = search(:node, "role:master")
if result.first['master']['key'] == 6B0FEJFM
  # do required config
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment