-
Notifications
You must be signed in to change notification settings - Fork 897
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
Cleanup Ansible::Runner #17808
Cleanup Ansible::Runner #17808
Conversation
bcf0405
to
7202f09
Compare
4be0749
to
527f68f
Compare
lib/ansible/runner.rb
Outdated
playbook = playbook_or_role_args[:playbook] | ||
errors << "playbook path doesn't exist: #{playbook}" if playbook && !File.exist?(playbook) | ||
role = playbook_or_role_args[:role] | ||
errors << "role path doesn't exist: #{role}" if role && !File.exist?(role) |
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 think this one is a valid test failure, previously this checked for the existence of roles_path
and role
is just the name of the role not a 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.
Yup my mistake. This is why I love specs :D
The main cleanup in this commit is to properly leverage AwesomeSpawn's params instead of manually building parts of the command line. Additionally, this fixes a bug with the :cmdline substitution when an extra_var has a "'" in it. Additionally, parameter validation has been lumped together to raise a single error to the caller, instead of one-by-one, and it also raises the more specific ArgumentError.
25f39c1
to
abf0e51
Compare
Cleaned up some rubocops. @gtanzillo This should be good to go. |
Checked commits Fryguy/manageiq@494b8aa~...abf0e51 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 spec/lib/ansible/runner_spec.rb
|
❤️ thanks for the specs guys :-D If we can get runner to the CI, we could add also integration specs (actually invoking ansible-runner), so we know the runner interface is not broken. |
The main cleanup in this commit is to properly leverage AwesomeSpawn's
params instead of manually building parts of the command line. Additionally,
this fixes a bug with the :cmdline substitution when an extra_var has a "'"
in it.
Additionally, parameter validation has been lumped together to raise a
single error to the caller, instead of one-by-one, and it also raises
the more specific ArgumentError.
@agrare As discussed. I'll give you access to push the specs into here.