-
Notifications
You must be signed in to change notification settings - Fork 662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented Cookiecutter #416
Conversation
Use cookiecutter for `molecule init`. Cookiecutter will serve as the foundation for config generation in functional tests, and the skeleton for standardized ansible role management.
util.print_info("Initializing role {}...".format(role)) | ||
for template in ['galaxy_init', 'playbook', 'driver/{}'.format(driver), | ||
'verifier/testinfra', 'verifier/serverspec']: | ||
self._create_template(template, extra_context, role_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've probably implemented cookiecutter somewhat oddly here. Wanted modular templates, since we need to write an entire role tree with modular test suites. Other times we only want a couple files from the templates.
I figure we can iterate on this, and make it better as we learn more about cookiecutter. 🍪
|
@@ -0,0 +1,11 @@ | |||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get how the variable in the path name works for this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get how the variable in the path name works for this file?
It's a cookiecutter thing. Creates a directory named what we call the repo. In our case the repo is the name of the role we are creating.
I don't understand all the nuances of cookiecutter yet, so it's hard to comment on its implementation, but what you've done so far looks clean and logical. |
👍 |
Use cookiecutter for
molecule init
. Cookiecutter will serve as thefoundation for config generation in functional tests, and the skeleton
for standardized ansible role management.