Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Symhedonic
    @Shokodemon
    it works now, now im trying to place a file @ multiple places (user homes) - trying to iterate over an array of users, but that doesn't seem to work either (trying different syntax variations found in the docs or on stack exchange, im running 3.8, not 4)
    Daniel Cazares
    @danielchristiancazares
    Could someone point me towards something outlining how to set environment variables on CentOS 6.7 using Puppet 3.8.7
    Ah, never mind. I could just create a shell script in the /etc/profile.d directory, I think.
    dragon788
    @dragon788
    For getting environment variables into user sessions that is probably the best route @danielchristiancazares
    Daniel Cazares
    @danielchristiancazares
    Thanks @dragon788
    Daniel Cazares
    @danielchristiancazares
    Anyone know why I'm getting a blank line printed with the following erb file?
    <% @slaves.each do |slave| -%>
    <%= slave %>
    <% end -%>
    My tests/init.pp is as follows:
    node default {
      $hdfs_port="9000"
      $hdfs_hostname="usmbdevspark01"
      $slaves = ['usmbdevspark01', 'usmbdevspark02', 'usmbdevspark03', 'usmbdevspark04']
      include apachespark
    }
    It's returning the following file:
    usmbdevspark01
    usmbdevspark02
    usmbdevspark03
    usmbdevspark04
    Well, there's a new line after ..04
    dragon788
    @dragon788
    you could do a %- after the beginning of your end to see if it clears up that extra newline
    Daniel Cazares
    @danielchristiancazares
    Yep, that ended up working.
    <% @slaves.each do |slave| -%>
    <%= slave %>
    <%- end -%>
    Thanks @dragon788
    dragon788
    @dragon788
    awesome, it's a fairly common style for templating languages, you use the -% or %- to suppress/strip a newline before/after your data
    Daniel Cazares
    @danielchristiancazares
    Gotcha. Appreciate the help.
    Daniel Cazares
    @danielchristiancazares
    Can Puppet replace a line in a file? I'd have to do that with exec and some bash lines, wouldn't I?
    deepybee
    @deepybee

    You can use file_line and match to do that

    match: Specifies a regular expression to run against existing lines in the file; if a match is found, it is replaced rather than adding a new line. A regex comparison is performed against the line value, and if it does not match, an exception is raised. Valid options: String containing a regex. Default: Undefined.

    https://forge.puppet.com/puppetlabs/stdlib#file_line

    Daniel Cazares
    @danielchristiancazares
    Awesome!
    Thanks, @deepybee
    deepybee
    @deepybee
    np 🙂
    Daniel Cazares
    @danielchristiancazares
    I'm not exactly too sure what the Rakefile is used for.
    Ghost
    @ghost~56fc9ded85d51f252abbbbad
    Hey guys sorry but do you know any reason that this command: puppet apply --environment development --debug --verbose
    could hang here forever: Debug: Runtime environment: puppet_version=4.9.4, ruby_version=2.1.5, run_mode=user, default_encoding=US-ASCII
    no message, no error, no anything
    deepybee
    @deepybee
    TCP timeout maybe?
    David Caro
    @david-caro
    I've had issues in the past with augeas lenses, when parsing big config files (we had an issue where we created huge config files...)
    Ghost
    @ghost~56fc9ded85d51f252abbbbad
    it is a local apply, and doing puppet config print the manifests/hiera/code path are correct
    @david-caro I have 8 config files and the maximum length is 70 lines, I don' think it could be considered huge?
    David Caro
    @david-caro
    I'd say not ;)
    Ghost
    @ghost~56fc9ded85d51f252abbbbad
    I have also checked puppet config and the environmentpath / hiera path config matches
    deepybee
    @deepybee
    Hi all, quick question: is there a way to require a reason to be entered when disabling an agent?
    jengstrom
    @jengstrom
    Does anyone happen to know why I might get the following error even though puppet labs/stdlibs in in the module path? "Error: Evaluation Error: Unknown function: 'any2bool'"
    Its driving me crazy so any insight is appreciated. :)
    Punita Ojha
    @punitaojha
    This message was deleted
    Thirumoorthi Ramaswami
    @tramaswami
    hello all , how to run hiera tests ? any idea
    Olmo Rupert
    @squaricdot
    anesterova
    @anesterova
    hey guys! Did anyone try to implement hiera-gpg in kitchen?
    pcajuste
    @pcajuste
    Hi Guys, is there anyone using cucumber as part of their testing suite for puppet?
    chris453
    @chris453
    Hi guys I was just wondering is there a way to transfer a folder including all sub-directory permissions to my puppet agent?
    since when I recursely transfer a directory it ended up changing all of the permissions to one mode instead . . of retaining its own permissions modes
    James Matthews
    @stravze
    hello, does anyone know the best approach for a puppet manifest when a host is provisioned to drop a file onto another host, e.g provision node03 and during the node03 puppet run, it will remotely place a file into a directory on node01 and reload the service on node01
    Matus Goljer
    @Fuco1
    Can I declare a dependency but not execute it? What I mean is that I have a module and it will not work without say Package['wget'] being present. But I don't want to manage that package, only tell the consumer (= user of my module) that they should install it. Would simply having require=>Package['wget'] be enough and just let it error out and let the user fix it, or is there some good way to do this?
    David Caro
    @david-caro
    @Fuco1 the require is enough, but if you want to install the package if it's not there already, you can also use ensure_package
    (that's what I do at least) xd
    Matus Goljer
    @Fuco1
    @david-caro Thanks, I'm going to go with just the require then. I don't want to manage the packages because that usually just leads to pain.
    I'll need to learn how to unit/integration test puppet manifests to make sure things work out when I get them all together.