Closed vkurup closed 7 years ago
Thanks @dpoirier. This is updated now.
Just curious, what did having fail2ban monitor the auth and mail logs have to do with getting this working on Xenial?
Hmm, good question. Those were in place when I started reviewing the PR and since it worked, I focused on getting the other pieces to work. :) @vrocha wrote "Some fail2ban specific nuances that sort of worked out"
I refactored the IP extraction a bit. Could you take a look and see what you think? I haven't run any real deployment tests with this yet, so I'd like to do that after I get it looking correct.
@vkurup Looks good enough. Still kind of obscure, but it's salt. (fingerscrossed) that it still works.
Reconfirmed that it still works in all 3 cases:
:mans_shoe:
This supercedes #138. I didn't want to hijack that one because I think some projects may be using it directly. I did, however, base my work off that PR so hopefully it will be easy for those projects to migrate once this is merged. Please review Victor's initial PR description in #138, and then some of the following comments which explain most of the changes that I made.
I have tested this branch with multiple deploys (over and over again), including the following scenarios:
Issues addressed:
onchanges
requisite to watch the init file and call daemon-reload when necessary. I added a conditional around it so that this is a no-op if we're not using systemd.For the upgrade of 14.04 or 12.04 projects, and for any projects currently using #138 directly, there will need to be minor changes made on the django-project-template side:
install_salt.sh
script needs to be udpated to the latest version.Once those changes are made, you'll need to run these commands:
Link to the accompanying d-p-t PR: https://github.com/caktus/django-project-template/pull/280
Because projects will break if they don't do the steps above, I'd recommend bumping margarita's major version, once we decide that this is the correct approach.