I have managed to fix a problem. My web_user
was set as example
in trellis/group_vars/staging/main.yml
. Once I corrected it to {my_user}
I was able to progress further in the deployment.
Now I am getting the following error:
TASK [deploy : Initialize] ******************************************************************************************************************************************************************************************************
task path: /Users/{my_name}/Desktop/{site_folder}/{my_site}/trellis/roles/deploy/tasks/initialize.yml:16
Using module file /Users/{my_name}/Desktop/{site_folder}/a210p396/lib/python3.9/site-packages/ansible/modules/web_infrastructure/deploy_helper.py
Pipelining is enabled.
<{staging_ip}> ESTABLISH SSH CONNECTION FOR USER: {my_user}
<{staging_ip}> SSH: EXEC ssh -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=41584 -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ‘User=“{my_user}”’ -o ConnectTimeout=10 -o HostKeyAlgorithms=ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,ssh-rsa -o ControlPath=/Users/{my_name}/.ansible/cp/b77ed27891 {staging_ip} ‘/bin/sh -c ‘"’"’/usr/bin/python && sleep 0’“'”‘’
<{staging_ip}> (1, b’‘, b’Traceback (most recent call last):\n File “”, line 102, in \n File “”, line 94, in _ansiballz_main\n File “”, line 40, in invoke_module\n File “/usr/lib/python2.7/runpy.py”, line 188, in run_module\n fname, loader, pkg_name)\n File “/usr/lib/python2.7/runpy.py”, line 82, in _run_module_code\n mod_name, mod_fname, mod_loader, pkg_name)\n File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code\n exec code in run_globals\n File “/tmp/ansible_deploy_helper_payload_TJb5QS/ansible_deploy_helper_payload.zip/ansible/modules/web_infrastructure/deploy_helper.py”, line 521, in \n File “/tmp/ansible_deploy_helper_payload_TJb5QS/ansible_deploy_helper_payload.zip/ansible/modules/web_infrastructure/deploy_helper.py”, line 482, in main\n File “/tmp/ansible_deploy_helper_payload_TJb5QS/ansible_deploy_helper_payload.zip/ansible/modules/web_infrastructure/deploy_helper.py”, line 344, in create_path\n File “/usr/lib/python2.7/os.py”, line 150, in makedirs\n makedirs(head, mode)\n File “/usr/lib/python2.7/os.py”, line 157, in makedirs\n mkdir(name, mode)\nOSError: [Errno 13] Permission denied: '/www/{my_user}_123'\n’)
<{staging_ip}> Failed to connect to the host via ssh: Traceback (most recent call last):
File “”, line 102, in
File “”, line 94, in _ansiballz_main
File “”, line 40, in invoke_module
File “/usr/lib/python2.7/runpy.py”, line 188, in run_module
fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 82, in _run_module_code
mod_name, mod_fname, mod_loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/tmp/ansible_deploy_helper_payload_TJb5QS/ansible_deploy_helper_payload.zip/ansible/modules/web_infrastructure/deploy_helper.py”, line 521, in
File “/tmp/ansible_deploy_helper_payload_TJb5QS/ansible_deploy_helper_payload.zip/ansible/modules/web_infrastructure/deploy_helper.py”, line 482, in main
File “/tmp/ansible_deploy_helper_payload_TJb5QS/ansible_deploy_helper_payload.zip/ansible/modules/web_infrastructure/deploy_helper.py”, line 344, in create_path
File “/usr/lib/python2.7/os.py”, line 150, in makedirs
makedirs(head, mode)
File “/usr/lib/python2.7/os.py”, line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: ‘/www/{my_user}_123’
I can ssh in using the same user, ip, and port from the machine I am deploying from.
I am deploying into a fresh staging site.
Also, if I ssh in as the same user I am able to create directories in the command line.
Not sure if this is helpful, bu these are the results of the previous Tasks:
PLAY [Ensure necessary variables are defined] ********************************************************************************************
[WARNING]: Failure using method (v2_playbook_on_play_start) in callback plugin (<ansible.plugins.callback.vars.CallbackModule object at 0x10a8082b0>): ‘AnsibleUnicode’ object has no attribute ‘get_groups’
skipping: no hosts matched
PLAY [Test Connection] ********************************************************************************************
META: ran handlers
TASK [connection : Require manual definition of remote-user] ********************************************************************************************
skipping: [kinsta_staging] => {
“changed”: false,
“skip_reason”: “Conditional result was False”
}
TASK [connection : Specify preferred HostKeyAlgorithms for unknown hosts] ********************************************************************************************
ok: [kinsta_staging]
TASK [connection : Check whether Ansible can connect as ueymx] ********************************************************************************************
ok: [kinsta_staging → localhost]
TASK [connection : Warn about change in host keys] ********************************************************************************************
skipping: [kinsta_staging] => {
“changed”: false,
“skip_reason”: “Conditional result was False”
}
TASK [connection : Set remote user for each host] ********************************************************************************************
skipping: [kinsta_staging] => {
“changed”: false,
“skip_reason”: “Conditional result was False”
}
TASK [connection : Announce which user was selected] ********************************************************************************************
skipping: [kinsta_staging] => {}
TASK [connection : Load become password] ********************************************************************************************
skipping: [kinsta_staging] => {
“censored”: “the output has been hidden due to the fact that ‘no_log: true’ was specified for this result”,
“changed”: false
}
PLAY [Deploy WP site] ********************************************************************************************
TASK [Gathering Facts] ********************************************************************************************
ok: [kinsta_staging]
TASK [Ensure site is valid] ********************************************************************************************
skipping: [kinsta_staging] => {
“changed”: false,
“skip_reason”: “Conditional result was False”
}
TASK [Ensure repo is valid] ********************************************************************************************
skipping: [kinsta_staging] => {
“changed”: false,
“skip_reason”: “Conditional result was False”
}
TASK [deploy : Check if deploy_before scripts exist] ********************************************************************************************
TASK [deploy : include_tasks] ********************************************************************************************
TASK [deploy : Check if deploy_initialize_before scripts exist] ********************************************************************************************
TASK [deploy : include_tasks] ********************************************************************************************