similar to: Question on case statements...

Displaying 20 results from an estimated 3000 matches similar to: "Question on case statements..."

2012 Jun 14
1
facter --yaml leaves some fields blank
Sometimes "facter --yaml" doesn''t list all the values specified on the command line. I can''t find rhyme nor reason why. Here''s a demo to show what I mean: # facter --version 1.5.7 # facter --yaml fqdn macaddress lsbdistcodename --- fqdn: my.host.name.example.com lsbdistcodename: squeeze macaddress: "00:00:00:00:00:00" We had been using the above
2007 Sep 24
2
ANNOUNCE: Facter 1.3.8
I''ve just committed Facter 1.3.8. All of the work for this release was done by James Turnbull, so everyone should thank him for getting it done. Here''s the changelog: Fixed Rdoc::usage bug on CentOS 5 - closed Puppet #753 and Facter #40 Added support to return multiple interfaces and their IP addresses and MAC addressess as facts. Returns
2007 Feb 21
9
Facter environment variables being ignored in puppet?
Facter has the feature that it will turn any environment variable named FACTER_* into a fact. I can do this on the commandline no problem, but when I attempt this in puppet it seems to ignore that parts. Is anyone else seeing this? (Is this expected behavior?) I don''t see a ticket or a mail thread on it - though my searching powers have been weak the last couple of weeks... Thanks,
2009 Dec 09
3
facter 1.5.7 all lsb* items missing
I have 2 RHEL 5.4 systems where all facter lsb* items are missing. Any ideas? Sanitized facter output: architecture => i386 domain => missyou.edu facterversion => 1.5.7 fqdn => broken.missyou.edu hardwareisa => i686 hardwaremodel => i686 hostname => broken id => root interfaces => eth0,sit0 ipaddress => 1.2.1.5 ipaddress_eth0 => 1.2.1.5 is_virtual => true
2012 May 17
1
Puppet facter 1.6.8 and inet6 addresses
Hello, when running the command "ip a" on a debian VM, I get this 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
2008 Jul 08
12
ANNOUNCE: Facter 1.5
Hi all, I''ve finally gotten around to releasing Facter 1.5. As the version bump implies, this is a relatively significant release (for a 2.3k line program, anyway). Mostly, the biggest change is refactoring the code internally so that all of the functionality is split into separate classes in separate files. Also, the facts are all loaded on-demand, which provides dramatic
2010 Oct 15
5
alternate hostnames, keys, and certs
I''d like to extend my use of puppet to manage my desktop/notebook macs. As others have noted, the hostname of the mobile machines tends to change frequently, so basing the node name (in my site.pp) and the corresponding cert and private key names seems to be an issue. I seem to recall somewhat talking about this at Puppet Camp last week….. Generally my signing strategy is always to
2008 Apr 27
4
Template variable "hostname" not working with certname= parameter?
I recently upgraded my Puppetmaster to 0.24.4 and it looks like my templates are not working properly. All of my clients use the same certificate, built by my original client "xx". I do this using the certname=blah parameter in the puppet.conf on each client. Up until I upgraded each client would use the "xx" certificate (which I had renamed to "blah") and
2012 Dec 03
4
Unnecessary changes when creating facts.yaml
I have set up puppet to create a facts.yaml file for mcollective using the following line: content => inline_template("<%= scope.to_hash.reject { |k,v| k.to_s =~ /(uptime.*|timestamp|.*free|macaddress.*|ipaddress)/ }.to_yaml %>"), However, it is creating a lot of unnecessary changes by reordering the facts in the yaml output as you can see in the diff output between to
2011 Oct 19
5
How to know the generated certname used by a puppet client, for reuse within erb (because of cloud provisioner) ?
Hi, I am using the cloud provisioner to bootstrap some ec2 nodes, and these clients are signed using a randomly generated certname, which is put in /etc/puppet.conf at the bootstrap time (eg certname = d7bcd693-73fd-495f-0876-ff91ea11111e). But my puppet code repo also manages the puppet.conf file, so the file will be overwritten on the client at the first puppet run. Nevertheless, i should not
2007 Mar 26
3
Basic help with imports and includes
Do any of you good people have a moment to help me out with my basic Puppet language skills, I''m a little new around here and getting an error I don''t yet understand. I have an RHEL4 Puppetmaster happily controlling the permissions of /etc/sudoers on an RHEL5 and SolarisX86 client. My actual environment consists of several systems in several locations. All systems need the
2013 Apr 18
4
fact_stomp_server
Does anyone have any insight into this error message? err: Could not retrieve catalog from remote server: Error 400 on SERVER: The fact named fact_stomp_server does not appear to be a valid hostname. The value of '''' does not match ''^[a-zA-Z0-9.-]+$''. A common cause of this problem is running puppet agent as a normal user instead of root, or the fact is
2011 Aug 25
5
custom fact regex problem
Hi guys I have a custom fact envt, it was working fine but now I have to make some changes in it; puppet client''s hostname is of the type 1234qa-abc-de.local where 1234 can be any thing of any length.My custom fact should contain qa, ie I want to check in the first part(before the first -) of the hostname if there exists a pattern/word qa and if it exists then my custom fact for envt
2009 Jun 30
43
Workstations and Certs
I am trying to come up with a workable solution in managing numerous Mac workstations allowing a high degree of flexibility with regards to certs. My puppet environment is setup to application installation on machines that have been ''imaged'' with a base OS and the puppet and facter apps. So, when a Mac is ''imaged'' and subsequently re-booted, puppet is run at
2007 May 31
1
regex in case statement
I would like to do a case statement based on different vlans. If a person does a case statement on $ipaddress provided by facter, can you match regex expressions such as case $ipaddress { "192.168.1.[0-9]+": do something "192.168.2.[0-9]+": do something else } Also, would this best be solved by a case statement or other functionality within puppet? Thanks
2005 Dec 20
2
Modifying data before update or save
Hi, I''d like to upcase a variable before it is saved, but I''m not sure how to access the incoming param or where this work should be performed: In my update method, I have: @device = Device.find(params[:id]) params[:device[macaddress]].upcase <-- problem code if @device.update_attributes(params[:device]) ....usual stuff here ''macaddress'' is the
2018 Sep 10
4
schema enhancement recommandation?
Hi Rowland, thank you for your fast answer. More see below. On 10.09.2018 19:18, Rowland Penny via samba wrote: > [..] ERR: Object class violation : "objectclass_attrs: attribute >> 'macAddress' on entry 'CN=DEMO-02,CN=Computers,DC=dmiserver,DC=lan' >> does not exist in the specified objectclasses!" on DN >>
2009 Jan 15
8
Pattern matching in case statement
Hi all, I need my servers to decide which network they are in (i.e. dmz), and the only clue is the servers IP-address. I was trying to accomplish it like this, but it doesn''t work: case $ipaddress { "10.1.1.*": { $network = "net1" } "10.2.2.*.*": { $network = "net2" } "10.3.3.*": {
2006 Aug 29
40
Red Hat release info
Hi all, I''m looking at changing the operatingsystemrelease fact for Red Hat. Linux currently just uses the kernel release as the operating system release, but I''ve got a client who wants the release to have both the specific distro (e.g., AS or EL) and the release (e.g., 3 or 4). Will this particularly annoy anyone? Anyone want to help make the release string work on
2011 Dec 20
8
Network config module won't work. -Mac address errors
Hello, I created a module for modifying the base network settings on a machine. However no matter what changes I make it keeps giving me the error "has different MAC address than expected, ignoring" when the network tries to startup. I am testing this out on the puppet learning VM. Does anyone see anything wrong with my code: init.pp -------------------------- define basehost