Skip to content

Add install_info file#628

Merged
mx-psi merged 4 commits intomasterfrom
mx-psi/puppet-install-info
Jun 2, 2020
Merged

Add install_info file#628
mx-psi merged 4 commits intomasterfrom
mx-psi/puppet-install-info

Conversation

@mx-psi
Copy link
Copy Markdown
Member

@mx-psi mx-psi commented May 27, 2020

What does this PR do?

Creates install_info file with information about the install method used (overwrites any other existing file).

Describe your test plan

I added some spec tests. Unfortunately in the test environment one can't get the puppet version, so that has to be tested manually:

  • Checkout this branch and run pdk build to create a .tar.gz of this version
  • Install it using sudo puppet module install <path to tar>
  • Apply it following the repo README
  • Check that the install_info file was created with correct content and permissions

@mx-psi mx-psi force-pushed the mx-psi/puppet-install-info branch from 37a2c15 to 5b073e3 Compare May 27, 2020 12:02
@mx-psi mx-psi marked this pull request as ready for review May 28, 2020 10:18
@mx-psi mx-psi requested a review from a team as a code owner May 28, 2020 10:18
Comment thread spec/classes/datadog_agent_spec.rb Outdated
Comment thread spec/classes/datadog_agent_spec.rb Outdated
Comment thread manifests/init.pp
file { 'C:/ProgramData/Datadog/install_info':
owner => $dd_user,
group => $dd_group,
mode => '0660',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why different permissions? (640 or 660)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I am not sure what the reason is for it but datadog.yaml has those permissions on Windows, so I guessed install_info should have the same. Should I change them on datadog.yaml too?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Seems like it is used to give the administrator group access to the file (see #571)

Copy link
Copy Markdown
Contributor

@kbogtob kbogtob left a comment

Choose a reason for hiding this comment

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

Good job! Left some comments

Copy link
Copy Markdown
Contributor

@albertvaka albertvaka left a comment

Choose a reason for hiding this comment

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

Looks good to me! Both the change and the test 🚀

Copy link
Copy Markdown
Contributor

@kbogtob kbogtob left a comment

Choose a reason for hiding this comment

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

LGTM2

@mx-psi mx-psi merged commit 3b8eabb into master Jun 2, 2020
@mx-psi mx-psi deleted the mx-psi/puppet-install-info branch June 2, 2020 09:41
cegeka-jenkins pushed a commit to cegeka/puppet-datadog_agent that referenced this pull request Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants