diff --git a/ansible-dependencies-bullseye-sudo.yml b/ansible-dependencies-bullseye-sudo.yml new file mode 100644 index 0000000..b52ca42 --- /dev/null +++ b/ansible-dependencies-bullseye-sudo.yml @@ -0,0 +1,8 @@ +--- + +- hosts: initial_setup + gather_facts: false + + roles: + - ansible_dependencies-bullseye + - ansible_user diff --git a/ansible-dependencies-bullseye.yml b/ansible-dependencies-bullseye.yml new file mode 100644 index 0000000..ea592ef --- /dev/null +++ b/ansible-dependencies-bullseye.yml @@ -0,0 +1,15 @@ +--- + +- hosts: initial_setup + remote_user: root + become: false + gather_facts: false + + vars_prompt: + + - name: ansible_ssh_pass + prompt: "Give root's password here" + + roles: + - ansible_dependencies-bullseye + - ansible_user diff --git a/group_vars/all/main.yml b/group_vars/all/main.yml index ec85b39..688fc23 100644 --- a/group_vars/all/main.yml +++ b/group_vars/all/main.yml @@ -6,7 +6,6 @@ apt_ansible_dependencies: - python - - python-apt - python3 - python3-apt - lsb-release @@ -203,6 +202,7 @@ apt_initial_install_buster: - mc - screen - tmux + - cron - bc - figlet - rcconf @@ -259,6 +259,121 @@ apt_initial_install_buster: - libpcre3 - libio-compress-perl - libreadline5 + - libcroco3-dev + - 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 + - socat + - zsh + +apt_initial_install_bullseye: + - apt-transport-https + - dbus + - openssh-server + - rush + - vim + - vim-common + - vim-doc + - mc + - screen + - tmux + - cron + - bc + - figlet + - rcconf + - sudo + - rsync + - dselect + - iputils-ping + - apt-utils + - aptitude + - zip + - unzip + - bzip2 + - arj + - locate + - curl + - gawk + - mawk + - lynx + - links + - w3m + - 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-5.32 + - 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 + - libreadline-dev - re2c - util-linux - parted @@ -580,7 +695,6 @@ apt_webserver_pkgs: - libgraphicsmagick-q16-3 - libgraphicsmagick1-dev - libgraphviz-dev - - libcroco3-dev - libgsf-1-dev - libilmbase-dev - libvpx-dev diff --git a/hosts b/hosts index de13e0c..ebb7cb4 100644 --- a/hosts +++ b/hosts @@ -72,6 +72,7 @@ server25.warenform.de web0.warenform.de web1.warenform.de web2.warenform.de +web3.warenform.de # Jitsi Meet - Faire Integration server28.warenform.de @@ -244,6 +245,7 @@ server25.warenform.de web0.warenform.de web1.warenform.de web2.warenform.de +web3.warenform.de # server26 server26.warenform.de @@ -518,6 +520,7 @@ lists.mx.warenform.de web0.warenform.de web1.warenform.de web2.warenform.de +web3.warenform.de # server27 verdi-django.warenform.de @@ -556,6 +559,7 @@ vvn-www.warenform.de web0.warenform.de web1.warenform.de web2.warenform.de +web3.warenform.de # server27 verdi-django.warenform.de @@ -868,6 +872,7 @@ lists.mx.warenform.de web0.warenform.de web1.warenform.de web2.warenform.de +web3.warenform.de # --- # - Warenform Office @@ -1235,6 +1240,7 @@ lists.mx.warenform.de web0.warenform.de web1.warenform.de web2.warenform.de +web3.warenform.de # - server26 server26.warenform.de @@ -1515,6 +1521,7 @@ server25.warenform.de web0.warenform.de web1.warenform.de web2.warenform.de +web3.warenform.de # - server26 server26.warenform.de diff --git a/roles/ansible_dependencies-bullseye/tasks/main.yml b/roles/ansible_dependencies-bullseye/tasks/main.yml new file mode 100644 index 0000000..d24c914 --- /dev/null +++ b/roles/ansible_dependencies-bullseye/tasks/main.yml @@ -0,0 +1,47 @@ +--- + +- name: re-synchronize the package index files from their sources + raw: apt-get update + +- name: Ensure aptitude is present + raw: test -e /usr/bin/aptitude || apt-get install aptitude -y + +- name: Ensure python2 is present (This is necessary for ansible to work properly) + raw: test -e /usr/bin/python2 || (apt -y update && apt install -y python) + +- name: Ensure python3 is present (This is necessary for ansible to work properly) + raw: test -e /usr/bin/python3 || (apt -y update && apt install -y python3) + +- name: Ensure python-apt-common is present (This is necessary for ansible to work properly) + raw: test -e /usr/bin/python2 && (apt -y update && apt install -y python-apt-common) + +- name: Ensure python-apt is present (This is necessary for ansible to work properly) + raw: test -e /usr/bin/python3 || (apt -y update && apt install -y python3-apt) + +- name: dpkg --configure -a + command: > + dpkg --configure -a + args: + warn: false + changed_when: _dpkg_configure.stdout_lines | length + register: _dpkg_configure + when: apt_dpkg_configure|bool + tags: + - ansible-dependencies + +- name: apt upgrade + apt: + upgrade: "{{ apt_upgrade_type }}" + update_cache: true + dpkg_options: "{{ apt_upgrade_dpkg_options | join(',') }}" + when: apt_upgrade|bool + tags: + - ansible-dependencies + +- name: apt install ansible dependencies + apt: + name: "{{ apt_ansible_dependencies }}" + state: "{{ apt_install_state }}" + tags: + - ansible-dependencies + diff --git a/roles/ansible_dependencies/tasks/main.yml b/roles/ansible_dependencies/tasks/main.yml index e5d2f88..2981dc8 100644 --- a/roles/ansible_dependencies/tasks/main.yml +++ b/roles/ansible_dependencies/tasks/main.yml @@ -9,8 +9,8 @@ - name: Ensure python2 is present (This is necessary for ansible to work properly) raw: test -e /usr/bin/python2 || (apt -y update && apt install -y python) -- name: Ensure python-apt is present (This is necessary for ansible to work properly) - raw: test -e /usr/bin/python2 && (apt -y update && apt install -y python-apt) +#- name: Ensure python-apt is present (This is necessary for ansible to work properly) +# raw: test -e /usr/bin/python2 && (apt -y update && apt install -y python-apt) - name: Ensure python3 is present (This is necessary for ansible to work properly) raw: test -e /usr/bin/python3 || (apt -y update && apt install -y python3) diff --git a/roles/common/tasks/apt.yml b/roles/common/tasks/apt.yml index 4cced38..75e1814 100644 --- a/roles/common/tasks/apt.yml +++ b/roles/common/tasks/apt.yml @@ -74,6 +74,16 @@ tags: - apt-initial-install +- name: (apt.yml) Initial install debian packages (bullseye) + apt: + name: "{{ apt_initial_install_bullseye }}" + state: "{{ apt_install_state }}" + when: + - ansible_facts['distribution'] == "Debian" + - ansible_facts['distribution_major_version'] == "11" + tags: + - apt-initial-install + - name: (apt.yml) Initial install ubuntu packages (bionic) apt: name: "{{ apt_initial_install_bionic }}" @@ -107,14 +117,14 @@ - apt-initial-install - apt-microcode -- name: (apt.yml) Install CPU microcode (debian buster) +- name: (apt.yml) Install CPU microcode (debian buster/bullseye) apt: name: "{{ microcode_package }}" state: present default_release: "{{ ansible_distribution_release }}" when: - ansible_facts['distribution'] == "Debian" - - ansible_facts['distribution_major_version'] == "10" + - ansible_facts['distribution_major_version'] == "10" or ansible_facts['distribution_major_version'] == "11" - ansible_facts['processor']|string is search("Intel") tags: - apt-initial-install diff --git a/roles/common/templates/etc/apt/sources.list.Debian.j2 b/roles/common/templates/etc/apt/sources.list.Debian.j2 index 8e79f45..3435b36 100644 --- a/roles/common/templates/etc/apt/sources.list.Debian.j2 +++ b/roles/common/templates/etc/apt/sources.list.Debian.j2 @@ -3,8 +3,8 @@ deb {{ apt_debian_mirror }} {{ ansible_lsb.codename }} main {{ '# ' if not apt_src_enable else '' }}deb-src {{ apt_debian_mirror }} {{ ansible_lsb.codename }} main -deb http://security.debian.org/ {{ ansible_lsb.codename }}/updates main -{{ '# ' if not apt_src_enable else '' }}deb-src http://security.debian.org/ {{ ansible_lsb.codename }}/updates main +{{ '# ' if ansible_lsb.codename == "bullseye" else '' }}deb http://security.debian.org/ {{ ansible_lsb.codename }}/updates main +{{ '# ' if not apt_src_enable or ansible_lsb.codename == "bullseye" else '' }}deb-src http://security.debian.org/ {{ ansible_lsb.codename }}/updates main # {{ ansible_lsb.codename }}-updates, previously known as 'volatile' deb {{ apt_debian_mirror }} {{ ansible_lsb.codename }}-updates main