From 11891bedf6bec3b6f385438b9b977ac82315bc6d Mon Sep 17 00:00:00 2001 From: Christoph Date: Thu, 13 Apr 2023 18:07:33 +0200 Subject: [PATCH] update.. --- group_vars/all/main.yml | 326 ++++++++++++++++++++++++- group_vars/apache2_webserver.yml | 4 +- group_vars/mail_server.yml | 2 +- group_vars/mysql_server.yml | 2 +- group_vars/postgresql_server.yml | 2 +- host_vars/a.mx.oopen.de.yml | 4 +- host_vars/b.mx.oopen.de.yml | 2 +- host_vars/c.mx.oopen.de.yml | 4 +- host_vars/d.mx.oopen.de.yml | 4 +- host_vars/e.mx.oopen.de.yml | 4 +- host_vars/file-ipa.local.netz.yml | 79 ++++++ host_vars/ga-st-mail.ga.netz.yml | 4 +- host_vars/lists.mx.warenform.de.yml | 4 +- host_vars/mail-neu.cadus.org.yml | 4 +- host_vars/mail.cadus.org.yml | 4 +- host_vars/mail.faire-mobilitaet.de.yml | 4 +- host_vars/mx.warenform.de.yml | 4 +- hosts | 6 +- roles/common/tasks/apt.yml | 30 ++- roles/common/tasks/yum.yml | 28 +++ 20 files changed, 487 insertions(+), 34 deletions(-) create mode 100644 host_vars/file-ipa.local.netz.yml diff --git a/group_vars/all/main.yml b/group_vars/all/main.yml index e5e43ea..6cbf9c9 100644 --- a/group_vars/all/main.yml +++ b/group_vars/all/main.yml @@ -728,7 +728,120 @@ apt_initial_install_bionic: - ifupdown - socat -apt_install_compiler_pkgs: false +apt_initial_install_jammy: + - apt-transport-https + - dbus + - openssh-server + - rush + - vim + - vim-common + - vim-doc + - mc + - screen + - tmux + - bc + - figlet + - sudo + - rsync + - dselect + - iputils-ping + - apt-utils + - aptitude + - zip + - unzip + - bzip2 + - arj + - locate + - curl + - gawk + - mawk + - lynx + - links + - w3m + - exuberant-ctags + - universal-ctags + - mime-support + - file + - coreutils + - moreutils + - less + - sipcalc + - psmisc + - dnsutils + - rblcheck + - whois + - gettext + - gettext-base + - gettext-doc + - debian-keyring + - patch + - patchutils + - recode + - recode-doc + - librecode0 + - librecode-dev + - sharutils + - perl + - perl-modules + - perl-doc + - libperl-dev + - libterm-readline-gnu-perl + - libterm-readline-perl-perl + - libterm-readkey-perl + - libmail-imapclient-perl + - libtime-duration-perl + - libtimedate-perl + - libwww-perl + - libpcre3 + - libio-compress-perl + - libreadline5 + - re2c + - util-linux + - parted + - lshw + - gdisk + - smartmontools + - tcpdump + - telnet + - unhide + - lsof + - hdparm + - groff + - iproute2 + - bridge-utils + - vlan + - ethtool + - wipe + - iperf + - mtr + - iptraf + - wget + - logrotate + - rsyslog + - haveged + - rdate + - ntpdate + - wipe + - man + - groff + - iptables + - shellcheck + - ssl-cert + - ssl-cert-check + - git + - ftp + - htop + - net-tools + - lsb-release + - attr + - acl + - quota + - quotatool + - needrestart + - ifupdown + - socat + +install_compiler_pkgs: false apt_compiler_pkgs: - g++ - g++-multilib @@ -751,7 +864,203 @@ apt_compiler_pkgs: - libnss3-dev #- python-dev -apt_install_webserver_pkgs: false +yum_compiler_pkgs: + - gcc-c++ + - cpp + - make + - cmake + - automake + - autoconf + - libtool + - flex + - bison + - gettext + - pkgconfig + - openssl-devel + - openssl-static + - readline-devel + - readline-static + - ncurses + - ncurses-devel + - ncurses-static + - systemd-devel + - nss-devel + +install_webserver_pkgs: false + +yum_webserver_pkgs: + - libdb-devel + - zlib + - zlib-devel + - zlib-static + - openssl-devel + - openssl-static + - neon + - neon-devel + - libxml2 + - libxml2-devel + - libxml2-static + - curl + - libcurl + - libcurl-devel + - gdbm + - gdbm-devel + - aspell + - aspell-devel + - libjpeg-turbo + - libjpeg-turbo-devel + - libjpeg-turbo-static + - libXpm + - libXpm-devel + - freetype + - freetype-devel + - libwmf + - libwmf-devel + - libtiff + - libtiff-devel + - libtiff-static + - libpaper-devel + - libpaper-devel + - file-libs + - file-devel + - file-static + - GraphicsMagick + - GraphicsMagick-perl + - GraphicsMagick-devel + - GraphicsMagick-doc + - GraphicsMagick-c++ + - GraphicsMagick-c++-devel + - graphviz + - graphviz-devel + - libgsf + - libgsf-devel + - ilmbase + - ilmbase-devel + - libvpx + - libvpx-devel + - libvpx-utils + - gpm + - gpm-devel + - gpm-static + - texlive-kpathsea + - texlive-kpathsea-bin + - texlive-kpathsea-lib + - texlive-kpathsea-lib-devel + - OpenEXR + - OpenEXR-libs + - OpenEXR-devel + - librsvg2 + - librsvg2-devel + - librsvg2-tools + - djvulibre + - djvulibre-libs + - djvulibre-devel + - expat + - expat-devel + - expat-static + - ImageMagick + - ImageMagick-devel + - libexif + - libexif-devel + - exiv2 + - exiv2-libs + - exiv2-devel + - re2c + - netpbm + - netpbm-devel + - netpbm-progs + - mcrypt + - libmcrypt + - libmcrypt-devel + - mariadb-libs + - mariadb-devel + - postgresql-libs + - postgresql-devel + - postgresql-static + - libdbi + - libdbi-devel + - libdbi-dbd-mysql + - libdbi-dbd-pgsql + - libdbi-dbd-sqlite + - libdbi-devel + - libdbi-drivers + - readline + - readline-devel + - ncurses + - ncurses-devel + - ncurses-static + - libdb + - libdb-devel + - libdb-cxx + - libdb-cxx-devel + - libxslt + - libxslt-devel + - pcre + - pcre-devel + - pcre-static + - libc-client + - libicu + - libicu-devel + - libtidy + - libtidy-devel + - ModemManager + - ModemManager-glib + - gmp + - gmp-devel + - gmp-static + - krb5-libs + - krb5-devel + - openldap + - openldap-devel + - mhash + - mhash-devel.x86_64 + - gd + - gd-devel + - lua + - lua-static + - lua-devel + - apr + - apr-devel.i686 + - apr-util + - apr-util-devel + - apr-util-ldap + - apr-util-mysql + - apr-util-nss + - apr-util-odbc + - apr-util-openssl + - apr-util-pgsql + - apr-util-sqlite + - lksctp-tools + - lksctp-tools-devel + - openssl + - openssl-libs + - openssl-devel + - openssl-static + - cryptopp + - cryptopp-devel + - GeoIP + - GeoIP-devel + - libaio + - libaio-devel + - tk + - tk-devel + - tcl + - tcl-devel + - tcl-tclreadline + - tcl-tclreadline-devel + - expect + - expect-devel + - perl-Expect + - poppler-utils + + # - libqdbm-dev + #- libatm-dev + #- libc-client2007e-dev + #- libc-client-dev + #- ffmpeg + + + apt_webserver_pkgs: - libdb-dev - zlib1g @@ -836,10 +1145,21 @@ apt_webserver_pkgs: - libexpect-perl - poppler-utils -apt_install_postgresql_pkgs: false +install_postgresql_pkgs: false apt_postgresql_pkgs: - postgresql +yum_postgresql_pkgs: + - postgresql + - postgresql-server + - postgresql-libs + - postgresql-devel + - postgresql-static + - postgresql-plperl + - perl-DBD-Pg + - perl-DateTime-Format-Pg + - check_postgres + install_bind_packages: false apt_bind_pkgs: - bind9 diff --git a/group_vars/apache2_webserver.yml b/group_vars/apache2_webserver.yml index aa5117c..38a1e57 100644 --- a/group_vars/apache2_webserver.yml +++ b/group_vars/apache2_webserver.yml @@ -24,9 +24,9 @@ # vars used by apt.yml # --- -apt_install_compiler_pkgs: true +install_compiler_pkgs: true -apt_install_webserver_pkgs: true +install_webserver_pkgs: true # --- diff --git a/group_vars/mail_server.yml b/group_vars/mail_server.yml index 5195c41..83da251 100644 --- a/group_vars/mail_server.yml +++ b/group_vars/mail_server.yml @@ -24,7 +24,7 @@ # vars used by roles/common/tasks/apt.yml # --- -apt_install_compiler_pkgs: true +install_compiler_pkgs: true # --- diff --git a/group_vars/mysql_server.yml b/group_vars/mysql_server.yml index b899451..57ea13c 100644 --- a/group_vars/mysql_server.yml +++ b/group_vars/mysql_server.yml @@ -24,7 +24,7 @@ # vars used by roles/common/tasks/apt.yml # --- -apt_install_compiler_pkgs: true +install_compiler_pkgs: true # --- diff --git a/group_vars/postgresql_server.yml b/group_vars/postgresql_server.yml index fa745d0..8587d89 100644 --- a/group_vars/postgresql_server.yml +++ b/group_vars/postgresql_server.yml @@ -24,7 +24,7 @@ # vars used by roles/common/tasks/apt.yml # --- -apt_install_postgresql_pkgs: true +install_postgresql_pkgs: true # --- diff --git a/host_vars/a.mx.oopen.de.yml b/host_vars/a.mx.oopen.de.yml index 7a451e4..3b39ed7 100644 --- a/host_vars/a.mx.oopen.de.yml +++ b/host_vars/a.mx.oopen.de.yml @@ -24,9 +24,9 @@ # vars used by roles/common/tasks/apt.yml # --- -apt_install_compiler_pkgs: true +install_compiler_pkgs: true -apt_install_postgresql_pkgs: true +install_postgresql_pkgs: true # --- diff --git a/host_vars/b.mx.oopen.de.yml b/host_vars/b.mx.oopen.de.yml index c62888a..1dd98a1 100644 --- a/host_vars/b.mx.oopen.de.yml +++ b/host_vars/b.mx.oopen.de.yml @@ -24,7 +24,7 @@ # vars used by roles/common/tasks/apt.yml # --- -apt_install_compiler_pkgs: true +install_compiler_pkgs: true # --- diff --git a/host_vars/c.mx.oopen.de.yml b/host_vars/c.mx.oopen.de.yml index 6e9c711..bc0fac7 100644 --- a/host_vars/c.mx.oopen.de.yml +++ b/host_vars/c.mx.oopen.de.yml @@ -24,9 +24,9 @@ # vars used by roles/common/tasks/apt.yml # --- -apt_install_compiler_pkgs: true +install_compiler_pkgs: true -apt_install_postgresql_pkgs: true +install_postgresql_pkgs: true # --- diff --git a/host_vars/d.mx.oopen.de.yml b/host_vars/d.mx.oopen.de.yml index a65395d..c314402 100644 --- a/host_vars/d.mx.oopen.de.yml +++ b/host_vars/d.mx.oopen.de.yml @@ -24,9 +24,9 @@ # vars used by roles/common/tasks/apt.yml # --- -apt_install_compiler_pkgs: true +install_compiler_pkgs: true -apt_install_postgresql_pkgs: true +install_postgresql_pkgs: true # --- diff --git a/host_vars/e.mx.oopen.de.yml b/host_vars/e.mx.oopen.de.yml index e20becf..6ee18c2 100644 --- a/host_vars/e.mx.oopen.de.yml +++ b/host_vars/e.mx.oopen.de.yml @@ -24,9 +24,9 @@ # vars used by roles/common/tasks/apt.yml # --- -apt_install_compiler_pkgs: true +install_compiler_pkgs: true -apt_install_postgresql_pkgs: true +install_postgresql_pkgs: true # --- diff --git a/host_vars/file-ipa.local.netz.yml b/host_vars/file-ipa.local.netz.yml new file mode 100644 index 0000000..b3111eb --- /dev/null +++ b/host_vars/file-ipa.local.netz.yml @@ -0,0 +1,79 @@ +--- + +# --- +# vars used by roles/ansible_dependencies +# --- + + +# --- +# vars used by roles/ansible_user +# --- + + +# --- +# vars used by roles/common/tasks/basic.yml +# --- + + +# --- +# vars used by roles/common/tasks/sshd.yml +# --- + + +# --- +# vars used by roles/common/tasks/apt.yml +# --- + +install_compiler_pkgs: true + + +# --- +# vars used by roles/common/tasks/users.yml +# --- + + +# --- +# vars used by roles/common/tasks/users-systemfiles.yml +# --- + + +# --- +# vars used by roles/common/tasks/webadmin-user.yml +# --- + + +# --- +# vars used by roles/common/tasks/sudoers.yml +# --- +# +# see: roles/common/tasks/vars + + +# --- +# vars used by roles/common/tasks/caching-nameserver.yml +# --- + + +# --- +# vars used by roles/common/tasks/git.yml +# --- +# +# see: roles/common/tasks/vars + + +# --- +# vars used by roles/common/tasks/copy_files.yml +# --- + + +#copy_template_files: [] +# +# - name: mailsystem_install_amavis.conf +# src_path: usr/local/src/mailsystem/conf/install_amavis.conf.j2 +# dest_path: /usr/local/src/mailsystem/conf/install_amavis.conf + + + +# --- +# vars used by roles/common/tasks/config_files_mailsystem_scripts.yml +# --- diff --git a/host_vars/ga-st-mail.ga.netz.yml b/host_vars/ga-st-mail.ga.netz.yml index adbd023..072fd59 100644 --- a/host_vars/ga-st-mail.ga.netz.yml +++ b/host_vars/ga-st-mail.ga.netz.yml @@ -24,9 +24,9 @@ # vars used by roles/common/tasks/apt.yml # --- -apt_install_compiler_pkgs: true +install_compiler_pkgs: true -apt_install_postgresql_pkgs: true +install_postgresql_pkgs: true # --- diff --git a/host_vars/lists.mx.warenform.de.yml b/host_vars/lists.mx.warenform.de.yml index 61e9ae4..06c2e4e 100644 --- a/host_vars/lists.mx.warenform.de.yml +++ b/host_vars/lists.mx.warenform.de.yml @@ -24,9 +24,9 @@ # vars used by roles/common/tasks/apt.yml # --- -apt_install_compiler_pkgs: true +install_compiler_pkgs: true -apt_install_postgresql_pkgs: true +install_postgresql_pkgs: true # --- diff --git a/host_vars/mail-neu.cadus.org.yml b/host_vars/mail-neu.cadus.org.yml index e5a8e11..895122d 100644 --- a/host_vars/mail-neu.cadus.org.yml +++ b/host_vars/mail-neu.cadus.org.yml @@ -24,9 +24,9 @@ # vars used by roles/common/tasks/apt.yml # --- -apt_install_compiler_pkgs: true +install_compiler_pkgs: true -apt_install_postgresql_pkgs: false +install_postgresql_pkgs: false # --- diff --git a/host_vars/mail.cadus.org.yml b/host_vars/mail.cadus.org.yml index 30bd935..053d7b7 100644 --- a/host_vars/mail.cadus.org.yml +++ b/host_vars/mail.cadus.org.yml @@ -24,9 +24,9 @@ # vars used by roles/common/tasks/apt.yml # --- -apt_install_compiler_pkgs: true +install_compiler_pkgs: true -apt_install_postgresql_pkgs: false +install_postgresql_pkgs: false # --- diff --git a/host_vars/mail.faire-mobilitaet.de.yml b/host_vars/mail.faire-mobilitaet.de.yml index 477dcf0..2289f29 100644 --- a/host_vars/mail.faire-mobilitaet.de.yml +++ b/host_vars/mail.faire-mobilitaet.de.yml @@ -24,9 +24,9 @@ # vars used by roles/common/tasks/apt.yml # --- -apt_install_compiler_pkgs: true +install_compiler_pkgs: true -apt_install_postgresql_pkgs: true +install_postgresql_pkgs: true # --- diff --git a/host_vars/mx.warenform.de.yml b/host_vars/mx.warenform.de.yml index d6c6c7a..987f315 100644 --- a/host_vars/mx.warenform.de.yml +++ b/host_vars/mx.warenform.de.yml @@ -24,9 +24,9 @@ # vars used by roles/common/tasks/apt.yml # --- -apt_install_compiler_pkgs: true +install_compiler_pkgs: true -apt_install_postgresql_pkgs: true +install_postgresql_pkgs: true # --- diff --git a/hosts b/hosts index b1e6d8e..d5a6457 100644 --- a/hosts +++ b/hosts @@ -785,6 +785,8 @@ lists.mx.warenform.de [postgresql_server] +file-ipa.local.netz + # --- # O.OPEN # --- @@ -1181,8 +1183,6 @@ lxc-host-kb.anw-kb.netz # O.OPEN office network # --- -file-ipa.local.netz - bbb-server.b3-bornim.netz file-ah.kanzlei-kiel.netz file-km.anw-km.netz @@ -1315,6 +1315,8 @@ file-km.anw-km.netz file-blkr.blkr.netz zapata.opp.netz +file-ipa.local.netz + # - GA - Gemeinschaft Altensclirf ga-st-mail.ga.netz diff --git a/roles/common/tasks/apt.yml b/roles/common/tasks/apt.yml index 5c707e4..c684596 100644 --- a/roles/common/tasks/apt.yml +++ b/roles/common/tasks/apt.yml @@ -113,6 +113,16 @@ tags: - apt-initial-install +- name: (apt.yml) Initial install ubuntu packages (jammy) + apt: + name: "{{ apt_initial_install_jammy }}" + state: "{{ apt_install_state }}" + when: + - ansible_facts['distribution'] == "Ubuntu" + - ansible_facts['distribution_release'] == "jammy" + tags: + - apt-initial-install + # --- # Microcode @@ -173,6 +183,20 @@ - apt-initial-install - apt-microcode + +- name: (apt.yml) Install CPU microcode (ubuntu jammy) + apt: + name: "{{ microcode_package }}" + state: present + default_release: "{{ ansible_distribution_release }}" + when: + - ansible_facts['distribution'] == "Ubuntu" + - ansible_facts['distribution_release'] == "jammy" + - ansible_facts['processor']|string is search("Intel") + tags: + - apt-initial-install + - apt-microcode + - name: (apt.yml) Install lxc_host related packages apt: name: "{{ apt_lxc_host_pkgs }}" @@ -206,7 +230,7 @@ apt: name: "{{ apt_compiler_pkgs }}" state: "{{ apt_install_state }}" - when: apt_install_compiler_pkgs|bool + when: install_compiler_pkgs|bool tags: - apt-compiler-pkgs @@ -214,7 +238,7 @@ apt: name: "{{ apt_postgresql_pkgs }}" state: "{{ apt_install_state }}" - when: apt_install_postgresql_pkgs|bool + when: install_postgresql_pkgs|bool tags: - apt-postgresql-server-pkgs @@ -222,7 +246,7 @@ apt: name: "{{ apt_webserver_pkgs }}" state: "{{ apt_install_state }}" - when: apt_install_webserver_pkgs|bool + when: install_webserver_pkgs|bool tags: - apt-webserver-pkgs diff --git a/roles/common/tasks/yum.yml b/roles/common/tasks/yum.yml index 972789e..d6aea89 100644 --- a/roles/common/tasks/yum.yml +++ b/roles/common/tasks/yum.yml @@ -51,3 +51,31 @@ - groups['lxc_host']|string is search(inventory_hostname) tags: - yum-lxc-hosts-pkgs + + +- name: (yum.yml) Install postgresql server related packages + yum: + name: "{{ yum_postgresql_pkgs }}" + state: "{{ yum_install_state }}" + when: + - install_postgresql_pkgs|bool + tags: + - apt-postgresql-server-pkgs + + +- name: (yum.yml) Install compile related packages + yum: + name: "{{ yum_compiler_pkgs }}" + state: "{{ yum_install_state }}" + when: + - install_compiler_pkgs|bool + tags: + - yum-compiler-pkgs + +- name: (yum.yml) Install webserver related packages + yum: + name: "{{ yum_webserver_pkgs }}" + state: "{{ yum_install_state }}" + when: install_webserver_pkgs|bool + tags: + - yum-webserver-pkgs