-
Notifications
You must be signed in to change notification settings - Fork 332
Do not inject facts as vars #1497
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
Do not inject facts as vars #1497
Conversation
Strategy jobs for molecule now exceed the maximum of 256 configurations. So let's remove testing for 6.4 which is no longer supported by Zabbix.
I'm not sure when this was originally introduced, and what it's for. It seems to want to remove the proxy setting from repo files, which is counter-productive to those wanting to use a proxy.
This type of set_fact usage is cleaner when supplied as defaults
net-tools went out of style atleast two decades ago, sometime 2001. Then someone kindly pointed that out again in 2009 [1]. You should not be using this package, nor these tools. The installation of these packages feel like some old relic for someone wanting some debug tools inside the container, and not really relevant for zabbix-server itself. [1] https://lists.debian.org/debian-devel/2009/03/msg00780.html
net-tools went out of style atleast two decades ago, sometime 2001. Then someone kindly pointed that out again in 2009 [1]. You should not be using this package, nor these tools. The installation of these packages feel like some old relic for someone wanting some debug tools inside the container, and not really relevant for zabbix-proxy itself. [1] https://lists.debian.org/debian-devel/2009/03/msg00780.html
net-tools went out of style atleast two decades ago, sometime 2001. Then someone kindly pointed that out again in 2009 [1]. You should not be using this package, nor these tools. The installation of these packages feel like some old relic for someone wanting some debug tools inside the container, and not really relevant for zabbix-web itself. [1] https://lists.debian.org/debian-devel/2009/03/msg00780.html
I think we should drop this task completely (we're not using this for zabbix_web), but for now just clarifying what it's for feels like a small victory. Dropping the apt-get update, as we can pass update_cache: true to any package installation task and therefore no need to do this. There should not really be any services installed or required to run during our setup of the zabbix_repo, so just remove the task.
They're not all testing the server role. Removing this copy-pasta.
Simplifying timescale and sqlite3 import, by reusing *_database_file_dir. Moving '_' prefixed internal vars to vars/ to declutter defaults. And eliminating the trailing slash from the variable makes the code read easier with a natural / separating the variable and the path continuation.
I tried to go back in the logs to find a reason for this. We don't do this for any other services, and from a security standpoint this is not the way to do it. If you can't afford to have the service running unconfigured for 2 minutes before the playbook configures it and restarts the service, you can't afford to have it start up at all. In that case we should be masking the service, or using policy-rc.d or some other solution to prevent it from starting up after install.
We've done this for zabbix_{server,proxy} already, so a single task
for the installation all distributions.
Rule of thumb, if you're doing less than 5 tasks (and not looping
an include task), it probably doesn't deserve its own task file, so
the remaining os_family specific tasks can be merged in to main.yml
I'm a bit unsure about installing openjdk for Suse, why aren't we
installing openjdk for other distros?
This (probably) has to do with where the sql-scripts were installed under zabbix 5.0.
We don't need this apt-get update, so lets use the file module to create the missing directory.
net-tools went out of style atleast two decades ago, sometime 2001. Then someone kindly pointed that out again in 2009 [1]. You should not be using this package, nor these tools. The installation of these packages feel like some old relic for someone wanting some debug tools inside the container, and not really relevant for zabbix-java-gateway itself. [1] https://lists.debian.org/debian-devel/2009/03/msg00780.html
Probably time to update these, see what shakes out.
5b60760 to
61357d0
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1497 +/- ##
==========================================
- Coverage 79.05% 78.96% -0.09%
==========================================
Files 47 47
Lines 5958 5958
Branches 1539 1539
==========================================
- Hits 4710 4705 -5
- Misses 768 772 +4
- Partials 480 481 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I'm merging this despite the failed plugin-integration tests for 7.0. I don't believe any of the changes to |
SUMMARY
A bit of spring-cleaning. Dropping out Zabbix 6.4 from testing and (most?) of our code. (Strategy jobs for molecule exceed the maximum of 256 configurations, so the test wouldn't run on my fork)
At long last, we should be able to deploy these roles with inject_facts_as_vars set to false. The short version is that the addition of all these extra facts slow down deployments, especially at scale. Some more details are available at ansible/ansible#73654
Simplifying and removing a ton of tasks from
molecule/*/prepare.ymlthat just weren't needed, and cleaning up the javagateway role a bit.Updating pinned collections for CI
Fixes #1469
ISSUE TYPE
COMPONENT NAME
All the roles
ADDITIONAL INFORMATION
We could possibly be even more aggressive in removal of tasks from the
prepare.ymlfiles.