Skip to content
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

Merged
merged 2 commits into from
Aug 29, 2016
Merged

Implemented Cookiecutter #416

merged 2 commits into from
Aug 29, 2016

Conversation

retr0h
Copy link
Contributor

@retr0h retr0h commented Aug 29, 2016

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.

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)
Copy link
Contributor Author

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. 🍪

@retr0h
Copy link
Contributor Author

retr0h commented Aug 29, 2016

  syntax: commands succeeded
  py27-ansible19-unit: commands succeeded
  py27-ansible19-functional: commands succeeded
  py27-ansible20-unit: commands succeeded
  py27-ansible20-functional: commands succeeded
  py27-ansible21-unit: commands succeeded
  py27-ansible21-functional: commands succeeded
  doc: commands succeeded
  congratulations :)

@@ -0,0 +1,11 @@
---
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@identifystation
Copy link
Contributor

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.

@identifystation
Copy link
Contributor

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants