Last active
August 29, 2015 14:19
-
-
Save dragolabs/2a0fd2b967f5be03f992 to your computer and use it in GitHub Desktop.
Script for create description for chef's nodes in attribute "desc".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| echo "Set description for chef's nodes. Press ENTER to skip node." | |
| for NODE in `knife search "! desc:*" -i | tail -n+2`;do | |
| echo "Node: ${NODE}" | |
| echo -n 'Description: ' | |
| read DESC | |
| if [ ! -z "${DESC}" ];then | |
| knife node attribute set ${NODE} desc "${DESC}" | |
| else | |
| continue | |
| fi | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment