puppet command can't be executed in sequence under Windows
I wrote a batch script for deploying puppet agent and customized settings. But the script exited every time right after the first puppet
command was executed. Is this because puppet
command on Windows is acutally a batch script(puppet.bat
) instead of a real binary executable?
Here is a snippet of my batch script:
REM Install Puppet Agent without automatically starting it.
msiexec /qn /i "Z:\%PUPPET_INSTALLER%" PUPPET_AGENT_STARTUP_MODE=Manual
puppet config set node_name facter --section agent
REM the batch script stops here...
REM the following command will never be executed.
puppet config set node_name_fact ipaddress --section agent
puppet config set refresh_interval 4h --section agent
puppet config set stringify_facts false --section main
I end up with ECHO
all the settings to puppet.conf
file directly, which works, but I still want to know why this happens. Any ideas, please?