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

Shaper play doesn't work in some cases #44

Open
Aliaksei-Tatarynchyk opened this issue May 30, 2019 · 0 comments
Open

Shaper play doesn't work in some cases #44

Aliaksei-Tatarynchyk opened this issue May 30, 2019 · 0 comments

Comments

@Aliaksei-Tatarynchyk
Copy link
Collaborator

Shaper play throws exception

Traceback (most recent call last):
  File "d:\env\python\python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "d:\env\python\python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "d:\Env\Python\Python37\Scripts\shaper.exe\__main__.py", line 9, in <module>
  File "d:\env\python\python37\lib\site-packages\shaper\cli.py", line 138, in main
    merge_templates(rendered_templates, arguments.out)
  File "d:\env\python\python37\lib\site-packages\shaper\renderer.py", line 70, in merge_templates
    datastructure[key] = OrderedDict((k, v) for k, v in sorted(datastructure[key].items()))
AttributeError: 'NoneType' object has no attribute 'items'

when rendering following playbooks:
playbook1.yml:

templates:
- ../templates/FE_test.tmpl
variables:
  env: fe3

FE_test.tmpl:

env: '{{ env }}'

playbook2.yml

templates:
- ../templates/FE_test2.tmpl
variables:
  env: fe
  host:
    external: &externalHost test.projects.epam.com
  apps:
    store:
    - name: store
      host: *externalHost
      config:
        atg:
          multisite:
            SiteTools:
              baseUrl: http://test.epam.com:12345

FE_test2.tmpl

env:
  '{{ env }}':
    servers:
      {% for store in apps.store %}
      '{{ env }}_{{ store.name }}':
        localconfig:
          atg:
            endeca:
              assembler:
                cartridge:
                  manager:
                    FileStoreFactory.properties:
                      {% if store.config.someconfig %}configurationPath: '{{ store.config.someconfig }}'{% endif %}
            multisite:
              SiteTools.properties:
                baseUrl: '{{ store.config.atg.multisite.SiteTools.baseUrl }}'
      {% endfor %}
Aliaksei-Tatarynchyk added a commit to Aliaksei-Tatarynchyk/shaper that referenced this issue May 31, 2019
…causes the issue with shaper play (arno49#44)

This reverts commit 6e37ec4.
Aliaksei-Tatarynchyk added a commit to Aliaksei-Tatarynchyk/shaper that referenced this issue Jun 3, 2019
…causes the issue with shaper play (arno49#44)

This reverts commit 6e37ec4.
arno49 pushed a commit that referenced this issue Jun 3, 2019
… the issue with shaper play (#44) (#45)

This reverts commit 6e37ec4.
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