Doh!!!!! 

 

‘-k’ was the culprit

 

…ill just crawl back under my rock….

 

From: <[email protected]> on behalf of Stephen Eaton 
<[email protected]>
Reply-To: <[email protected]>
Date: Thursday, 1 October 2020 at 8:58 pm
To: Ansible Project <[email protected]>
Subject: [ansible-project] How do I stop ansible-playbook asking for ssh 
password??

 

Hi All,

 

I'm trying to bootstrap some remote VMs (ubuntu1804) that are not physically 
managed by me and have only been given ssh accesses as root via ssh keys only 
i.e. no password.  I can confirm this works, i.e. I can ssh in as root with no 
password from my cli

 

using ansible 2.10.1 on macOS under python 3.8

 

I want to bootstrap these machines to get them onto our CI/CD pipeline 

 

I'm using the playbook I normally bootstrap however ansible-playbook keeps 
prompting for a password in this case. 

 

`ansible-playbook bootstrap.yml -k -extra-vars="hosts=x.x.x.x remote_user=root" 
`

 

I have also tried passing my ssh private key using  '--private-key' parameter 
to no avail.

also added `ask_pass=False` to my local ansible.cfg to no avail

 

I've successfully used this on other vms in the past that I physically manage 
however I just use the root password and then my bootstrap playbook does does 
the rest.

 

local ansible.cfg

 

[defaults]

roles_path=roles

ask_pass=false

transport=ssh

 

my playbook bootstrap.yml is:

 

- name: Bootstrap remote server for CI

hosts: '{{ hosts }}'

remote_user: '{{ user }}'

gather_facts: no

 

roles:

- role: bootstrap

 

Thanks

 

Stephen

-- 
You received this message because you are subscribed to a topic in the Google 
Groups "Ansible Project" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/ansible-project/Yo_gX6NbZp8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
[email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/87c122d0-218a-4765-84eb-a62739cc6549n%40googlegroups.com.


-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/E8622FA9-642B-4585-9C15-14D461B39B17%40strobotics.com.au.

Reply via email to