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

Allow MSI package install on Windows #790

Merged
merged 1 commit into from
Sep 25, 2021

Conversation

spicyprogramming
Copy link
Contributor

Pull Request (PR) description

This change would allow Zabbix agent deployments on systems with no internet access (air gapped networks or or otherwise blocked)

Sample usage:

$tmpdir = $facts['windows_env']['TMP'];

download_file { 'get zabbix-installer.msi':
  url                   => "https://<internal>/zabbix_agent-${zabbix_version}-windows-amd64-openssl.msi",
  destination_directory => $tmpdir,
  destination_file      => "zabbix_agent-windows-amd64-openssl.msi",
}

class { 'zabbix::agent':
  zabbix_version          => $zabbix_version,
  manage_resources        => true,
  manage_choco            => false,
  zabbix_package_state    => present,
  zabbix_package_provider => 'windows',
  zabbix_package_source   => "${tmpdir}/zabbix_agent-windows-amd64-openssl.msi",
}

This Pull Request (PR) fixes the following issues

This is a new feature

manifests/agent.pp Outdated Show resolved Hide resolved
manifests/agent.pp Outdated Show resolved Hide resolved
@root-expert
Copy link
Member

Hey @spicyprogramming ! Thank for the PR!
Take a look at the inline comments. Also:
I think we should add an example usage of this on README, and we need some unit tests for this.

@root-expert root-expert added the enhancement New feature or request label Sep 13, 2021
@spicyprogramming spicyprogramming force-pushed the msi_installer branch 2 times, most recently from 3aa6e7c to b60ac30 Compare September 14, 2021 08:00
@spicyprogramming
Copy link
Contributor Author

we need some unit tests for this

Could you give me some guidance @root-expert ? I've never done anything like this for puppet. Thanks

@bastelfreak
Copy link
Member

hey @spicyprogramming , thanks for the PR. Can you add the windows versions this is supposed to work on to the metadata.json?

@spicyprogramming
Copy link
Contributor Author

@bastelfreak AFAIK this should work on "Any" version, according to the official website:

image

@spicyprogramming
Copy link
Contributor Author

Will look into test failures later today

manifests/agent.pp Outdated Show resolved Hide resolved
@bastelfreak
Copy link
Member

the CI errors are fixed on master. can you rebase against our latest master branch? (please don't create a merge commit)

@spicyprogramming spicyprogramming force-pushed the msi_installer branch 2 times, most recently from e457f33 to d5cf9ef Compare September 14, 2021 10:29
@spicyprogramming
Copy link
Contributor Author

/ping

Is there anything else left to do to move this forward?

@root-expert
Copy link
Member

/ping

Is there anything else left to do to move this forward?

We need some unit tests. Take a look here on how to write them properly.
The test should be added here. A good start is to copy an old test and adapt it to your needs.

If you need help you can join on channel #voxpupuli at Libera.Chat or at the Puppet Community Slack. 😄

manifests/agent.pp Show resolved Hide resolved
spec/classes/agent_spec.rb Outdated Show resolved Hide resolved
spec/classes/agent_spec.rb Outdated Show resolved Hide resolved
@root-expert
Copy link
Member

@spicyprogramming Seems your commit email is not associated with your Github account, could fix that before we merge this PR?

@spicyprogramming
Copy link
Contributor Author

@root-expert fixed. Thanks for helping me out push this through, by the way.

@root-expert root-expert merged commit 9fc2e86 into voxpupuli:master Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants