Created
November 17, 2018 21:38
-
-
Save kaymccormick/b3d210bb23a2d4e4bbe37998c0ad7e18 to your computer and use it in GitHub Desktop.
This file contains 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
LINODE_CLI=linode-cli | |
CREATE_CMD_CATEGORY=create | |
ROOT_PASS=XXXX | |
SS_ID=349134 | |
BOOTED=yes | |
STACKSCRIPT_DATA=stackscript-data.json | |
HOSTNAME=XXXX | |
PYTHON=python | |
LINODE_TOKEN=`cat .linode_token` | |
KERBEROS=yes | |
REGION=us-west | |
$(STACKSCRIPT_DATA): | |
$(PYTHON) -c 'import json; import sys; json.dump(dict(ln_token="'$(LINODE_TOKEN)'", hostname="'$(HOSTNAME)'", kerberos="'$(KERBEROS)'"), fp=sys.stdout)' > $(STACKSCRIPT_DATA) | |
create: | |
$(LINODE_CLI) linodes create --region $(REGION) --root_pass "$(ROOT_PASS)" --stackscript_id $(SS_ID) --booted $(BOOTED) --stackscript_data "`cat $(STACKSCRIPT_DATA)`" | |
update-stackscript: | |
SCRIPT=`cat stackscript` | |
$(LINODE_CLI) stackscripts update --script "`cat stackscript`" $(SS_ID) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment