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

Ensure we dont mess with windows permissions with Unix ones #321

Closed
wants to merge 3 commits into from
Closed

Ensure we dont mess with windows permissions with Unix ones #321

wants to merge 3 commits into from

Conversation

lynxman
Copy link
Contributor

@lynxman lynxman commented Feb 15, 2017

We found issues with unix file definitions on our Windows servers in which the file would be unreadable by Windows due to permissions disappearing, this fixes it.

Once this is merged I'll start working on getting this branch up to speed with master

@solarkennedy
Copy link
Contributor

I don't like the case statements.

Instead, how about setting the defaults for the file resource in the class?

case windows
File {
  owner => undef,
  group => undef,
  mode => ?
}
case linux {
File {
  owner => $user,
  group => $group,
  mode => 0644,
}
}

https://docs.puppet.com/puppet/4.9/lang_defaults.html

@lynxman
Copy link
Contributor Author

lynxman commented Feb 23, 2017

Cool! Will do that way :)

@lynxman
Copy link
Contributor Author

lynxman commented Feb 27, 2017

I've done something slightly different, instead of redefining the whole module File references I've moved the references to params.pp as they should and set the right ones over there, let me know if that's okay!

@@ -12,14 +12,32 @@
]:
ensure => 'directory',
}

Copy link
Contributor

Choose a reason for hiding this comment

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

for style, can you compact all the vertical whitespace in the "windows" block to make it more obvious to the eye that these are all for windows, and then align arrows?

"${install_path}/consul-${consul::version}/${$binary_name}":
owner => $binary_owner,
group => $binary_group,
mode => '0555';
Copy link
Contributor

Choose a reason for hiding this comment

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

just do ',' and not ';'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh crap, I missed that one, sorry!

@solarkennedy
Copy link
Contributor

Just style stuff (https://travis-ci.org/solarkennedy/puppet-consul/jobs/205823470) and I'll click the button!

@lynxman
Copy link
Contributor Author

lynxman commented Feb 27, 2017

Done! Once this is merged I'll start working on integrating all this to the latest master so Windows works out of the box

@solarkennedy
Copy link
Contributor

I'm not sure why the tests are failing... I looks like puppet-archive, but we pin in fixtures.yml, I'm not sure how a breaking change would get through...

@solarkennedy
Copy link
Contributor

Can you try rebasing on master to see if the tests pass now?

@lynxman
Copy link
Contributor Author

lynxman commented Mar 21, 2017

Hi,
Sorry for the late reply, I was out!
This windows branch is so far behind master that the changes break there, I was thinking about doing a separate PR to integrate windows changes in master so this branch can be closed, which way do you prefer to go?

@solarkennedy
Copy link
Contributor

@lynxman it's all good. Do whatever you are git-comfortable with.

@lynxman
Copy link
Contributor Author

lynxman commented Mar 21, 2017

Cool, Let me sort it out and will come back with passing tests :)

@solarkennedy
Copy link
Contributor

This may be obsoleted by #352

@bastelfreak
Copy link
Member

Hi @lynxman, is this still needed after #403 got merged?

@bastelfreak bastelfreak added the needs-feedback Further information is requested label Jul 5, 2018
@stale
Copy link

stale bot commented Aug 21, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Aug 21, 2020
@stale stale bot closed this Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-feedback Further information is requested wontfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants