Re: [Puppet Users] map/reduce local variables

2019-06-05 Thread chengkai liang
I believed you made thing overly complicated. You only have one hash table, and try to remove the entries that has remove_ of it. Not sure why you need to use reduce and map. You can use `each` to go through first key of the hash table, then use filter to filter out unwanted keys like, # this clas

Re: [Puppet Users] Referencing Deferred functions in Puppet Code or Hiera YAML

2019-02-19 Thread chengkai liang
I don't recall that puppet had this feature but I may be wrong. What are you looking to do? On Sun, Feb 17, 2019 at 16:17 comport3 wrote: > Does anyone have any real world examples of referencing Deferred lookups, > either in Puppet code or Hiera that you could share? > > -- > You received this

Re: [Puppet Users] puppetserver6 and hiera-eyaml-gpg

2019-02-19 Thread chengkai liang
You will also need to install hiera-eyaml via /opt/puppetlabs/puppet/bin/gem. Puppetserver only install gem for jruby On Sat, Feb 16, 2019 at 23:00 Daniel Kinon wrote: > Hello, > I'm running puppetserver 6.2.0 with hiera-eyaml-gpg but can't seem to > get past the following error when I perfo

[Puppet Users] puppetdb_query missing from agent

2018-11-28 Thread chengkai liang
Hi all, I had this strange thing regarding to puppetdb_query. I am trying to experence PQL.What I do was to create a simple test module that has these content, class test { $debian_nodes_query = 'nodes[certname]{facts{name = "operatingsystem" and value = "Debian"}}' $debian_nodes = puppet

Re: [Puppet Users] Re: Unable to specify hierarchy for data-in-modules

2013-12-06 Thread chengkai liang
It is nice to mention this here. Thanks, -Chengkai On Thu, Dec 5, 2013 at 6:18 PM, Henrik Lindberg < henrik.lindb...@cloudsmith.com> wrote: > On 2013-06-12 1:30, chengkai liang wrote: > >> Well, I can execute this with for individual module via *puppet apply >> --bi

Re: [Puppet Users] Re: Unable to specify hierarchy for data-in-modules

2013-12-05 Thread chengkai liang
Well, I can execute this with for individual module via *puppet apply --binder true ...* I haven't been able to do this successfully on my vagrant box. I found out that vagrant use --detailed-exitcode option with puppet apply, which interfere with *--binder true* option. I have to set* binder tru

Re: [Puppet Users] Weird Error From Running Puppet

2013-11-22 Thread chengkai liang
I suppose in the latest puppet 3.x implementation if you specify --binder true, you don't necessary need to have hiera.yaml exists. Is that not a case? -Chengkai On Thu, Nov 21, 2013 at 2:02 PM, Denmat wrote: > Two things, look at disabling detailed-exitcodes and use --hiera_conf to > declare

Re: [Puppet Users] Re: Unable to specify hierarchy for data-in-modules

2013-11-11 Thread chengkai liang
Thanks. On Mon, Nov 11, 2013 at 10:30 AM, Rob Reynolds wrote: > I believe this was updated in this ARM > https://github.com/puppetlabs/armatures/blob/master/arm-9.data_in_modules/index.md > > But you may want to check to see if this is still something we are moving > forward with. > > > On Mon,

Re: [Puppet Users] Puppet.3.3.0.msi Package Failed to Install

2013-10-08 Thread chengkai liang
The error I post was related to MSI package installation, and I haven't even been able to successfully execute msiexec /qn /i ... to install PE 3.0 On Oct 6, 2013, at 3:28 PM, chengkai liang wrote: > I will see if that version fix the problem. > > On Oct 6, 2013, at 11:16 AM

Re: [Puppet Users] Puppet Dynamic Environments Setup

2013-10-08 Thread chengkai liang
It seems that instead of add the following line in [master], they have to be in [agent] for dynamic environment to work. So the document does not reflect what PE 3.x is. On Oct 8, 2013, at 7:52 AM, wilddog64 wrote: > So I follow this document to setup the puppet dynamic environment, and my >

Re: [Puppet Users] Puppet.3.3.0.msi Package Failed to Install

2013-10-06 Thread chengkai liang
gt; > If this is not your issue, please attach your error for further inspection. > > Thanks! > > > On Fri, Oct 4, 2013 at 9:12 AM, chengkai liang wrote: > I have download recent version puppet.3.3.0.msi from PuppetLab and trying to > install it on Windows 7. T

Re: [Puppet Users] Re: Puppet Resources Ordering

2013-09-16 Thread chengkai liang
u into trouble. Instead, you should fix the > problem with your classes. > > On Sunday, September 15, 2013 10:44:17 AM UTC+5:30, chengkai liang wrote: > > Hi All, > >I have the following classes define: > >init.pp > > class { 'A': } -

[Puppet Users] Puppet Resources Ordering

2013-09-14 Thread chengkai liang
Hi All, I have the following classes define: init.pp class { 'A': } -> class { 'B': } -> class { 'C': } Supposedly, the execution order should A then B then C, but the actual execution order seems that C is being executed before B. Why is this happening? Isn't -> wil

Re: [Puppet Users] Puppet Managing Symlink

2013-08-13 Thread chengkai liang
I guess I am. I just figure what went wrong there!! On Aug 12, 2013, at 10:51 PM, Puppet List wrote: > Hello > > Are your target and file are the wrong way round? > > On 13 Aug 2013 01:22, "chengkai liang" wrote: > Hi Everybody, > >So I have design

[Puppet Users] Puppet Managing Symlink

2013-08-12 Thread chengkai liang
Hi Everybody, So I have design a puppet module that will create a symlink under a given directory, and here's the module and a hiera, and fact data: Hiera data --- confluence_setup::lic::lic_info: confluence_lib_path: /usr/local/confluence/confluence/WEB-INF/lib A custom fact that will

Re: [Puppet Users] Re: Vagrant Puppet Provision VM

2013-08-01 Thread chengkai liang
vironment > #{ROLE}"] > and sync folder with hiera data > config.vm.synced_folder "hieradata", > "/etc/puppet/environments/#{ROLE}/hieradata" > > > > On Tuesday, July 30, 2013 5:32:36 PM UTC+3, chengkai liang wrote: >> >> Hi All, >

[Puppet Users] Vagrant Puppet Provision VM

2013-07-30 Thread chengkai liang
Hi All, I am using Vagrant to provision a box (CentOS 6.x) with puppet provisioner. The box is built by using veewee, with ruby 1.8.7 and puppet 3.2 iinstalled, and the vagrant environment layout is, . ├── Gemfile ├── Gemfile.lock ├── Rakefile ├── Vagrantfile ├── definitions │ └── centos-6.3.

[Puppet Users] Re: Heria, Facts, and Puppet

2013-07-27 Thread chengkai liang
ral you want common to be searched last, as >> hiera by default bails when it finds an answer, so your hierarchy in the >> conf file is backwards. You'd want the env_name fact above common. >> >> On Thursday, July 25, 2013 7:27:26 AM UTC-7, chengkai liang wrote: >&

[Puppet Users] Heria, Facts, and Puppet

2013-07-25 Thread chengkai liang
So something doesn't look right for me when running puppet apply -e 'include ...' for looking heria via facter fact. I have hiera configure as this, :backends: - yaml :hierarchy: - common - '%{env_name}' :yaml: :datadir: /var/lib/hiera/data and, a file env