Skip to content

debops-update: fails when ansible_managed contains variables #172

Description

@tklicki

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}'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions