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

debops-update: fails when ansible_managed contains variables #172

Open
tklicki opened this issue Oct 5, 2016 · 0 comments
Open

debops-update: fails when ansible_managed contains variables #172

tklicki opened this issue Oct 5, 2016 · 0 comments

Comments

@tklicki
Copy link

tklicki commented Oct 5, 2016

How to replicate:

  1. Put following option into .debops.cfg configuration file which includes "%" characters:

ansible defaults
ansible_managed = ansible managed: {file} modified on %Y-%m-%d %H:%M:%S by {uid} on {host}

  1. Run debops-update:

(debops)tklicki@ansible:~/debops$ debops-update
Traceback (most recent call last):
File "/home/tklicki/.virtualenvs/debops/bin/debops-update", line 220, in
main(args.project_dir)
File "/home/tklicki/.virtualenvs/debops/bin/debops-update", line 182, in main
config = read_config(project_root)
File "/home/tklicki/.virtualenvs/debops/local/lib/python2.7/site-packages/debops/config.py", line 111, in read_config
for sect in cfgparser.sections())
File "/home/tklicki/.virtualenvs/debops/local/lib/python2.7/site-packages/debops/config.py", line 111, in
for sect in cfgparser.sections())
File "/usr/lib/python2.7/ConfigParser.py", line 655, in items
for option in options]
File "/usr/lib/python2.7/ConfigParser.py", line 691, in _interpolate
self._interpolate_some(option, L, rawval, section, vars, 1)
File "/usr/lib/python2.7/ConfigParser.py", line 732, in _interpolate_some
"'%%' must be followed by '%%' or '(', found: %r" % (rest,))
ConfigParser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: '%Y-%m-%d %H:%M:%S by {uid} on {host}'

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

No branches or pull requests

1 participant