Hello Davies,
Thanks for your support, I finally got it to work. Using the -u and -K
parameter.
One other issue im having is creating multiple directories with different
name e.g tomacat-1, tomcat-2 etc..
But i want to do this in the form of a loop. Kindly help me with the yaml
syntax.
this is what i tried
- name: Creating multiple tomcat instance
file: dest=/var/lib/tomcat-instance{1..3} state=directory
But instead of creating three directories, it creates only one with name "
tomcat-instance{1..3}"
Also i would like each of these folders to have a unique port id and
shutdown port e.g -p 8000 -c 8006
Thanks.
On Fri, Sep 25, 2015 at 4:04 PM, Dick Davies <[email protected]> wrote:
> OK, so that shows you the exact SSH command Ansible is running for you.
> If you were to paste that blue text into a shell you'll likely get the
> same error
> (could be an issue with the VM or your client side).
>
> You didn't say how you're sshing into the VM, and it seems like you're
> pushing up
> a pubkey beforehand. So it's not an approach I'm familiar with.
>
> That said we use Vagrant extensively, just to get started on building out
> a playbook.
> So a few pointers that may help.
>
>
> 1. in your Vagrantfile it's worth setting "c.ssh.insert_key = false" to
> stop Vagrant
> generating a new public key everytime the VM boots.
> This is down to a 'feature' they added to newer Vagrants
> (gory details at : https://github.com/mitchellh/vagrant/pull/4707 )
>
> 2. 'vagrant ssh foo' is generally not the same as 'ssh vagrant@foo' -
> seems like
> Vagrant uses a different interface to SSH in and provision things
> (this may
> just be images I've used but it's really confusing if you aren't aware)
>
> 3. With the c.ssh.insert_key setting fixed as in 1., all you normally need
> is to
> set a couple of vars in your inventory so Ansible will use the key and
> user
> that Vagrant expects
>
> ------------------------------------
> $ head vagrant/hosts
> [all:vars]
> ansible_ssh_user=vagrant
> ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key
> ------------------------------------
>
> It might help to look at a working example, one of my public playbooks is
> here if that helps:
>
> https://github.com/rasputnik/kafka-poc
>
>
> On 25 September 2015 at 14:50, DEBORAH AKUOKO <
> [email protected]> wrote:
>
>> Hello Dick,
>>
>> Please see attached the screenshot of what I get when i rerun with -vvv.
>> I seem to get the same permission denied error, but this time with some
>> extra details in blue font.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Fri, Sep 25, 2015 at 1:35 PM, Dick Davies <[email protected]>
>> wrote:
>>
>>> what do you see when you rerun with '-vvvv' as the error suggests?
>>>
>>> On 25 September 2015 at 14:30, DEBORAH AKUOKO <
>>> [email protected]> wrote:
>>>
>>>> I have a vagrant vm which i can successfully ping and ssh into from my
>>>> host machine and vice versa.
>>>> But I am not able to run ansible ping to the vagrant box,
>>>> nether an i able to run my playbook which connects to the vagrant box.
>>>>
>>>> Please find the snapshot attached.
>>>>
>>>>
>>>>
>>>>
>>>> <https://lh3.googleusercontent.com/-95ZgKoJ-fd0/VgVMUumQlUI/AAAAAAAAIhc/QsrKywjy0f8/s1600/ansibleplaybook-fail-ssh.png>
>>>>
>>>>
>>>> --
>>>> 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 post to this group, send email to [email protected].
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/ansible-project/097d54de-f0a0-481a-ab61-f546acb7e937%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/ansible-project/097d54de-f0a0-481a-ab61-f546acb7e937%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> --
>>> 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/RWjHC0gyXPA/unsubscribe
>>> .
>>> To unsubscribe from this group and all its topics, send an email to
>>> [email protected].
>>> To post to this group, send email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/ansible-project/CAK5eLPRVwYpv92dQOKGQ9VTaN-_ddrzJ0K7RLR3gxzAbaxZbTQ%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/ansible-project/CAK5eLPRVwYpv92dQOKGQ9VTaN-_ddrzJ0K7RLR3gxzAbaxZbTQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> 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 [email protected].
>> To post to this group, send email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/CA%2Bu%2B6uk6Y5%3DfEv7%2BWBypgcA-22gx6gSFUMGyi9AGddO9Mevdvg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/ansible-project/CA%2Bu%2B6uk6Y5%3DfEv7%2BWBypgcA-22gx6gSFUMGyi9AGddO9Mevdvg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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/RWjHC0gyXPA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAK5eLPQCqTkJww8B8TYHX8w8LkPEZkKYuF3XNJxe9tzf1A3Vqg%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAK5eLPQCqTkJww8B8TYHX8w8LkPEZkKYuF3XNJxe9tzf1A3Vqg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> 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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CA%2Bu%2B6un%2Bc2tGK_M4XdeYxuRXKMFYZ0pnezHfDbtMSRq2HanJ%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.