-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
Hello,
Terraform 0.12.17
Ansible 2.9.6
ansible-playbook -i /etc/ansible/terraform.py play/test.yml
[WARNING]: * Failed to parse /etc/ansible/terraform.py with script plugin: Inventory script (/etc/ansible/terraform.py) had an execution error: Traceback (most recent call last):
File "/etc/ansible/terraform.py", line 395, in _main tfstate = TerraformState(_execute_shell()) File "/etc/ansible/terraform.py", line 390, in _execute_shell return
json.loads(out_cmd, encoding=encoding) File "/usr/lib/python3.6/json/__init__.py", line 354, in loads return _default_decoder.decode(s) File
"/usr/lib/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[WARNING]: * Failed to parse /etc/ansible/terraform.py with ini plugin: /etc/ansible/terraform.py:3: Error parsing host definition ''''': No closing quotation
[WARNING]: Unable to parse /etc/ansible/terraform.py as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
Already do chmod +x
Part of my tfstate:
"mode": "managed",
"type": "ansible_host",
"name": "wordpress01",
"provider": "provider.ansible",
"instances": [
{
"schema_version": 0,
"attributes": {
"groups": [
"wordpress"
],
"id": "wordpress01",
"inventory_hostname": "wordpress01",
"variable_priority": 50,
"vars": {
"ansible_connection": "lxd"
}
}
Where is my error?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels