Roots Discourse

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


Our website was built with 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: []

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

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

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

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

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

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

fatal: []: 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 *********************************************************************               : 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 !



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

Related docs:



Thank you very much !

1 Like