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

Move api configuration to a config file #579

Merged
merged 1 commit into from
Jan 29, 2019

Conversation

baurmatt
Copy link
Contributor

Pull Request (PR) description

This is the first change for enhancing the custom types with deeper Puppet
integration. This is needed to ensure the implementation of
self.instances/self.prefetch works correctly.

This is the basis for all changes needed for #570.

This Pull Request (PR) fixes the following issues

@baurmatt baurmatt closed this Dec 21, 2018
@baurmatt baurmatt reopened this Dec 21, 2018
@bastelfreak
Copy link
Member

This looks good to me, but I would like to see another review. @ekohl or @dhollinger maybe?

@bastelfreak
Copy link
Member

@baurmatt can you please rebase?

@baurmatt
Copy link
Contributor Author

Done :)

@ekohl
Copy link
Member

ekohl commented Dec 26, 2018

I think that the types should autorequire the config file. Not sure if that means the collectors could be replaced just yet. A host might require a template, but perhaps that can also be solved via autorequires.

This is the first change for enhancing the custom types with deeper Puppet
integration. This is needed to ensure the implementation of
self.instances/self.prefetch works correctly.
@baurmatt
Copy link
Contributor Author

Added the auto require for /etc/zabbix/api.conf and resolve merged conflicts.

I'm happy to look into the requires between types, but I think that should be handled in a separate PR as this one is already big enough.

@bastelfreak
Copy link
Member

@ekohl I am fine with this. What do you think?

@baurmatt
Copy link
Contributor Author

Hey, anything left we need to talk about? :) Would love to see this merged!

zabbix_pass => $zabbix_pass,
apache_use_ssl => $apache_use_ssl,
}
-> Zabbix_template <<| |>>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these needed anymore? Perhaps they are redundant (given the types all autorequire the API config file)?

It depends on whether they were just being used to set the API credentials or whether actually eg. all Zabbix_userparameters have to come after all Zabbix_hosts etc?

When given a block of attributes and values, a collector will set and override those attributes for every resource (virtual or not) that matches its search expression.
https://puppet.com/docs/puppet/5.3/lang_resources_advanced.html#amending-attributes-with-a-collector

Copy link
Contributor Author

@baurmatt baurmatt Jan 21, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my understanding they ensure that e.g. the host exists in Zabbix before the template gets added to it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. Just checking that the relationships before this change were actually all required (and not just a slightly lazy syntax short-cut). Now they definitely look like they're there for a reason, so it's good to check.

@baurmatt
Copy link
Contributor Author

Still looking to get this merged ;) Is there anything you guys don't feel comfortable with?

@alexjfisher alexjfisher merged commit 1d50892 into voxpupuli:master Jan 29, 2019
@alexjfisher
Copy link
Member

@baurmatt Thanks!

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

Successfully merging this pull request may close these issues.

4 participants