Skip to content

Instantly share code, notes, and snippets.

@paulcalabro
Last active October 6, 2018 19:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulcalabro/e7da87617fd277ab83552825fa21c329 to your computer and use it in GitHub Desktop.
Save paulcalabro/e7da87617fd277ab83552825fa21c329 to your computer and use it in GitHub Desktop.
This script installs Foreman
#!/bin/bash
admin_username=$1
admin_password=$2
ansible_fqdn=$3
tls_ca_certs_directory=$4
tls_certs_directory=$5
tls_crl_directory=$6
tls_private_directory=$7
foreman-installer \
\
`: Do not install the Puppet master.` \
--puppet-server=false \
\
`: Disable the 'puppet' Puppet module.` \
--no-enable-puppet \
\
`: Disable the Puppet module for environment imports and Puppet runs.` \
--foreman-proxy-puppet=false \
\
`: Disable the Puppet CA feature.` \
--foreman-proxy-puppetca=false \
\
`: Disable the 'foreman_proxy' Puppet module.` \
--no-enable-foreman-proxy \
\
`: Configure admin credentials.` \
--foreman-admin-username "${admin_username}" \
--foreman-admin-password "${admin_password}" \
\
`: Configure additional groups for the Foreman user.` \
--foreman-user-groups EMPTY_ARRAY \
\
`: Enable the 'foreman_compute_ec2' Puppet module.` \
--enable-foreman-compute-ec2 \
\
`: Enable the 'foreman_plugin_ansible' Puppet module.` \
--enable-foreman-plugin-ansible \
\
`: Enable the 'foreman_plugin_hooks' Puppet module.` \
--enable-foreman-plugin-hooks \
\
`: Enable the 'foreman_plugin_openscap' Puppet module.` \
--enable-foreman-plugin-openscap \
\
--enable-foreman-plugin-remote-execution \
\
`: Disable all TLS settings pertaining to Puppet since it is not` \
`: installed.` \
--puppet-server-foreman=false \
--puppet-server-foreman-facts=false \
--puppet-server-foreman-ssl-ca='' \
--puppet-server-foreman-ssl-cert='' \
--puppet-server-foreman-ssl-key='' \
--puppet-server-foreman-url='' \
\
`: Disable all TLS settings pertaining to the Smart Proxy since it is not` \
`: installed.` \
--foreman-proxy-puppet-ssl-ca='' \
--foreman-proxy-ssl-ca='' \
--foreman-proxy-ssl-cert='' \
--foreman-proxy-ssl-disabled-ciphers='' \
--foreman-proxy-ssl-key='' \
--foreman-proxy-ssl-port='' \
--foreman-proxy-ssl=false \
--foreman-proxy-ssldir='' \
\
`: Disable the TLS CA used to communicate with Smart Proxies.` \
`: --foreman-client-ssl-ca=` \
--foreman-client-ssl-cert="${tls_certs_directory}/${ansible_fqdn}.crt" \
--foreman-client-ssl-key="${tls_private_directory}/${ansible_fqdn}.pem" \
\
`: Disable the TLS CA used to perform client authentication.` \
--foreman-server-ssl-ca='/etc/pki/tls/certs/ca-bundle.crt' \
--foreman-server-ssl-cert="${tls_certs_directory}/${ansible_fqdn}.crt" \
--foreman-server-ssl-chain="/etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt" \
--foreman-server-ssl-crl='' \
--foreman-server-ssl-key="${tls_private_directory}/${ansible_fqdn}.pem" \
\
--foreman-websockets-ssl-cert="${tls_certs_directory}/${ansible_fqdn}.crt" \
--foreman-websockets-ssl-key="${tls_private_directory}/${ansible_fqdn}.pem" \
\
--foreman-locations-enabled=true \
--foreman-organizations-enabled=true \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment