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

Failing without reboot on Ubuntu 16.04 LTS #17

Closed
groggemans opened this issue Jul 22, 2016 · 13 comments
Closed

Failing without reboot on Ubuntu 16.04 LTS #17

groggemans opened this issue Jul 22, 2016 · 13 comments

Comments

@groggemans
Copy link

TASK [geerlingguy.firewall : Ensure the firewall is enabled and will start on boot.] ***
fatal: [ansible-dev-ubuntu]: FAILED! => {"changed": false, "failed": true, "msg": "Could not find the requested service \"'firewall'\": "}

It runs fine after a reboot.

@groggemans
Copy link
Author

groggemans commented Jul 23, 2016

Also happens on newer Debian hosts.

Reason: the new service file is not detected (ansible/ansible-modules-core#191)
Should be fixed in ansible v2.2 (ansible/ansible#3660) but will require the systemd module to be used.

Maybe you could add the systemctl daemon-reload command to the role for older ansible versions.

@geerlingguy
Copy link
Owner

Wrong repo in above link :) — ansible/ansible-modules-core#3660

@geerlingguy
Copy link
Owner

I'm seeing issues like this pop up for many of my roles now, including:

Just documenting here for my own sanity.

@kathgironpe
Copy link

Doesn't work with Debian either.

@geerlingguy
Copy link
Owner

Note that the automated build (runs on CentOS 6, CentOS 7, Ubuntu 12, Ubuntu 14, Ubuntu 16, and Debian 8 at this time) is passing with the latest code: https://travis-ci.org/geerlingguy/ansible-role-firewall

But there are some cases where it might not work, and it looks like Ansible 2.2 might have the fix (ref: geerlingguy/ansible-role-mysql#128), so rather than try to figure out a hacky workaround, I'm going to wait for that and then see if it fixes those issues.

Also, in some cases, if you're working from a Windows workstation, check to make sure your line endings for the files in this role are set to 'Unix' and not Windows. That's caused some consternation for people deploying VMs in Windows via Vagrant using this role and the Ansible provisioner.

@kathgironpe
Copy link

kathgironpe commented Sep 28, 2016

@geerlingguy I am sorry. You are right. It works! Thank you for this.

@kathgironpe
Copy link

On my part, I forgot to reference the path for variables.

@geerlingguy
Copy link
Owner

@katgironpe Great, glad I could help!

@groggemans - I'm going to close this out, but please let me know if it's still an issue.

@groggemans
Copy link
Author

Ok, Thanks!

@geerlingguy
Copy link
Owner

Reopening due to #958. Might add a switch for systemd systems and use it for Ubuntu 16.04, CentOS 7, Debian 8, etc. so they get the proper templated file.

@geerlingguy
Copy link
Owner

I have a fix, will push up a branch soon!

geerlingguy added a commit that referenced this issue Nov 2, 2016
Fixes #17: Failing without reboot on Ubuntu 16.04.
@kathgironpe
Copy link

@geerlingguy thank you!

@geerlingguy
Copy link
Owner

Still not using the unit file on CentOS 7. Will fix that now. See also: geerlingguy/ansible-role-mailhog#15

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

No branches or pull requests

3 participants