root@19scompd010:~# puppet agent -t
Notice: Local environment: 'production' doesn't match server specified node environment 'master', switching agent to 'master'.
Info: Retrieving pluginfacts
Notice: /File[/opt/puppetlabs/puppet/cache/facts.d/ms_defender_status.sh]/ensure: defined content as '{md5}32e23c84e01fdb0c715eb2f526a64666'
Info: Retrieving plugin
Notice: /File[/opt/puppetlabs/puppet/cache/lib/puppet/provider/yumrepo]/ensure: created
Notice: /File[/opt/puppetlabs/puppet/cache/lib/puppet/provider/yumrepo/inifile.rb]/ensure: defined content as '{md5}a05c32de4836259a7eb655d218a1c14b'
Notice: /File[/opt/puppetlabs/puppet/cache/lib/puppet/type/yumrepo.rb]/ensure: defined content as '{md5}21fbaf85c24486eecaecbb6d2f605187'
Info: Retrieving locales
Notice: /File[/opt/puppetlabs/puppet/cache/locales/ja/puppetlabs-yumrepo_core.po]/ensure: defined content as '{md5}bcb98b5dced6d7c9c94d65a8a6e8f85a'
Info: Loading facts
Warning: Facter: external fact file "/opt/puppetlabs/puppet/cache/facts.d/ms_defender_status.sh" had output on stderr: /opt/puppetlabs/puppet/cache/facts.d/ms_defender_status.sh: line 3: mdatp: command not found
[remaining output omitted]
Proposal
Add a new fact to register the installation or lack therein of the MDATP agent.
Rework script to only generate relevant facts; there's no point making a mdatp_is_healthy fact when MDATP is not even installed.
Agent output:
Proposal