Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Preseed cloud-init and allow further preseeding when building the image #47
Conversation
|
|
ogra1
commented
Sep 1, 2016
|
|
warsaw
reviewed
Sep 2, 2016
| + self.cloud_init = ( | ||
| + None | ||
| + if args.cloud_init is None | ||
| + else args.cloud_init) |
warsaw
Sep 2, 2016
Contributor
I'm pretty sure this can just be self.cloud_init = args.cloud_init. The default will be None if the cli switch isn't given.
warsaw
reviewed
Sep 2, 2016
| + cloud_dir = os.path.join(seed_dir, 'nocloud-net') | ||
| + os.makedirs(cloud_dir, exist_ok=True) | ||
| + metadata_file = os.path.join(cloud_dir, 'meta-data') | ||
| + with open(metadata_file, 'w', encoding='utf-8') as f: |
warsaw
reviewed
Sep 2, 2016
| + os.makedirs(cloud_dir, exist_ok=True) | ||
| + metadata_file = os.path.join(cloud_dir, 'meta-data') | ||
| + with open(metadata_file, 'w', encoding='utf-8') as f: | ||
| + print("instance-id: nocloud-static", file=f) |
|
Just a few minor style nits. If you could fix those and push an update, I can hit the big green merge button. If you're happy with the effects during manual testing, we'll deal with test failures later, after GA. |
|
Thanks! |
warsaw
merged commit 53b0f35
into
CanonicalLtd:master
Sep 2, 2016
1 check failed
continuous-integration/travis-ci/pr
The Travis CI build failed
Details
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cyphermox commentedSep 1, 2016
•
Edited 1 time
-
cyphermox
Sep 1, 2016
This passes the minimal instance-id value for cloud-init; and allows passing further preseed
config using '--cloud-init ' which should contain preseeding data for cloud-init and should
follow the documentation at:
https://git.launchpad.net/cloud-init/tree/doc/examples/cloud-config-user-groups.txt
Signed-off-by: Mathieu Trudel-Lapierre mathieu.trudel-lapierre@canonical.com