signalfx / signalfx-agent

The SignalFx Smart Agent
https://signalfx.com
Apache License 2.0
125 stars 183 forks source link

Windows install still not idempotent #1584

Closed pearcec closed 2 years ago

pearcec commented 3 years ago

https://github.com/signalfx/signalfx-agent/blob/e2ff35fa932c376ce8ed215cf707ec7bda48d15c/deployments/puppet/manifests/win_repo.pp#L19

file and find_file execute on the server not the agent.

pearcec commented 3 years ago

You need to write a fact. Something like this. Make sure you get the correct path and set a version and not a url in the version.txt.

Facter.add(:signalfx_agent_version) do
  confine :osfamily => "Windows"
  setcode do
    version = File.read("c:\\program files\\signalfx\\version.txt")
    version
  end
end
jchengsfx commented 3 years ago

Thanks @pearcec. Was thinking the same about adding the new fact.

jchengsfx commented 3 years ago

@pearcec v1.2.0 has been released to puppet forge. Please let us know if the changes address this issue.

atoulme commented 2 years ago

Closing this issue as inactive. Please reopen if this issue is still occurring.