Skip to content
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

Finalizing deploys broken on Ansible 2.x #469

Closed
swalkinshaw opened this issue Jan 16, 2016 · 12 comments · Fixed by #478
Closed

Finalizing deploys broken on Ansible 2.x #469

swalkinshaw opened this issue Jan 16, 2016 · 12 comments · Fixed by #478
Labels

Comments

@swalkinshaw
Copy link
Member

Creating here so we can track it even though it's a bug within Ansible. We use the deploy_helper and the deploy will fail on the last step during finalizing (symlinking current).

The bug was fixed in ansible/ansible-modules-extras@1dd62b1 but the latest Ansible 2.0.0.2 hasn't updated their "extras" module to include that commit yet.

@conrman
Copy link

conrman commented Jan 17, 2016

Do you recommend any kind of quick patch for this? This is happening to me on Ansible 2.0.0.1

Downgrading to Ansible 2.0.0.0 supposedly resolves the issue for now. I'm wrestling with homebrew to see if that works but I wanted to know if you thought it would be better to comment out that task and manually symlink the current directory until the patch is included

@swalkinshaw
Copy link
Member Author

2.0.0 won't work either. That comment meant they "downgraded" to the dev build.

A workaround would be to remove the finalize task and manually do two things: https://github.com/stivio/ansible-modules-extras/blob/1dd62b13fa532b9335782f26c253495df6df1c1d/web_infrastructure/deploy_helper.py#L446-L447

  1. delete unfinished file
  2. create symlink

It's just 2 simple tasks. If you end up doing it maybe we'd add it to Trellis as a stop-gap.

@davenaylor
Copy link
Contributor

I updated my OS last night and my package manager moved to Ansible 2.0.0.2. Deploys are now failing due to unset subtree paths (not in use):

task path: <path>/trellis/roles/deploy/tasks/prepare.yml:18
fatal: [<host>]: FAILED! => {"changed": false, "failed": true, "invocation": {"module_args": {"msg": "subtree is set to 'False' but that path does not exist in the repo. Edit `subtree_path` for '<site>' in `wordpress_sites.yml`.

I've moved back to 1.9.4 for now.

@madalinignisca
Copy link

@davenaylor could you tell what OS and how you manage ansible on your system?

Example:

  • OSX 10.11.x / Homebrew package manager
  • Linux/Ubuntu / Apt package manager
  • Linux/Arch / Source installation

For example using OSX with homebrew you can uninstall ansible and install homebrew/versions/ansible19 and use that until fix for 2.x is announced.

@baptistemarchand
Copy link

For people looking for a quick fix, it's super easy to just find the file deploy_helper.py on your system ( locate deploy_helper.py ) and edit those two lines manually:
ansible/ansible-modules-extras@1dd62b1

@davenaylor
Copy link
Contributor

@16nsk Linux Arch. Like I say though, I moved back to 1.9.4 for now.

@landerss0n
Copy link

Still not fixed?

@retlehs
Copy link
Member

retlehs commented Feb 3, 2016

PR's accepted

Sent from my iPhone

On Feb 3, 2016, at 1:35 PM, Lucas Andersson notifications@github.com wrote:

Still not fixed?


Reply to this email directly or view it on GitHub.

@nbyloff
Copy link
Contributor

nbyloff commented Feb 4, 2016

I got this error, then tried to dowgrade to 1.9.4. When running the deploy script, I get

ERROR: fail is not a legal parameter in an Ansible task or handler

This is from a brand new trellis checkout from earlier this week. I am going to just use the current Ansible release and try @baptistmarchand suggestion

swalkinshaw added a commit that referenced this issue Feb 5, 2016
Temporary fix until Ansible releases a version which includes this
version of the `deploy_helper` module.
@JohnKelty
Copy link

Hi. What is a reliable workaround for this? On Ansible 2 I get the error about 'vars_files' is not a valid attribute for a PlaybookInclude and on Ansible 1.9, the "fail is not a legal parameter." I tried the workaround in ansible/ansible-modules-extras@1dd62b1 with no luck.

Is there a version of Ansible that this works on, and/or a workaround that I could apply despite being quite new to Ansible usage?

@swalkinshaw
Copy link
Member Author

@JohnKelty this has been fixed for a while in Trellis. The version requirements are in the README.

@JohnKelty
Copy link

Indeed it has. I saw the error was the same as what I was working on and forgot to notice that the playbook in question was different, so please ignore my comment and sorry for the inconvenience I'll follow this up in the right place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants