Skip to content
This repository has been archived by the owner on Dec 28, 2024. It is now read-only.

extra-vars parse error with ansible 1.9.1 #33

Closed
subsetpark opened this issue Jun 8, 2015 · 3 comments
Closed

extra-vars parse error with ansible 1.9.1 #33

subsetpark opened this issue Jun 8, 2015 · 3 comments
Labels

Comments

@subsetpark
Copy link

When called from the CLI like this:
battle -K --config-file=config.yml --extra-vars dir_var=/Users/myhome/path/to/dir

I get this error:

Traceback (most recent call last):
  File "/usr/local/bin/battle", line 7, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/Library/Python/2.7/site-packages/battleschool/main.py", line 141, in main
    extra_vars = utils.parse_kv(options.extra_vars)
  File "/Library/Python/2.7/site-packages/ansible/utils/__init__.py", line 787, in parse_kv
    vargs = split_args(args)
  File "/Library/Python/2.7/site-packages/ansible/module_utils/splitter.py", line 73, in split_args
    args = args.strip()
AttributeError: 'list' object has no attribute 'strip'

Looks like battleschool is expecting a string, when actually it gets vars like this: ['dir_var=/Users/myhome/path/to/dir']

@spencergibb
Copy link
Owner

@subsetpark what happens if you quote it? All the examples from the docs show quotes. Though I know things have changed over time in ansible. Some tests would be good.

@subsetpark
Copy link
Author

Same issue, single or double quotes.

@spencergibb
Copy link
Owner

thanks for the quick reply

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

No branches or pull requests

2 participants