Hiya,
I’m able to provision new GCE instances with ansible gce, but I can’t pass authentication when ansible pinging with dynamic GCE inventory script gce.py. I get “Permission denied (publickey).”
The gce.py script works fine, solo, so I figure changes may be required in ansible.cfg, but what?
Any tips or working configs for the gce modules?
Thanks, G
The gce.py script works fine, solo, so I figure changes may be required in ansible.cfg, but what?
…ended up with this:
file: ansible.cfg
[defaults]
remote_user= <my_gce_user_name>
[ssh_connection]
ssh_args = -o UserKnownHostsFile=/dev/null -o CheckHostIP=no -o StrictHostKeyChecking=no -i some_path_to/google_compute_engine
…duplicated the SSH keys i’d generated to associate with my GCE account using the gcutil CLI – google_compute_engine and google_compute_engine.pub – those have to be on every additional client used…
…which setup works with something like the following:
GCE_INI_PATH=path_to/gce.ini ansible all -i hosts/ -m setup
(Other new GCE users might well note there is no default root user access to GCE instances, so the remote_user=your_gce_user_name specification is key.)
G