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

Renamed check to syntax #228

Merged
merged 1 commit into from
Jul 18, 2016
Merged

Renamed check to syntax #228

merged 1 commit into from
Jul 18, 2016

Conversation

retr0h
Copy link
Contributor

@retr0h retr0h commented Jul 9, 2016

This is in preparation for implementing dry-run #128.

@retr0h retr0h force-pushed the rename-check branch 2 times, most recently from e428553 to 9dbd8de Compare July 9, 2016 01:59
@retr0h retr0h changed the title Renamed check to syntax-check Implemented a "dry run" Jul 9, 2016
@dhutty
Copy link
Contributor

dhutty commented Jul 10, 2016

LGTM, untested.

@kireledan
Copy link
Contributor

For some reason, doing the dry run with the docker hosts attempts a connection over ssh.
image

Also the dry-run should generate an inventory before executing because it does rely on that. For some reason it seems to be ignoring the connection=docker on the dry run part.

@conorsch
Copy link
Contributor

Having some trouble while testing this:

molecule test
Traceback (most recent call last):
  File "/home/conor/gits/molecule/venv/bin/molecule", line 10, in <module>
    sys.exit(main())
  File "/home/conor/gits/molecule/venv/local/lib/python2.7/site-packages/molecule/cli.py", line 72, in main
    CLI().main()
  File "/home/conor/gits/molecule/venv/local/lib/python2.7/site-packages/molecule/cli.py", line 68, in main
    sys.exit(c.execute()[0])
  File "/home/conor/gits/molecule/venv/local/lib/python2.7/site-packages/molecule/commands.py", line 527, in execute
    command = getattr(sys.modules[__name__], task.capitalize())
AttributeError: 'module' object has no attribute 'Check-syntax'

Here's the full command history leading up to that error. Commands are run in the git repo with this PR branch checked out.

virtualenv venv && source venv/bin/activate && pip install -r requirements.txt && python setup.py install
molecule --version # shows "1.6.4.dev3"
molecule init dummyrole
cd dummyrole
molecule test

Looks like the changes to capitalize and constantize could use a bit of refinement.

@retr0h
Copy link
Contributor Author

retr0h commented Jul 16, 2016

@conorsch yeah I need to give this PR some love.

Btw we have a sample role in the repo for just this purpose. tests/demo/molecule/.

@retr0h retr0h force-pushed the rename-check branch 2 times, most recently from 1ba002d to e7ef968 Compare July 16, 2016 22:42
This is in preparation for implementing dry-run ansible#128.
@retr0h
Copy link
Contributor Author

retr0h commented Jul 16, 2016

@conorsch I have update the PR to simply rename check to syntax to make way for the proper check command. Tests are currently passing.

Mind giving a +1/-1 review?

@retr0h retr0h changed the title Implemented a "dry run" Renamed check to syntax Jul 16, 2016
@conorsch
Copy link
Contributor

👎

Perhaps I'm missing something, but it appears the dry-run option is missing for me:

$ molecule syntax

playbook: playbook.yml
$ molecule check
Usage:
    molecule [-hv] <command> [<args>...]
$ molecule -h
Usage:
    molecule [-hv] <command> [<args>...]

Commands:
    syntax        check playbook syntax
    create        create instances
    converge      create and provision instances
    idempotence   converge and check the output for changes
    test          run a full test cycle: destroy, create, converge, idempotency-check, verify and destroy instances
    verify        create, provision and test instances
    destroy       destroy instances
    status        show status of instances
    list          show available platforms, providers
    login         connects to instance via SSH
    init          creates the directory structure and files for a new Ansible role compatible with molecule

Options:
    -h --help     shows this screen
    -v --version  shows the version
$ molecule --version
1.6.4.dev3

This is after destroying and recreating the virtualenv as described above. Installation and attempted test run were executed under git hash 2a85239.

@retr0h
Copy link
Contributor Author

retr0h commented Jul 17, 2016

Perhaps I'm missing something, but it appears the dry-run option is missing for me:

@conorsch, Dry option is not yet implemented. Simply renamed check to syntax to make room for the check feature, in a PR to come.

@identifystation
Copy link
Contributor

👍

@retr0h retr0h merged commit 3fb72fa into ansible:master Jul 18, 2016
@retr0h retr0h deleted the rename-check branch July 18, 2016 20:58
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.

None yet

5 participants