New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ansible_python_interpreter task to playbooks #1058

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@swalkinshaw
Copy link
Member

swalkinshaw commented Jan 5, 2019

deploy.yml and rollback.yml were missing this task to set
ansible_python_interpreter which server.yml had.

It should be in all playbooks.

ref: https://discourse.roots.io/t/task-letsencrypt-generate-the-certificates-usr-bin-env-python-no-such-file-or-directory/14493/3?u=swalkinshaw

Add ansible_python_interpreter task to playbooks
`deploy.yml` and `rollback.yml` were missing this task to set
`ansible_python_interpreter` which `server.yml` had.

It should be in all playbooks.
@ouun

This comment has been minimized.

Copy link
Contributor

ouun commented Jan 7, 2019

Thank you @swalkinshaw. That helps to come over the task "connection". However I'm not sue if this is related:

TASK [python_interpreter : Get Ubuntu release] **************************************************************************************************************************************************
System info:
  Ansible 2.7.5; Darwin
  Trellis 1.0.0: December 27th, 2018
---------------------------------------------------
Failed to connect to the host via ssh: philipp@116.203.1.137: Permission
denied (publickey).

fatal: [xxx.xxx.xxx.xxx]: UNREACHABLE! => {"changed": false, "unreachable": true}

I now have problems with the deploy and I'm not sure why it connects with user "philipp" and not "web".

However if I remove the block of Set ansible_python_interpreter from deploy.yml I do not face that issue as long as I keep gather_facts: false within the Deploy WP siteblock.

Best,

P

@swalkinshaw

This comment has been minimized.

Copy link
Member

swalkinshaw commented Jan 7, 2019

🤔 oh I think these tasks need remote_user: "{{ web_user }}" set.

@ouun

This comment has been minimized.

Copy link
Contributor

ouun commented Jan 7, 2019

🤔 oh I think these tasks need remote_user: "{{ web_user }}" set.

Adding that returns:

TASK [python_interpreter : Get Ubuntu release] **************************************************************************************************************************************************
System info:
  Ansible 2.7.5; Darwin
  Trellis 1.0.0: December 27th, 2018
---------------------------------------------------
non-zero return code
Shared connection to 116.203.1.137 closed.

fatal: [xxx.xxx.xxx.xx]: FAILED! => {"changed": false, "rc": 1, "stderr_lines": ["Shared connection to xxx.xxx.xxx.xx closed."], "stdout": "sudo: a password is required\r\n", "stdout_lines": ["sudo: a password is required"]}
@swalkinshaw

This comment has been minimized.

Copy link
Member

swalkinshaw commented Jan 7, 2019

Okay thanks, I'll have to properly test this later.

@swalkinshaw

This comment has been minimized.

Copy link
Member

swalkinshaw commented Jan 9, 2019

Closing since #1061 was the real solution.

@swalkinshaw swalkinshaw closed this Jan 9, 2019

@swalkinshaw swalkinshaw deleted the deploy-rollback-playbook-python-compat branch Jan 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment