Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

ValueError: No JSON object could be decoded #69

Open
piwi3910 opened this issue Jul 30, 2017 · 1 comment
Open

ValueError: No JSON object could be decoded #69

piwi3910 opened this issue Jul 30, 2017 · 1 comment

Comments

@piwi3910
Copy link

when the dynamic inventory script runs, i get the following error:

piwi@jumphost:~/Documents/kubebify$ ansible all -i inventory/dev --list-hosts
ERROR! Attempted to execute "/home/piwi/Documents/kubebify/inventory/dev/terraform_inventory.sh" as inventory script: Inventory script (/home/piwi/Documents/kubebify/inventory/dev/terraform_inventory.sh) had an execution error: Traceback (most recent call last):
File "/home/piwi/.local/bin/ati", line 11, in
load_entry_point('ati==0.4.4.dev0', 'console_scripts', 'ati')()
File "/home/piwi/.local/venvs/ati/local/lib/python2.7/site-packages/ati/cli.py", line 81, in cli
output = query_list(hosts)
File "/home/piwi/.local/venvs/ati/local/lib/python2.7/site-packages/ati/terraform.py", line 940, in query_list
for name, attrs, hostgroups in hosts:
File "/home/piwi/.local/venvs/ati/local/lib/python2.7/site-packages/ati/terraform.py", line 106, in iterhosts
for module_name, key, resource in resources:
File "/home/piwi/.local/venvs/ati/local/lib/python2.7/site-packages/ati/terraform.py", line 54, in iterresources
for source in sources:
File "/home/piwi/.local/venvs/ati/local/lib/python2.7/site-packages/ati/terraform.py", line 48, in iter_states
yield json.loads(output[start_index:])
File "/usr/lib/python2.7/json/init.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

@piwi3910
Copy link
Author

