Try to set the become related config in the playbook.yml, eg:

- hosts: <your-host-here>
  become: true
  become_user: root
  roles:
    - openwisp.openwisp2
  vars:
    # your vars here...

Log in via SSH into your VM and set the password of the user ricky with the
passwd command.

Then use:

*ansible-playbook -i hosts playbook.yml -b -k -K -u ricky*

Try this and let us know.

There are also other ways, eg:

- specify the password in the inventory file (the file we name as "hosts")
- set up public SSH key authentication and no password will be asked

I hope this helps.

Federico

On Mon, Feb 4, 2019 at 7:16 AM M Ricky Anggoro P <[email protected]>
wrote:

> I'm still got this error:
> TASK [openwisp.openwisp2 : set secret_key fact]
> ********************************
> ok: [192.168.56.2]
>
> TASK [openwisp.openwisp2 : settings.py]
> ****************************************
> ok: [192.168.56.2]
>
> TASK [openwisp.openwisp2 : migrate]
> ********************************************
> fatal: [192.168.56.2]: FAILED! => {"msg": "Incorrect su password"}
>         to retry, use: --limit
> @/home/ricky/openwisp2-ansible-playbook/playbook.retry
>
> PLAY RECAP
> *********************************************************************
> 192.168.56.2               : ok=45   changed=0    unreachable=0    failed=1
>
>
> This is command that I run:
>
> ricky@ricky:~/openwisp2-ansible-playbook$ *ansible-playbook -i hosts
> playbook.yml -b  -K --become-method=su -u ricky*
> What should I do?
>
> Pada Minggu, 03 Februari 2019 17.21.49 UTC+7, M Ricky Anggoro P menulis:
>>
>> Hi. I want to test this in VBox before install it to Raspberry Pi3. I
>> have followed this instruction:
>> https://github.com/openwisp/ansible-openwisp2#install-openwisp2-for-testing-in-a-virtualbox-vm
>>
>> Everything just normal and then I got this message:
>> TASK [openwisp.openwisp2 : settings.py]
>> ****************************************
>> ok: [192.168.56.2]
>>
>> TASK [openwisp.openwisp2 : migrate]
>> ********************************************
>> fatal: [192.168.56.2]: FAILED! => {"msg": "Incorrect su password"}
>>         to retry, use: --limit
>> @/home/ricky/openwisp2-ansible-playbook/playbook.retry
>>
>> PLAY RECAP
>> *********************************************************************
>> 192.168.56.2               : ok=45   changed=0    unreachable=0
>> failed=1
>>
>> I Dont know about it, since my user password and root password is same,
>> so I input SSH password same as root password. I run this command:
>> ansible-playbook -i hosts playbook.yml -b -k -K --become-method=su -u
>> ricky
>>
>> So please help me because I have to try this controller before I got my
>> Raspberry Pi as my Controller. Thank you
>>
> --
> You received this message because you are subscribed to the Google Groups
> "OpenWISP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to