csharpsteen
08/11/2025, 2:36 PMUnable to interpret argument message, it sounds like you may have used -- as well. That terminates flag processing, so you have to make sure -s is behind it if used.vchepkov
08/11/2025, 2:47 PMcsharpsteen
08/11/2025, 2:48 PMvchepkov
08/11/2025, 2:49 PM--jms1
08/11/2025, 3:33 PMbash install.bash -s extension_requests:pp_environment=prodcsharpsteen
08/11/2025, 3:35 PM-s is only needed when piping into bash: curl ... | bash -s ...jms1
08/11/2025, 3:36 PMpp_ in the middle of the option string), after fixing that the error message doesn't happen, but the CSR isn't created.
# puppet agent --fingerprint
Fingerprint asked but neither the certificate, nor the certificate request have been issuedjms1
08/11/2025, 3:37 PM-s, i.e.
bash install.bash extension_requests:pp_environment=prod
still no CSRjms1
08/11/2025, 3:38 PMcsr_attributes.yaml file ... in fact find / -name csr\* doesn't find anything on the machine at allvchepkov
08/11/2025, 3:39 PMjms1
08/11/2025, 3:40 PMvchepkov
08/11/2025, 3:44 PMvchepkov
08/11/2025, 3:44 PMjms1
08/11/2025, 3:47 PMvchepkov
08/11/2025, 3:48 PMvchepkov
08/11/2025, 3:48 PMcsharpsteen
08/11/2025, 3:48 PMextension_requests was added in 2016.4.jms1
08/11/2025, 3:52 PMjms1
08/11/2025, 3:52 PMjms1
08/11/2025, 3:54 PMvchepkov
08/11/2025, 4:01 PMjms1
08/11/2025, 4:03 PMfind / -xdev -type f -print0 | xargs -0 grep -l pp_environment
on the machine, to see if it maybe created it in some other file ... the only two places it appears are /root/.bash_history and /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppt/ssl/oids.rb ... so basically, adding the extra option did nothing.jms1
08/11/2025, 4:03 PMvchepkov
08/11/2025, 4:04 PMvchepkov
08/11/2025, 4:04 PM# grep puppet_config_set install.bash
puppet_config_set() {csharpsteen
08/11/2025, 4:13 PM[root@bluff-camp ~]# curl -ksLO https://cackly-surveyor.delivery.puppetlabs.net:8140/packages/current/install.bash
[root@bluff-camp ~]# bash install.bash extension_requests:pp_environment=prod
...
[root@cackly-surveyor puppet-enterprise-2023.8.5-el-9-x86_64]# puppetserver ca sign --all
Successfully signed the following certificate requests:
bluff-camp.delivery.puppetlabs.net
[root@bluff-camp ~]# puppet ssl download_cert
Notice: Downloaded certificate 'bluff-camp.delivery.puppetlabs.net' with fingerprint (SHA256) 23:9A:4E:F1:EA:12:F4:6A:F0:0E:86:C9:F2:CA:CD:EE:88:A8:DC:FF:C1:B9:C6:70:85:91:9E:90:13:0F:9F:B9
[root@bluff-camp ~]# cat /etc/puppetlabs/puppet/csr_attributes.yaml
---
extension_requests:
pp_environment: 'prod'
[root@bluff-camp ~]# openssl x509 -in "$(puppet config print hostcert)" -noout -text |grep -FA1 1.3.6.1.4.1.34380.1.1.12
1.3.6.1.4.1.34380.1.1.12:
..prodvchepkov
08/11/2025, 4:17 PMjms1
08/11/2025, 4:18 PMjms1
08/11/2025, 4:22 PMcsr_attributes.yaml file and ran curl -k ... | sudo bash -s extension_requests:pp_environment=prod ... this time it worked, and puppetserver ca list on the server shows the CSR, waiting to be signedjms1
08/11/2025, 4:23 PMinstall.bash file i had downloaded before was from 2023.8.4 and something changed in it? i thought i had downloaded a new copy after upgrading the PE server on friday, but i wouldn't swear to it.vchepkov
08/11/2025, 4:25 PMvchepkov
08/11/2025, 4:25 PMjms1
08/11/2025, 4:26 PMjms1
08/11/2025, 4:29 PMel-9-x86_64.bash, on the server ... and that calls the puppet_config_set function ... very strangecsharpsteen
08/11/2025, 4:34 PMinstall.bash basically just figures out which flavor of *NIX it is running on and then downloads a platform-specific script that does yum stuff, or apt stuff, etc.jms1
08/11/2025, 4:34 PMinstall.bash is to download and install an OS-specific script, why does it contain a bunch of code to do more than just that? why not just build the URL and download/run the file? (and also offer a --download option to download the "real" script, so that paranoid people like myself can inspect that before running it?)jms1
08/11/2025, 4:35 PMvchepkov
08/11/2025, 4:36 PMcsharpsteen
08/11/2025, 4:37 PMinstall.bash is designed to deliver is "one script that takes care of installation on all platforms". It doesn't have any extra complexity that does not align with that design goal.jms1
08/11/2025, 4:43 PMinstall.bash is doing is building the URL of the platform-specific script, downloading that, and executing it ... why does it care what the other command line arguments are? why does the puppet_config_set function exist in the install.bash script, if it isn't needed?jms1
08/11/2025, 4:44 PMcsharpsteen
08/11/2025, 4:47 PMpuppet_config_set is in templates/partials/shared_functions.bash.erb, which is inserted into both install.bash and the platform-specific scripts.
install.bash doesn't need it, but each of the platform scripts do --- so it lives in the shared code block.jms1
08/11/2025, 4:48 PM