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

Error: when statements should not include jinja2 templating delimiters #23

Open
maiwww opened this issue Jun 4, 2018 · 3 comments
Open

Comments

@maiwww
Copy link

maiwww commented Jun 4, 2018

Hello,

When I ran "ansible-playbook -i inventory/ -e orchestrator=openstack playbooks/install_openstack.yml
", I got an error as below.

TASK [keystone : Creating admin project, user, role, service, and endpoint] ****************************
 [WARNING]: when statements should not include jinja2 templating delimiters such as {{ }} or {% %}.
Found: {{ (keystone_bootstrap.stdout | from_json).changed }}

fatal: [172.27.116.135]: FAILED! => {"msg": "The conditional check '{{ (keystone_bootstrap.stdout | from_json).changed }}' failed. The error was: Expecting ',' delimiter: line 1 column 133 (char 132)"}

contrail-kolla-ansible/ansible/roles/keystone/tasks/register.yml

- name: Creating admin project, user, role, service, and endpoint
  command: docker exec keystone kolla_keystone_bootstrap {{ openstack_auth.username }} {{ openstack_auth.password }} {{ openstack_auth.project_name }} admin {{ keystone_admin_url }} {{ keystone_internal_url }} {{ keystone_public_url }} {{ openstack_region_name }}
  register: keystone_bootstrap
  changed_when: "{{ (keystone_bootstrap.stdout | from_json).changed }}"
  failed_when: "{{ (keystone_bootstrap.stdout | from_json).failed }}"
  run_once: True

It seems that ansible doesn't allow jinja2 format for parameters. I installed ansible-2.4.2.0.

Thank you.

@Andrey-mp
Copy link
Member

can you please share your instances.yaml?

we haven't seen such issue previously.

And please note - right place for bugs/issue is LP - https://bugs.launchpad.net/juniperopenstack/?orderby=-id&start=0

@maiwww
Copy link
Author

maiwww commented Jun 4, 2018

Thank you for prompt response.

instances.yaml:

provider_config:
  bms:
    ssh_pwd: lab
    ssh_user: root
    ntpserver: 210.173.160.27
    domainsuffix: localdomain
#    ssh_public_key: /home/centos/.ssh/id_rsa.pub  # Optional. Not needed if ssh password is used.
#    ssh_private_key: /home/centos/.ssh/id_rsa     # Optional. Not needed if ssh password is used.
instances:
  bms1:
    provider: bms
    ip: 172.27.116.135
    roles:
      config_database:
      config:
      control:
      analytics_database:
      analytics:
      webui:
      openstack_control:
      openstack_network:
        network_interface: ens3
      openstack_storage:
      openstack_monitoring:
      vrouter:
        VROUTER_GATEWAY: 172.27.116.1
        PHYSICAL_INTERFACE: ens3
      openstack_compute:
kolla_config:
  customize:
    nova.conf: |
      [libvirt]
      virt_type=kvm
      cpu_mode=host-passthrough
  kolla_globals:
    openstack_release: ocata
    enable_haproxy: no
    enable_swift: no
    enable_barbican: no
    enable_heat: no
    enable_ironic: no
    kolla_internal_vip_interface: ens3
    kolla_internal_vip_address: 172.27.116.135
    # heat/templates/heat.conf.j2:api_server = {{ contrail_api_interface_address }}
    contrail_api_interface_address: 172.27.116.135
    # neutron/templates/ContrailPlugin.ini.j2:api_server_ip = {{ opencontrail_api_server_ip }}
    opencontrail_api_server_ip: 172.27.116.135
  kolla_passwords:
    keystone_admin_password: lab
global_configuration:
  CONTAINER_REGISTRY: opencontrailnightly
#  REGISTRY_PRIVATE_INSECURE: True
#  CONTAINER_REGISTRY_USERNAME: YourRegistryUser
#  CONTAINER_REGISTRY_PASSWORD: YourRegistryPassword
contrail_configuration:
  CONTRAIL_VERSION: ocata-master-117
  UPGRADE_KERNEL: true
  CLOUD_ORCHESTRATOR: openstack
  CONTROLLER_NODES: 172.27.116.135
  CONTROL_NODES: 172.27.116.135
  ANALYTICSDB_NODES: 172.27.116.135
  WEBUI_NODES: 172.27.116.135
  ANALYTICS_NODES: 172.27.116.135
  CONFIGDB_NODES: 172.27.116.135
  CONFIG_NODES: 172.27.116.135
  RABBITMQ_NODE_PORT: 5673
  AUTH_MODE: keystone
  KEYSTONE_AUTH_URL_VERSION: /v3
  KEYSTONE_AUTH_HOST: 172.27.116.135

@maiwww
Copy link
Author

maiwww commented Jun 5, 2018

I also reported this at the URL.

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

2 participants