debops / ansible-ferm

Manage iptables firewall using ferm
GNU General Public License v3.0
33 stars 20 forks source link

ferm package not being installed in Ubuntu Trusty #61

Closed mbarcia closed 1 year ago

mbarcia commented 8 years ago

Follow-up on the discussion over the IRC channel: the ferm package is not being installed in Ubuntu Trusty. It installs fine on Debian Jessie. Specifically, the task "Ensure ferm is installed" is being skipped.

Stack details: Running vm 'ubuntu/trusty64' on Windows 10, Virtualbox 5.0.6, Vagrant 1.7.4, Ansible 1.9.3

To isolate the problem, I made sure ferm was not present, then removed the facts logic in the "when" clause of the aforementioned task, and it executed the task successfully.

I went on and removed ferm package, and now removed the quotes around 'ferm' in defaults/main.yml ferm_packages: [ ferm ]

and it still worked (I'd think this 2nd. measure is the fix for https://github.com/debops/ansible-bootstrap/issues/6).

So, IMHO there's something in the local facts logic that is not working as expected in Ubuntu Trusty 64.

Cadair commented 7 years ago

I am also experiencing this on Debian Squeeze.

drybjed commented 7 years ago

@Cadair DebOps is not supported on Squeeze. This issue was related to the ferm keyword being a variable name at that time and Ansible interpreting it as a boolean. What Ansible version do you use? Current stable release with current master debops.ferm role should work.

Cadair commented 7 years ago

hmm, maybe it's not the same issue then, in which case apologies for the noise.

For whatever reason the ferm package is not being installed on squeeze, which is leading to the error:

fatal: [host]: FAILED! => {"changed": false, "failed": true, "msg": "Could not find the requested service ferm: host"}

I am running Ansible 2.3.1.0

drybjed commented 7 years ago

@Cadair: It looks like the ferm package is/was not available on Debian Squeeze, at least I don't see it listed in the Packages.gz file in http://archive.debian.org/debian/dists/squeeze/main/binary-amd64/. No idea why Ansible apt module doesn't stop when it cannot be found, maybe it is/was available via wheezy-backports? Anyway, you should look for an upgrade at this point, at least to Wheezy which is still somewhat supported by DebOps.

Cadair commented 7 years ago

Oh dear, when I said squeeze I meant stretch. I clearly need another cup of coffee. Sorry.

The package will install ok if I do it manually.

drybjed commented 7 years ago

@Cadair I see. Well, that's a first then. Does systemctl status ferm.service work?

Cadair commented 7 years ago

No, the service doesn't exist, and the package isn't installed.

drybjed commented 7 years ago

@Cadair Can it be installed by hand? Also, can you try it with the debops.ferm redesign PR?

Thanks for the bug report, I'll try to check it out shortly.

Cadair commented 7 years ago

yeah if I install it by hand everything works fine.

What's the easiest way to test the PR?

drybjed commented 7 years ago

@Cadair In your development environment, DebOps project directory run the commands:

git clone https://github.com/drybjed/ansible-ferm roles/debops.ferm
cd roles/debops.ferm
git checkout combined-rules

This should mask the default debops.ferm role with the version in the PR for this development environment while leaving the old version in others. Now you can run debops service/ferm -l host to test the new role.