Need to make some updates to my website, a bit lost

Hello,

Our website was built with roots.io by an external company and we have been trained to make some updates and deploy them.

Today I want to update the nginx config of my development copy, so I updated wordpress_sites.yml and I am wondering how to deploy them in the vagrant machine.

I ran “ansible-playbook server.yml -e env=development” but it complains about connecting as root, and my knowledge of ansible is so limited that after some hours I still could not figure how to fix this problem.

Here is the output (johndoe is my login in the host machine running MacOS) :

PLAY [Ensure necessary variables are defined] **********************************

TASK [Ensure environment is defined] *******************************************
skipping: [localhost]

PLAY [Determine Remote User] ***************************************************

TASK [remote-user : Require manual definition of remote-user] ******************
skipping: [192.168.50.5]

TASK [remote-user : Check whether Ansible can connect as root] *****************
ok: [192.168.50.5 -> localhost]

TASK [remote-user : Set remote user for each host] *****************************
skipping: [192.168.50.5]

TASK [remote-user : Announce which user was selected] **************************
Note: Ansible will attempt connections as user = johndoe
ok: [192.168.50.5]

TASK [remote-user : Load become password] **************************************
ok: [192.168.50.5]

PLAY [Install prerequisites] ***************************************************

TASK [Install Python 2.x] ******************************************************
System info:
  Ansible 2.1.1.0; Darwin
  Trellis 0.9.8: August 14th, 2016
---------------------------------------------------
sudo: a password is required

fatal: [192.168.50.5]: FAILED! => {"changed": false, "failed": true, "rc": 1, "stderr": "sudo: a password is required\n", "stdout": "", "stdout_lines": []}

NO MORE HOSTS LEFT *************************************************************
 [WARNING]: Could not create retry file 'server.retry'.         [Errno 2] No such file or directory: ''


PLAY RECAP *********************************************************************
192.168.50.5               : ok=3    changed=0    unreachable=0    failed=1   
localhost                  : ok=0    changed=0    unreachable=0    failed=0   

Is ansible server.yml playbook the good way to update the local development server ?

Any tips how to get to the next steps are really appreciated !

Thanks

LT

For local development server changes, you’ll want to run vagrant provision.

Related docs:

4 Likes

:o

Thank you very much !

1 Like