Re: [Puppet Users] Mcollective puppet-agent doesn't execute commands from custom facts

2014-08-02 Thread José Luis Ledesma
And setting full path for ec2-metadata too? El 02/08/2014 22:02, "Maxim Nikolaev" escribió: Tried also full path with ec2-region hardcoded /opt/aws/bin/ec2-describe-tags --region us-east-1 -O KEY -W SEC_KEY --filter \"resource-id=$(ec2-metadata -i | cut -d \" \" -f2)\" --filter \"key=Role\" | cu

Re: [Puppet Users] Mcollective puppet-agent doesn't execute commands from custom facts

2014-08-02 Thread Maxim Nikolaev
Tried also full path with ec2-region hardcoded /opt/aws/bin/ec2-describe-tags --region us-east-1 -O KEY -W SEC_KEY --filter \"resource-id=$(ec2-metadata -i | cut -d \" \" -f2)\" --filter \"key=Role\" | cut -f5 -") Created also sh script in /etc/facter/facts.d with same string: when run locally

Re: [Puppet Users] Mcollective puppet-agent doesn't execute commands from custom facts

2014-08-02 Thread José Luis Ledesma
Hi Probably mco is not loading you environment variables ( like PATH) and this produces this behavior. If the ec2-describe-tags commands is not in the usual path, try exec it with the full path in the fact. Also you can check if the ec2_region fact is get correctly from mco. Hth El 02/08/2014

[Puppet Users] Mcollective puppet-agent doesn't execute commands from custom facts

2014-08-02 Thread Maxim Nikolaev
Hello I met following issue with mcollective puppet agent. I have custom fact that read tags from AWS cli and transform them to facts. Facter.add("role") do setcode do iregion = Facter.value("ec2_region") Facter::Util::Resolution.exec("ec2-describe-tags --region #{iregion} -O KEY -W SEC_K