carlosfrias / apigee-opdk-settings-cassandra

This role extracts settings for cassandra.
Apache License 2.0
0 stars 3 forks source link

Error converting to JSON #1

Open gamename opened 3 years ago

gamename commented 3 years ago

Hi Carlos,

I'm getting this error when trying to use the role:

TASK [apigee-opdk-settings-cassandra : Construct cassandra hosts configuration inventory_hostname={{ inventory_hostname }}, hostvars={{ hostvars | to_json }}] ************************************************************************************************************
Tuesday 06 April 2021  09:26:40 -0500 (0:00:01.436)       0:01:02.905 ********* 
Tuesday 06 April 2021  09:26:40 -0500 (0:00:01.436)       0:01:02.904 ********* 
fatal: [apigee_000]: FAILED! => {"msg": "Unexpected templating type error occurred on ({{ hostvars | to_json }}): Object of type Role is not JSON serializable"}
fatal: [apigee_001]: FAILED! => {"msg": "Unexpected templating type error occurred on ({{ hostvars | to_json }}): Object of type Role is not JSON serializable"}
fatal: [apigee_002]: FAILED! => {"msg": "Unexpected templating type error occurred on ({{ hostvars | to_json }}): Object of type Role is not JSON serializable"}
fatal: [apigee_003]: FAILED! => {"msg": "Unexpected templating type error occurred on ({{ hostvars | to_json }}): Object of type Role is not JSON serializable"}
fatal: [apigee_004]: FAILED! => {"msg": "Unexpected templating type error occurred on ({{ hostvars | to_json }}): Object of type Role is not JSON serializable"}

Here is my ansible information:

╰─➤  ansible --version                                                                                                                                                                                                                                                 
ansible 2.10.7
  config file = /Users/tennis/PycharmProjects/daas/Apigee-standup/5-node-implementation/ansible.cfg
  configured module search path = ['/Users/tennis/.ansible/library']
  ansible python module location = /Users/tennis/PycharmProjects/daas/venv/lib/python3.8/site-packages/ansible
  executable location = /Users/tennis/PycharmProjects/daas/venv/bin/ansible
  python version = 3.8.2 (default, Dec 21 2020, 15:06:04) [Clang 12.0.0 (clang-1200.0.32.29)]
salehmashal commented 3 years ago

@gamename did you find a work around for it?