Last active
November 15, 2025 08:14
-
-
Save rsyuzyov/4c14e351e9dc8edc36bb694ae9cebf69 to your computer and use it in GitHub Desktop.
foreman setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| grep -qxF "net.ipv6.conf.all.disable_ipv6 = 1" /etc/sysctl.conf || echo "net.ipv6.conf.all.disable_ipv6 = 1" | tee -a /etc/sysctl.conf | |
| grep -qxF "net.ipv6.conf.default.disable_ipv6 = 1" /etc/sysctl.conf || echo "net.ipv6.conf.default.disable_ipv6 = 1" | tee -a /etc/sysctl.conf | |
| grep -qxF "net.ipv6.conf.lo.disable_ipv6 = 1" /etc/sysctl.conf || echo "net.ipv6.conf.lo.disable_ipv6 = 1" | tee -a /etc/sysctl.conf | |
| grep -qxF "127.0.0.1 $(hostname −f) $(hostname −s)" /etc/hosts || sed −i "127.0.0.1 $(hostname -f) $(hostname −s)" /etc/hosts | |
| apt update && apt dist-upgrade -y | |
| apt install -y ca-certificates wget gnupg lsb-release | |
| wget -O- https://deb.theforeman.org/pubkey.gpg | gpg --dearmor -o /usr/share/keyrings/foreman.gpg | |
| echo "deb [signed-by=/usr/share/keyrings/foreman.gpg] http://deb.theforeman.org/ bookworm 3.17" | tee /etc/apt/sources.list.d/foreman.list | |
| echo "deb [signed-by=/usr/share/keyrings/foreman.gpg] http://deb.theforeman.org/ plugins 3.17" | tee /etc/apt/sources.list.d/foreman-plugins.list | |
| apt update | |
| # Установка из репы puppet не возможна из-за низкой скорости скачаивания; скачать руками, закинуть в ВМ и установить: | |
| https://apt.puppet.com/pool/bookworm/puppet8/p/puppet-agent/puppet-agent_8.10.0-1bookworm_amd64.deb | |
| https://apt.puppet.com/pool/bookworm/puppet8/p/puppetserver/puppetserver_8.7.0-1bookworm_all.deb | |
| apt install -y openjdk-17-jdk | |
| apt install -y postgresql | |
| systemctl enable postgresql | |
| systemctl start postgresql | |
| apt install ruby-foreman-fog-proxmox | |
| apt install ruby-foreman-docker | |
| foreman-installer --enable-foreman-plugin-ansible --enable-foreman-proxy-plugin-ansible | |
| echo "Foreman installation completed. Access the web interface at: https://$(hostname -f)" |
Добавить:
grep -qxF "net.ipv6.conf.all.disable_ipv6 = 1" /etc/sysctl.conf || echo "net.ipv6.conf.all.disable_ipv6 = 1" | tee -a /etc/sysctl.conf
grep -qxF "net.ipv6.conf.default.disable_ipv6 = 1" /etc/sysctl.conf || echo "net.ipv6.conf.default.disable_ipv6 = 1" | tee -a /etc/sysctl.conf
grep -qxF "net.ipv6.conf.lo.disable_ipv6 = 1" /etc/sysctl.conf || echo "net.ipv6.conf.lo.disable_ipv6 = 1" | tee -a /etc/sysctl.conf
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Убрать:
apt remove puppet-agent -y
wget https://apt.puppet.com/puppet-release-bookworm.deb
dpkg -i puppet-release-bookworm.deb
#поправить репу на puppet8
apt update