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