abdulrahim umar
2015-03-13 13:24:53 UTC
Having an issue when using the dynamic inventory gce.py script with a
bastion box . ssh config proxying all connections through the bastion:
ansible.cf looks like this :
[defaults]
host_key_checking=False
forks=11
ask_sudo_pass=False
timeout=10
[ssh_connection]
ssh_args = -o ControlPersist=15m -F ssh.config -q
scp_if_ssh = True
control_path = ~/.ssh/mux-%%r@%%h:%%p
pipelining=True
and in the ssh.config:
Host bastion
User myuser
HostName XX.XX.XX.XX
ProxyCommand none
IdentityFile credentials/mykey.pem
BatchMode yes
PasswordAuthentication no
Host *
ServerAliveInterval 60
TCPKeepAlive yes
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
ProxyCommand ssh -q -A ***@XX.XX.XX.XX -i
credentials/service -o StrictHostKeyChecking=no nc %h %p
ControlMaster auto
ControlPath ~/.ssh/mux-%r@%h:%p
ControlPersist 8h
IdentityFile credentials/myotherkey.pem
User myuser
the inventory subdir contains the gce.ini and gce.py files which was
working before , however trying to run any playbook from this morning
results in the following error:
sh-3.2# ansible-playbook prdblb.yml -i inventory/ -vvvv
bastion box . ssh config proxying all connections through the bastion:
ansible.cf looks like this :
[defaults]
host_key_checking=False
forks=11
ask_sudo_pass=False
timeout=10
[ssh_connection]
ssh_args = -o ControlPersist=15m -F ssh.config -q
scp_if_ssh = True
control_path = ~/.ssh/mux-%%r@%%h:%%p
pipelining=True
and in the ssh.config:
Host bastion
User myuser
HostName XX.XX.XX.XX
ProxyCommand none
IdentityFile credentials/mykey.pem
BatchMode yes
PasswordAuthentication no
Host *
ServerAliveInterval 60
TCPKeepAlive yes
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
ProxyCommand ssh -q -A ***@XX.XX.XX.XX -i
credentials/service -o StrictHostKeyChecking=no nc %h %p
ControlMaster auto
ControlPath ~/.ssh/mux-%r@%h:%p
ControlPersist 8h
IdentityFile credentials/myotherkey.pem
User myuser
the inventory subdir contains the gce.ini and gce.py files which was
working before , however trying to run any playbook from this morning
results in the following error:
sh-3.2# ansible-playbook prdblb.yml -i inventory/ -vvvv
File "/usr/local/bin/ansible-playbook", line 326, in <module>
sys.exit(main(sys.argv[1:]))
File "/usr/local/bin/ansible-playbook", line 162, in main
inventory = ansible.inventory.Inventory(options.inventory,
vault_password=vault_pass)
File "/Library/Python/2.7/site-packages/ansible/inventory/__init__.py",
line 100, in __init__
self.parser = InventoryDirectory(filename=host_list)
File "/Library/Python/2.7/site-packages/ansible/inventory/dir.py", line
56, in __init__
parser = InventoryScript(filename=fullpath)
File "/Library/Python/2.7/site-packages/ansible/inventory/script.py",
line 49, in __init__
self.groups = self._parse(stderr)
File "/Library/Python/2.7/site-packages/ansible/inventory/script.py",
line 57, in _parse
self.raw = utils.parse_json(self.data)
File "/Library/Python/2.7/site-packages/ansible/utils/__init__.py", line
552, in parse_json
results = json.loads(data)
File "/Library/Python/2.7/site-packages/simplejson/__init__.py", line
505, in loads
return _default_decoder.decode(s)
File "/Library/Python/2.7/site-packages/simplejson/decoder.py", line
370, in decode
obj, end = self.raw_decode(s)
File "/Library/Python/2.7/site-packages/simplejson/decoder.py", line
400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char
0)
sys.exit(main(sys.argv[1:]))
File "/usr/local/bin/ansible-playbook", line 162, in main
inventory = ansible.inventory.Inventory(options.inventory,
vault_password=vault_pass)
File "/Library/Python/2.7/site-packages/ansible/inventory/__init__.py",
line 100, in __init__
self.parser = InventoryDirectory(filename=host_list)
File "/Library/Python/2.7/site-packages/ansible/inventory/dir.py", line
56, in __init__
parser = InventoryScript(filename=fullpath)
File "/Library/Python/2.7/site-packages/ansible/inventory/script.py",
line 49, in __init__
self.groups = self._parse(stderr)
File "/Library/Python/2.7/site-packages/ansible/inventory/script.py",
line 57, in _parse
self.raw = utils.parse_json(self.data)
File "/Library/Python/2.7/site-packages/ansible/utils/__init__.py", line
552, in parse_json
results = json.loads(data)
File "/Library/Python/2.7/site-packages/simplejson/__init__.py", line
505, in loads
return _default_decoder.decode(s)
File "/Library/Python/2.7/site-packages/simplejson/decoder.py", line
370, in decode
obj, end = self.raw_decode(s)
File "/Library/Python/2.7/site-packages/simplejson/decoder.py", line
400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char
0)
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/50659983-c018-4964-b7a3-84249b26ee00%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/50659983-c018-4964-b7a3-84249b26ee00%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.