piwi@jumphost:~/Documents/kubebify/terraform/dev/.terraform$ cat terraform.tfstate
{
"version": 3,
"terraform_version": "0.9.11",
"serial": 0,
"lineage": "4ce923b6-2e57-41ec-b70d-002a254c6906",
"modules": [
{
"path": [
"root"
],
"outputs": {},
"resources": {
"vsphere_virtual_machine.master01": {
"type": "vsphere_virtual_machine",
"depends_on": [],
"primary": {
"id": "master01",
"attributes": {
"cluster": "PROD",
"datacenter": "LAB",
"detach_unknown_disks_on_delete": "false",
"disk.#": "1",
"disk.3312469496.bootable": "false",
"disk.3312469496.controller_type": "scsi",
"disk.3312469496.datastore": "ISCSI_HYBRID_THIN_SAN01_PROD10",
"disk.3312469496.iops": "0",
"disk.3312469496.keep_on_remove": "false",
"disk.3312469496.key": "0",
"disk.3312469496.name": "",
"disk.3312469496.size": "0",
"disk.3312469496.template": "PROD_Centos7",
"disk.3312469496.type": "lazy",
"disk.3312469496.uuid": "",
"disk.3312469496.vmdk": "",
"dns_servers.#": "1",
"dns_servers.0": "192.168.0.1",
"dns_suffixes.#": "1",
"dns_suffixes.0": "watteel.lan",
"domain": "watteel.lan",
"enable_disk_uuid": "false",
"id": "master01",
"linked_clone": "false",
"memory": "2048",
"memory_reservation": "0",
"moid": "vm-363",
"name": "master01",
"network_interface.#": "1",
"network_interface.0.adapter_type": "",
"network_interface.0.ip_address": "",
"network_interface.0.ipv4_address": "192.168.0.71",
"network_interface.0.ipv4_gateway": "192.168.0.1",
"network_interface.0.ipv4_prefix_length": "24",
"network_interface.0.ipv6_address": "fe80::250:56ff:fe8e:f7d9",
"network_interface.0.ipv6_gateway": "fe80::a35:71ff:fe00:7e46",
"network_interface.0.ipv6_prefix_length": "64",
"network_interface.0.label": "DV-VLAN1",
"network_interface.0.mac_address": "00:50:56:8e:f7:d9",
"network_interface.0.subnet_mask": "",
"resource_pool": "PROD/Resources/KUBERNETES",
"skip_customization": "false",
"time_zone": "Asia/Dubai",
"uuid": "420e00fd-1719-90e9-427c-5ec03ea7d330",
"vcpu": "2"
},
"meta": {
"schema_version": "1"
},
"tainted": false
},
"deposed": [],
"provider": ""
},
"vsphere_virtual_machine.master02": {
"type": "vsphere_virtual_machine",
"depends_on": [],
"primary": {
"id": "master02",
"attributes": {
"cluster": "PROD",
"datacenter": "LAB",
"detach_unknown_disks_on_delete": "false",
"disk.#": "1",
"disk.3312469496.bootable": "false",
"disk.3312469496.controller_type": "scsi",
"disk.3312469496.datastore": "ISCSI_HYBRID_THIN_SAN01_PROD10",
"disk.3312469496.iops": "0",
"disk.3312469496.keep_on_remove": "false",
"disk.3312469496.key": "0",
"disk.3312469496.name": "",
"disk.3312469496.size": "0",
"disk.3312469496.template": "PROD_Centos7",
"disk.3312469496.type": "lazy",
"disk.3312469496.uuid": "",
"disk.3312469496.vmdk": "",
"dns_servers.#": "1",
"dns_servers.0": "192.168.0.1",
"dns_suffixes.#": "1",
"dns_suffixes.0": "watteel.lan",
"domain": "watteel.lan",
"enable_disk_uuid": "false",
"id": "master02",
"linked_clone": "false",
"memory": "2048",
"memory_reservation": "0",
"moid": "vm-368",
"name": "master02",
"network_interface.#": "1",
"network_interface.0.adapter_type": "",
"network_interface.0.ip_address": "",
"network_interface.0.ipv4_address": "192.168.0.72",
"network_interface.0.ipv4_gateway": "192.168.0.1",
"network_interface.0.ipv4_prefix_length": "24",
"network_interface.0.ipv6_address": "fe80::250:56ff:fe8e:6430",
"network_interface.0.ipv6_gateway": "fe80::a35:71ff:fe00:7e46",
"network_interface.0.ipv6_prefix_length": "64",
"network_interface.0.label": "DV-VLAN1",
"network_interface.0.mac_address": "00:50:56:8e:64:30",
"network_interface.0.subnet_mask": "",
"resource_pool": "PROD/Resources/KUBERNETES",
"skip_customization": "false",
"time_zone": "Asia/Dubai",
"uuid": "420e87ef-7a56-30c7-702d-9f841c4ad6a0",
"vcpu": "2"
},
"meta": {
"schema_version": "1"
},
"tainted": false
},
"deposed": [],
"provider": ""
},
"vsphere_virtual_machine.master03": {
"type": "vsphere_virtual_machine",
"depends_on": [],
"primary": {
"id": "master03",
"attributes": {
"cluster": "PROD",
"datacenter": "LAB",
"detach_unknown_disks_on_delete": "false",
"disk.#": "1",
"disk.3312469496.bootable": "false",
"disk.3312469496.controller_type": "scsi",
"disk.3312469496.datastore": "ISCSI_HYBRID_THIN_SAN01_PROD10",
"disk.3312469496.iops": "0",
"disk.3312469496.keep_on_remove": "false",
"disk.3312469496.key": "0",
"disk.3312469496.name": "",
"disk.3312469496.size": "0",
"disk.3312469496.template": "PROD_Centos7",
"disk.3312469496.type": "lazy",
"disk.3312469496.uuid": "",
"disk.3312469496.vmdk": "",
"dns_servers.#": "1",
"dns_servers.0": "192.168.0.1",
"dns_suffixes.#": "1",
"dns_suffixes.0": "watteel.lan",
"domain": "watteel.lan",
"enable_disk_uuid": "false",
"id": "master03",
"linked_clone": "false",
"memory": "2048",
"memory_reservation": "0",
"moid": "vm-366",
"name": "master03",
"network_interface.#": "1",
"network_interface.0.adapter_type": "",
"network_interface.0.ip_address": "",
"network_interface.0.ipv4_address": "192.168.0.73",
"network_interface.0.ipv4_gateway": "192.168.0.1",
"network_interface.0.ipv4_prefix_length": "24",
"network_interface.0.ipv6_address": "fe80::250:56ff:fe8e:d0d4",
"network_interface.0.ipv6_gateway": "fe80::a35:71ff:fe00:7e46",
"network_interface.0.ipv6_prefix_length": "64",
"network_interface.0.label": "DV-VLAN1",
"network_interface.0.mac_address": "00:50:56:8e:d0:d4",
"network_interface.0.subnet_mask": "",
"resource_pool": "PROD/Resources/KUBERNETES",
"skip_customization": "false",
"time_zone": "Asia/Dubai",
"uuid": "420eee5d-c8f4-c54d-07c5-1285b0377b60",
"vcpu": "2"
},
"meta": {
"schema_version": "1"
},
"tainted": false
},
"deposed": [],
"provider": ""
},
"vsphere_virtual_machine.slave01": {
"type": "vsphere_virtual_machine",
"depends_on": [],
"primary": {
"id": "slave01",
"attributes": {
"cluster": "PROD",
"datacenter": "LAB",
"detach_unknown_disks_on_delete": "false",
"disk.#": "1",
"disk.3312469496.bootable": "false",
"disk.3312469496.controller_type": "scsi",
"disk.3312469496.datastore": "ISCSI_HYBRID_THIN_SAN01_PROD10",
"disk.3312469496.iops": "0",
"disk.3312469496.keep_on_remove": "false",
"disk.3312469496.key": "0",
"disk.3312469496.name": "",
"disk.3312469496.size": "0",
"disk.3312469496.template": "PROD_Centos7",
"disk.3312469496.type": "lazy",
"disk.3312469496.uuid": "",
"disk.3312469496.vmdk": "",
"dns_servers.#": "1",
"dns_servers.0": "192.168.0.1",
"dns_suffixes.#": "1",
"dns_suffixes.0": "watteel.lan",
"domain": "watteel.lan",
"enable_disk_uuid": "false",
"id": "slave01",
"linked_clone": "false",
"memory": "8192",
"memory_reservation": "0",
"moid": "vm-364",
"name": "slave01",
"network_interface.#": "1",
"network_interface.0.adapter_type": "",
"network_interface.0.ip_address": "",
"network_interface.0.ipv4_address": "192.168.0.75",
"network_interface.0.ipv4_gateway": "192.168.0.1",
"network_interface.0.ipv4_prefix_length": "24",
"network_interface.0.ipv6_address": "fe80::250:56ff:fe8e:3ae3",
"network_interface.0.ipv6_gateway": "fe80::a35:71ff:fe00:7e46",
"network_interface.0.ipv6_prefix_length": "64",
"network_interface.0.label": "DV-VLAN1",
"network_interface.0.mac_address": "00:50:56:8e:3a:e3",
"network_interface.0.subnet_mask": "",
"resource_pool": "PROD/Resources/KUBERNETES",
"skip_customization": "false",
"time_zone": "Asia/Dubai",
"uuid": "420e4f5e-06a6-ad99-7ae3-02930eec6f72",
"vcpu": "4"
},
"meta": {
"schema_version": "1"
},
"tainted": false
},
"deposed": [],
"provider": ""
},
"vsphere_virtual_machine.slave02": {
"type": "vsphere_virtual_machine",
"depends_on": [],
"primary": {
"id": "slave02",
"attributes": {
"cluster": "PROD",
"datacenter": "LAB",
"detach_unknown_disks_on_delete": "false",
"disk.#": "1",
"disk.3312469496.bootable": "false",
"disk.3312469496.controller_type": "scsi",
"disk.3312469496.datastore": "ISCSI_HYBRID_THIN_SAN01_PROD10",
"disk.3312469496.iops": "0",
"disk.3312469496.keep_on_remove": "false",
"disk.3312469496.key": "0",
"disk.3312469496.name": "",
"disk.3312469496.size": "0",
"disk.3312469496.template": "PROD_Centos7",
"disk.3312469496.type": "lazy",
"disk.3312469496.uuid": "",
"disk.3312469496.vmdk": "",
"dns_servers.#": "1",
"dns_servers.0": "192.168.0.1",
"dns_suffixes.#": "1",
"dns_suffixes.0": "watteel.lan",
"domain": "watteel.lan",
"enable_disk_uuid": "false",
"id": "slave02",
"linked_clone": "false",
"memory": "8192",
"memory_reservation": "0",
"moid": "vm-365",
"name": "slave02",
"network_interface.#": "1",
"network_interface.0.adapter_type": "",
"network_interface.0.ip_address": "",
"network_interface.0.ipv4_address": "192.168.0.76",
"network_interface.0.ipv4_gateway": "192.168.0.1",
"network_interface.0.ipv4_prefix_length": "24",
"network_interface.0.ipv6_address": "fe80::250:56ff:fe8e:d6b8",
"network_interface.0.ipv6_gateway": "fe80::a35:71ff:fe00:7e46",
"network_interface.0.ipv6_prefix_length": "64",
"network_interface.0.label": "DV-VLAN1",
"network_interface.0.mac_address": "00:50:56:8e:d6:b8",
"network_interface.0.subnet_mask": "",
"resource_pool": "PROD/Resources/KUBERNETES",
"skip_customization": "false",
"time_zone": "Asia/Dubai",
"uuid": "420ece29-5c1e-e38d-a558-f6556adcd9de",
"vcpu": "4"
},
"meta": {
"schema_version": "1"
},
"tainted": false
},
"deposed": [],
"provider": ""
},
"vsphere_virtual_machine.slave03": {
"type": "vsphere_virtual_machine",
"depends_on": [],
"primary": {
"id": "slave03",
"attributes": {
"cluster": "PROD",
"datacenter": "LAB",
"detach_unknown_disks_on_delete": "false",
"disk.#": "1",
"disk.3312469496.bootable": "false",
"disk.3312469496.controller_type": "scsi",
"disk.3312469496.datastore": "ISCSI_HYBRID_THIN_SAN01_PROD10",
"disk.3312469496.iops": "0",
"disk.3312469496.keep_on_remove": "false",
"disk.3312469496.key": "0",
"disk.3312469496.name": "",
"disk.3312469496.size": "0",
"disk.3312469496.template": "PROD_Centos7",
"disk.3312469496.type": "lazy",
"disk.3312469496.uuid": "",
"disk.3312469496.vmdk": "",
"dns_servers.#": "1",
"dns_servers.0": "192.168.0.1",
"dns_suffixes.#": "1",
"dns_suffixes.0": "watteel.lan",
"domain": "watteel.lan",
"enable_disk_uuid": "false",
"id": "slave03",
"linked_clone": "false",
"memory": "8192",
"memory_reservation": "0",
"moid": "vm-369",
"name": "slave03",
"network_interface.#": "1",
"network_interface.0.adapter_type": "",
"network_interface.0.ip_address": "",
"network_interface.0.ipv4_address": "192.168.0.77",
"network_interface.0.ipv4_gateway": "192.168.0.1",
"network_interface.0.ipv4_prefix_length": "24",
"network_interface.0.ipv6_address": "fe80::250:56ff:fe8e:d9cd",
"network_interface.0.ipv6_gateway": "fe80::a35:71ff:fe00:7e46",
"network_interface.0.ipv6_prefix_length": "64",
"network_interface.0.label": "DV-VLAN1",
"network_interface.0.mac_address": "00:50:56:8e:d9:cd",
"network_interface.0.subnet_mask": "",
"resource_pool": "PROD/Resources/KUBERNETES",
"skip_customization": "false",
"time_zone": "Asia/Dubai",
"uuid": "420eb934-3ce6-b9fb-eef4-0d3edfceb151",
"vcpu": "4"
},
"meta": {
"schema_version": "1"
},
"tainted": false
},
"deposed": [],
"provider": ""
},
"vsphere_virtual_machine.slave04": {
"type": "vsphere_virtual_machine",
"depends_on": [],
"primary": {
"id": "slave04",
"attributes": {
"cluster": "PROD",
"datacenter": "LAB",
"detach_unknown_disks_on_delete": "false",
"disk.#": "1",
"disk.3312469496.bootable": "false",
"disk.3312469496.controller_type": "scsi",
"disk.3312469496.datastore": "ISCSI_HYBRID_THIN_SAN01_PROD10",
"disk.3312469496.iops": "0",
"disk.3312469496.keep_on_remove": "false",
"disk.3312469496.key": "0",
"disk.3312469496.name": "",
"disk.3312469496.size": "0",
"disk.3312469496.template": "PROD_Centos7",
"disk.3312469496.type": "lazy",
"disk.3312469496.uuid": "",
"disk.3312469496.vmdk": "",
"dns_servers.#": "1",
"dns_servers.0": "192.168.0.1",
"dns_suffixes.#": "1",
"dns_suffixes.0": "watteel.lan",
"domain": "watteel.lan",
"enable_disk_uuid": "false",
"id": "slave04",
"linked_clone": "false",
"memory": "8192",
"memory_reservation": "0",
"moid": "vm-367",
"name": "slave04",
"network_interface.#": "1",
"network_interface.0.adapter_type": "",
"network_interface.0.ip_address": "",
"network_interface.0.ipv4_address": "192.168.0.78",
"network_interface.0.ipv4_gateway": "192.168.0.1",
"network_interface.0.ipv4_prefix_length": "24",
"network_interface.0.ipv6_address": "fe80::250:56ff:fe8e:cec0",
"network_interface.0.ipv6_gateway": "fe80::a35:71ff:fe00:7e46",
"network_interface.0.ipv6_prefix_length": "64",
"network_interface.0.label": "DV-VLAN1",
"network_interface.0.mac_address": "00:50:56:8e:ce:c0",
"network_interface.0.subnet_mask": "",
"resource_pool": "PROD/Resources/KUBERNETES",
"skip_customization": "false",
"time_zone": "Asia/Dubai",
"uuid": "420e2bf7-3ecc-263d-5a79-d86b5caa6e97",
"vcpu": "4"
},
"meta": {
"schema_version": "1"
},
"tainted": false
},
"deposed": [],
"provider": ""
}
},
"depends_on": []
}
]
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant