0

During executing Puppet task run --nodes ip command i get reports/logs for most of the servers but only for a single server i get "no output for this node ".Even changes are not reflected in that machine while the same command works for rest of the machines.But at the same time job is not failed,it succeeds.

Note: I have a .sh file inside module/tasks/init.sh which contains puppet agent -t --tags (i pass parameters) command in it.Upon executing puppet task run command,puppet agent -t will be ran on those machines.

What will be the cause and is there anything not allowing to run that .sh file?

Update: tasks module - modulename/tasks/init.sh

#!/bin/bash
puppet agent -t --noop --tags $PT_class --environment=$PT_env

Command to be executed in master: puppet task run task_module_name class=modulename env=staging --query 'inventory { trusted.extensions.certname = "fqdn"}'

When in run this commadn it gets executed successfully but tasks module is not executed on agent machine

Note: I face this only on CIS hardening AMI on AWS

John Bollinger
  • 160,171
  • 8
  • 81
  • 157
ksa
  • 25
  • 6
  • 1
    You've presented no code and no information about any characteristics of the troublesome node. Consequently, we have no way to evaluate the situation or to meaningfully answer the question. – John Bollinger Dec 23 '19 at 03:57
  • @JohnBollinger Kindly check my update above – ksa Dec 23 '19 at 05:04
  • @JohnBollinger Also this is not working only on amazon linux machine while it is working on centos – ksa Dec 23 '19 at 05:12
  • Does the command `puppet agent -t --noop --tags modulename --environment=staging` produce output for the affected node when you run it directly at the command line? – John Bollinger Dec 24 '19 at 19:16
  • Note that the `puppet agent` command you are running is a bit suspicious: do you understand that the `--tags` option does not *add* any classes or resources to the transaction, but rather *filters out* classes and resources that otherwise would be included, but which do not bear any of the specified tags? – John Bollinger Dec 24 '19 at 19:19
  • @JohnBollinger Yes,if i run in that specific node it gets executed and i can get logs...while i run puppet task run command from master...this specific node returns only "no output for this node" output.....Its strange for me as it happens only on a specific machine. – ksa Dec 27 '19 at 10:24

0 Answers0