https://www.puppet.com/community logo
Join Slack
Powered by
# puppet
  • r

    rismoney

    11/18/2022, 2:49 PM
    guess i will exec it w/ somethign like this command => 'find stuff -name "*.pub" -type f -not -perm 640 -exec chmod 0640 {} \;',
  • j

    Joel Wilson

    11/18/2022, 3:14 PM
    I think I found a PDK bug
  • s

    Slackbot

    11/18/2022, 4:01 PM
    This message was deleted.
    d
    j
    n
    • 4
    • 8
  • w

    William Myers

    11/18/2022, 5:07 PM
    I ran into a bizzare behavior with a CentOS7 (Or any other Linux) Vagrant puppetserver box running underneath virtualbox on Windows. Line ends of anything puppet touches seem to be getting converted to CRLF which is causing system files such as /etc/sudoers, /etc/ssh/sshd_config, any sort of .sh script , etc to not parse correctly henceforth. Any thoughts on what could cause this?
  • w

    William Myers

    11/18/2022, 5:07 PM
    I ran into a bizzare behavior with a CentOS7 (Or any other Linux) Vagrant box running on Windows. Line ends of anything puppet touches seem to be getting converted to CRLF which is causing system files such as /etc/sudoers, /etc/ssh/sshd_config, any sort of .sh script , etc to not parse correctly henceforth. Any thoughts on what could cause this?
  • w

    William Myers

    11/18/2022, 5:07 PM
    I ran into a bizzare behavior with a CentOS7 (Or any other Linux) Vagrant puppetserver box running on Windows. Line ends of anything puppet touches seem to be getting converted to CRLF which is causing system files such as /etc/sudoers, /etc/ssh/sshd_config, any sort of .sh script , etc to not parse correctly henceforth. Any thoughts on what could cause this?
  • w

    William Myers

    11/18/2022, 5:08 PM
    I ran into a bizzare behavior with a CentOS7 (Or any other Linux) Vagrant puppetserver box running underneath virtualbox on Windows. Line ends of anything puppet touches seem to be getting converted to CRLF which is causing system files such as /etc/sudoers, /etc/ssh/sshd_config, any sort of .sh script , etc to not parse correctly henceforth. Any thoughts on what could cause this?
  • w

    William Myers

    11/18/2022, 5:09 PM
    After running puppet on that VM, things like sudo will break as it can't parse the file, for example running the following command will fix the parsing errors for sudo.
    Copy code
    dos2unix /etc/sudoers
  • w

    William Myers

    11/18/2022, 5:11 PM
    Other files such as .sh scripts will just return an error that the file couldn't be found.
  • s

    Slackbot

    11/18/2022, 5:33 PM
    This message was deleted.
    y
    w
    +3
    • 6
    • 51
  • j

    Joel Wilson

    11/18/2022, 5:34 PM
    Corrupted meaning checked in without proper
    .gitattributes
    protections
  • w

    William Myers

    11/18/2022, 5:35 PM
    These are the worste offenders in that scenario
    Copy code
    mod 'saz-ssh', '9.0.0' 
    mod 'hardening-os_hardening', '2.3.3'
  • d

    Dr Bunsen Honeydew

    11/18/2022, 5:35 PM
    See the
    saz-ssh
    module at https://forge.puppet.com/saz/ssh?src=slack&channel=puppet
  • w

    William Myers

    11/18/2022, 5:35 PM
    Those two modules wreck the guest when they're applied (using my Hiera values)
  • w

    William Myers

    11/18/2022, 5:35 PM
    Those two modules wreck the guest when they're applied (using my Hiera values)
  • w

    William Myers

    11/18/2022, 5:37 PM
    I'm not certain whether they use templates or not
  • w

    William Myers

    11/18/2022, 5:38 PM
    They were a pull (via r10k on windows)
  • y

    Yorokobi

    11/18/2022, 5:41 PM
    What are you using to edit files in windows? I know notepad++ has the option to save files in the Unix format.
  • w

    William Myers

    11/18/2022, 5:43 PM
    I suspect their line ends are getting modified as they're brought down to the windows host via r10k?
  • y

    Yorokobi

    11/18/2022, 5:47 PM
    Probably. I'd ensure that vscode saves files with *nix line endings and save everything you've edited recently to ensure they all have the proper line endings and re-run r10k.
  • s

    Slackbot

    11/18/2022, 5:57 PM
    This message was deleted.
    c
    c
    +2
    • 5
    • 9
  • c

    CVQuesty

    11/18/2022, 6:04 PM
    @Yorokobi Windows does have a rudimentary file permissions regime, you just can’t do a whole lot with it, but it does have a concept of owner/group/world and read/write permissions
  • n

    natemccurdy

    11/18/2022, 6:29 PM
    William is using my personal Vagrant stack, that I've only ever used on Linux or MacOS, https://github.com/natemccurdy/vagrant-puppetserver/tree/control_repo I don't use r10k inside the VM's. Instead, I have the shared
    /vagrant
    dir symlinked into the production environment: https://github.com/natemccurdy/vagrant-puppetserver/blob/control_repo/vagrant-configs/roles.yaml#L47-L50 This makes the current state of the control repo on your workstation immediately available for Puppet runs in Vagrant, which is really nice. What's odd though is that the CRLF line endings get added to a bunch of files via the shared filesystem, and that happens only on Windows. So I suspect this is more of a Windows + Virtualbox problem than anything else.... but I'm not able to dig too deep since I don't develop on Windows.... like ever.
  • w

    William Myers

    11/18/2022, 7:31 PM
    @CVQuesty that's the other direction I was thinking of going, Were you passing through the SSH parameters for git to the vagrant guest, if so how?
  • w

    William Myers

    11/18/2022, 7:32 PM
    I found a few potential ways to do this, just need to hash it out.
  • n

    natemccurdy

    11/18/2022, 7:33 PM
    Personally, I wouldn't really codify any of my vagrant-development workflow into my Puppet code/Hiera itself. That's the wrong level of abstraction. Except for maybe a couple of
    node
    definitions for ephemeral VM's in something like
    manifests/vagrant.pp
    within the control repo.
  • c

    CVQuesty

    11/18/2022, 8:56 PM
    When I originally built these, I needed something with a PE master and agents. I used to use these for training. It would allow every user to have the same experience in the class, regardless of their platform. Everything takes place inside the VMs. I haven’t used them as much recently, having spent most of my time in AWS. But they’re all in my GitHub. I tried PE and OSP. PE: https://github.com/cvquesty/centos7-pe2021.2.0 OSP: https://github.com/cvquesty/c7_po6.10.1 Last I checked, these two worked. Thing is, it’s been quite some time, and they both need a little TLC right now, but I can get them working if you want to give them a shot. Just let me know.
  • w

    William Myers

    11/18/2022, 11:40 PM
    This is just for doing content dev as sshing to the master itself isn't a great practice.
  • s

    Slackbot

    11/19/2022, 2:31 AM
    This message was deleted.
    b
    d
    • 3
    • 21
  • b

    bastelfreak

    11/19/2022, 6:07 PM
    https://github.com/darold/pgbadger
1...239240241...428Latest