From d0ecf1d2c8c961aab73207e48a14d355e2dc4914 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 4 Sep 2022 16:11:49 +0200 Subject: [PATCH] v220904 --- files/default_grub.patch.jessie | 20 ++ files/default_grub.patch.stretch | 21 ++ files/ntp.conf.patch.jessie | 14 ++ files/ntp.conf.patch.stretch | 19 ++ files/pf6_1_all.deb | Bin 0 -> 5084 bytes files/postfix_master.cf.patch.bullseye | 58 +++++ files/postfix_master.cf.patch.jessie | 59 +++++ files/postfix_master.cf.patch.stretch | 60 +++++ files/sources.list.bullseye | 9 + files/sources.list.buster | 12 + files/sources.list.jessie | 11 + files/sources.list.stretch | 9 + files/sysstat_minutely.patch | 13 + tasks/main.yml | 334 +++++++++++++++++++++++++ 14 files changed, 639 insertions(+) create mode 100644 files/default_grub.patch.jessie create mode 100644 files/default_grub.patch.stretch create mode 100644 files/ntp.conf.patch.jessie create mode 100644 files/ntp.conf.patch.stretch create mode 100644 files/pf6_1_all.deb create mode 100644 files/postfix_master.cf.patch.bullseye create mode 100644 files/postfix_master.cf.patch.jessie create mode 100644 files/postfix_master.cf.patch.stretch create mode 100644 files/sources.list.bullseye create mode 100644 files/sources.list.buster create mode 100644 files/sources.list.jessie create mode 100644 files/sources.list.stretch create mode 100644 files/sysstat_minutely.patch create mode 100644 tasks/main.yml diff --git a/files/default_grub.patch.jessie b/files/default_grub.patch.jessie new file mode 100644 index 0000000..d68ee11 --- /dev/null +++ b/files/default_grub.patch.jessie @@ -0,0 +1,20 @@ +--- grub.ori 2017-09-18 01:04:28.265436361 +0200 ++++ grub 2017-09-18 01:04:50.625436003 +0200 +@@ -6,7 +6,7 @@ + GRUB_DEFAULT=0 + GRUB_TIMEOUT=5 + GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` +-GRUB_CMDLINE_LINUX_DEFAULT="quiet" ++GRUB_CMDLINE_LINUX_DEFAULT="" + GRUB_CMDLINE_LINUX="" + + # Uncomment to enable BadRAM filtering, modify to suit your needs +@@ -15,7 +15,7 @@ + #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef" + + # Uncomment to disable graphical terminal (grub-pc only) +-#GRUB_TERMINAL=console ++GRUB_TERMINAL=console + + # The resolution used on graphical terminal + # note that you can use only modes which your graphic card supports via VBE diff --git a/files/default_grub.patch.stretch b/files/default_grub.patch.stretch new file mode 100644 index 0000000..dfdaa55 --- /dev/null +++ b/files/default_grub.patch.stretch @@ -0,0 +1,21 @@ +--- grub.ori 2017-09-18 01:04:28.265436361 +0200 ++++ grub 2017-09-18 01:04:50.625436003 +0200 +@@ -6,7 +6,7 @@ + GRUB_DEFAULT=0 + GRUB_TIMEOUT=5 + GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` +-GRUB_CMDLINE_LINUX_DEFAULT="quiet" +-GRUB_CMDLINE_LINUX="" ++GRUB_CMDLINE_LINUX_DEFAULT="" ++GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0" + + # Uncomment to enable BadRAM filtering, modify to suit your needs +@@ -15,7 +15,7 @@ + #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef" + + # Uncomment to disable graphical terminal (grub-pc only) +-#GRUB_TERMINAL=console ++GRUB_TERMINAL=console + + # The resolution used on graphical terminal + # note that you can use only modes which your graphic card supports via VBE diff --git a/files/ntp.conf.patch.jessie b/files/ntp.conf.patch.jessie new file mode 100644 index 0000000..2f91d8c --- /dev/null +++ b/files/ntp.conf.patch.jessie @@ -0,0 +1,14 @@ +--- ntp.conf.ori 2017-09-18 01:26:51.409414891 +0200 ++++ ntp.conf 2017-09-18 01:27:24.501414362 +0200 +@@ -18,10 +18,7 @@ + # pool.ntp.org maps to about 1000 low-stratum NTP servers. Your server will + # pick a different set every time it starts up. Please consider joining the + # pool: +-server 0.debian.pool.ntp.org iburst +-server 1.debian.pool.ntp.org iburst +-server 2.debian.pool.ntp.org iburst +-server 3.debian.pool.ntp.org iburst ++server 10.93.163.98 iburst + + + # Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for diff --git a/files/ntp.conf.patch.stretch b/files/ntp.conf.patch.stretch new file mode 100644 index 0000000..a94fcbb --- /dev/null +++ b/files/ntp.conf.patch.stretch @@ -0,0 +1,19 @@ +--- ntp.conf.ori 2017-08-08 22:44:37.000000000 +0200 ++++ ntp.conf 2018-01-30 03:01:54.819979694 +0100 +@@ -17,10 +17,12 @@ + # pool.ntp.org maps to about 1000 low-stratum NTP servers. Your server will + # pick a different set every time it starts up. Please consider joining the + # pool: +-pool 0.debian.pool.ntp.org iburst +-pool 1.debian.pool.ntp.org iburst +-pool 2.debian.pool.ntp.org iburst +-pool 3.debian.pool.ntp.org iburst ++#pool 0.debian.pool.ntp.org iburst ++#pool 1.debian.pool.ntp.org iburst ++#pool 2.debian.pool.ntp.org iburst ++#pool 3.debian.pool.ntp.org iburst ++ ++server 10.93.163.98 iburst + + + # Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for diff --git a/files/pf6_1_all.deb b/files/pf6_1_all.deb new file mode 100644 index 0000000000000000000000000000000000000000..24bc8026a14503ff693ed63809ad9d61efb7dbff GIT binary patch literal 5084 zcmai&XD}R!*Tz?k?yAw-s?ip!vqUdf4;IneB3ekaXi=m0-lIepoe-jz=-m=+5i6|d zvDo+Cci#8^_5YhQXXg2EzMPronK_4D&i1uE3_|4KXy;<^_MRTTuRUK0`P#k~at{3O^U`3c|ID+- z69E1N7v}`(o(z{DnO;GfdUb`o5`h2K7J_%vK*MQQo66)bCqX35syqX0S?uF}I&-WF zfC3xGvgOC@x*@`#f*{mz#6BB%YKc zk6hzfw?XQD6-}4vBlN~yS1-B0U`fTRTCK%T>MirqQrc-oeW>C=uOc1D?@($-1JQ6V zaC{OjX68X}F5^Y(0B*rsW3^~!S%QtN_e?v8m@Q6htdnwy8v2VpCd|w*2Ao@bt}r1s zgAoaC&JO;~EU2P=l?MZZlwV`b1OgeIRK}5kI0-%o{a0a)7|MEif#dZkV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iJyKNXhGRE#B9z{2w028{K=4N?{>$CYSV9X7A>J z{_P640=frFS<~SM)%Z$g&IeiSXX*PjLxSlyI!~4B*BJAxJ)nGkSlN5*@vhf}f%YHz z?oHIzv=e@i>c>FsuHRwO97*jFb*uCZY2Ym50h_07o+nZrV+uhThO1l&d!rMj&$QX7 zA~+$`1HswU9`!em3NpN(G7>t}o^5|M_ud*D=g@Ai9*QlA>@tNs{A79l)VE5jb3Tk) zNhjbgajHpS%2}mr(N4EVTx=D}5^*qP>O$mTc}V&$^KF60vg#id|Fd)G01Awb<|om8 zT-rTUwbfh*8*$em9@ma9mfh4Fe4R^AfQ1skDn>+QhFaKJ?tj0iYZr+Eec;*ZA(}>o z$>15z#9XvkI6ispV=$I>^6|;v)wDiKR#i)1z{6WlY->}8y46#e`fIl!l|GgluB&(v z@$iPL>n7*K;8D}}%gd^Y+8toonz+$S^6)v8z9_!Y&k|Sp6amBc6=Y1pto$$XDcZ$? z8Ees$^SL4W_Jps$-lvUp+^tE1tZ1PR;-ADd+cjiL9{ZG>OIj?yQ4{(g4}z&OPy)JL zQ_Y{}BtbuB(lEi8w&{y}oBCRRJb8GSA*44CNx~$D_6UZW(PNjWyeBk7{oIpF5J@2C zV{MbX>*dGsP<8$KCy$s@O|sIEb~xbPkt=^QWeFr+qE;!b>TAC%GDKV)aSZY03niAR znLry}Z``iRCbWO{4E^|I2sEXaRMXts8pp6mgN9cWQrLyYnj;eGlP^N%wv}(_z zv~=qY>!N<-`{KT5pZUg+=cCNyEwDCGk{i0@f9_^TF25oGYmg /dev/null && debian-sa1 1 1 ++# Activity reports ++* * * * * root command -v debian-sa1 > /dev/null && debian-sa1 1 1 + + # Additional run at 23:59 to rotate the statistics file + 59 23 * * * root command -v debian-sa1 > /dev/null && debian-sa1 60 2 diff --git a/tasks/main.yml b/tasks/main.yml new file mode 100644 index 0000000..f2539a0 --- /dev/null +++ b/tasks/main.yml @@ -0,0 +1,334 @@ +--- +- name: /tmp bind mount in fstab + lineinfile: + dest: /etc/fstab + line: '/var/tmp /tmp none bind 0 0' + register: fstab_tmp + +- name: mount /tmp + shell: 'mv /tmp/ /old-tmp; mkdir /tmp; mount /tmp; mv /old-tmp /tmp' + when: fstab_tmp.changed + +- name: apt.conf proxy + lineinfile: + dest: /etc/apt/apt.conf + regexp: '^Acquire::http::Proxy' + line: 'Acquire::http::Proxy "{{ aptproxy }}";' + create: yes + when: + - aptproxy is defined + +- name: remove nano + tags: apt + apt: + name: nano + state: absent + purge: yes + +- name: apt sources.list jessie + tags: apt + copy: + src: sources.list.jessie + dest: /etc/apt/sources.list + when: + - ansible_distribution_major_version == "8" + +- name: apt sources.list stretch + tags: apt + copy: + src: sources.list.stretch + dest: /etc/apt/sources.list + when: + - ansible_distribution_major_version == "9" + +- name: apt sources.list buster + tags: apt + copy: + src: sources.list.buster + dest: /etc/apt/sources.list + when: + - ansible_distribution_major_version == "10" + +- name: apt sources.list bullseye + tags: apt + copy: + src: sources.list.bullseye + dest: /etc/apt/sources.list + when: + - ansible_distribution_major_version == "11" + +- name: apt.conf allow unauthenticated jessie + tags: apt + lineinfile: + dest: /etc/apt/apt.conf + regexp: '^APT::Get::AllowUnauthenticated' + line: 'APT::Get::AllowUnauthenticated "1";' + create: yes + when: + - ansible_distribution_major_version == "8" + +- name: apt.conf allow expired jessie + tags: apt + lineinfile: + dest: /etc/apt/apt.conf + regexp: '^Acquire::Check-Valid-Until' + line: 'Acquire::Check-Valid-Until "0";' + create: yes + when: + - ansible_distribution_major_version == "8" + +- name: apt update + tags: apt + apt: + update_cache: yes + +- name: install packages + tags: apt + apt: + name: aptitude + state: present + +- name: apt full-upgrade + tags: apt + apt: + upgrade: full + +- name: install packages + tags: apt + apt: + name: "{{ item }}" + state: present + with_items: + - bind9-host + - bzip2 + - curl + #- dnsutils + #- bind9-dnsutils + - bind9utils + - file + - git + #- heirloom-mailx + - bsd-mailx + - iotop + - libpam-systemd + - locales + - lsof + - make + - mc + - mlocate + - mtr-tiny + - ngrep + - ntp + - ntpdate + - openssl + - parted + - patch + - postfix + - psmisc + - pwgen + - rename + - rsync + - screen + - strace + - subversion + - sysstat + - tcpdump + - telnet + - unzip + - vim + - w3m + - xz-utils + - zip + - libfile-slurp-perl + - libjson-perl + - net-tools + - man + +- name: open-vm-tools + apt: + name: open-vm-tools + state: present + purge: yes + tags: + - vmware + - apt + +- name: remove install user + user: + name: install + state: absent + force: yes + +- name: remove install user's home directory + file: + path: /home/install + state: absent + +- name: "remove our key from root's authorized_keys" + authorized_key: + user: root + state: absent + key: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDWZi5nTI6zo3+cgGx5l163pEQXJ3aUyerqbHfQl9p8aB2bbe+vQl+Uc2Vrv8fvytAZizjPIIYdW5RqFAXrbNP+OpyFAONNZpX0omB8HLoHzOnmWpaCjMZp9XAdvWPknWFWWkwR5G5rbP5+dKeREzl4cAvW4GauEjaK4kUJF3K2HumVF6U3bzyDwnI+7h0zEbHddSOwAP1Opzla+WSdF+ZsiMdcVZE/mFxzd8sv1ZoO36sVZ1vItEAcols4qEAfwW8Gk/UjXI1XFRD1UrksAUxAc4ypu5oBVWtjMa429ZrCRbH2iU+TPbuUSXHJQMgTqsUgHrS9XkuS3EdbPA/aDMD1jhoYz2zyfAoCGdEBOuATlaoCOpOeSc9XIsasdVNwvtX2LCTlQe+LLOQzKiLaHEr/QmnLs8es8b68wtDlFIA2QAXYIfs8l+gBv3t3BIw7VPbMe8nb6hbTHFObDlVCyvXO2/6ZkOfRMgswFsQnGAqciowPxsjVer+I5hEBCMHgb6pxcUECxcxsc9P/w/z9LxGts9Ozyq55jzWMwvnFdarkzpMfWtt3QX7XG5B8OD4ghuMkX60GgvT7v1E7yTI/JtwXrsAc6jl1Qo4+TDdEYuBXe/LqyQzQ7GD1OoGRHIKCWyAQ9JiHcbUYX9p+vafXf0l1jelSg3O+cU+q+oZdGP178w== root@kavics' + +- name: copy pf6 package + tags: pf6 + copy: + src: pf6_1_all.deb + dest: /tmp + +- name: install pf6 package + tags: pf6 + apt: + deb: /tmp/pf6_1_all.deb + +- name: sysstat enable + tags: sysstat + lineinfile: + dest: /etc/default/sysstat + regexp: "^ENABLED=" + line: 'ENABLED="true"' + +- name: sysstat every minute + tags: sysstat + patch: + src: sysstat_minutely.patch + dest: /etc/cron.d/sysstat + +- name: grub defaults, jessie + tags: grub + patch: + src: default_grub.patch.jessie + dest: /etc/default/grub + when: + - ansible_distribution_major_version == "8" + +- name: grub defaults, stretch+ + tags: grub + patch: + src: default_grub.patch.stretch + dest: /etc/default/grub + when: + - ansible_distribution_major_version|int() >= 9 + +- name: update-grub + tags: grub + command: update-grub + +- name: edit locale.gen + tags: locales + replace: + dest: /etc/locale.gen + regexp: '^#\s*(hu_HU|en_US)' + replace: '\1' + +- name: run locale-gen + tags: locales + command: locale-gen + +#- name: ntp.conf jessie +# tags: ntp +# patch: +# src: ntp.conf.patch.jessie +# dest: /etc/ntp.conf +# when: +# - ansible_distribution_major_version == "8" +# +#- name: ntp.conf stretch +# tags: ntp +# patch: +# src: ntp.conf.patch.stretch +# dest: /etc/ntp.conf +# when: +# - ansible_distribution_major_version|int() >= 9 + +- name: ntp.conf remove factory ntp servers + tags: ntp + lineinfile: + dest: /etc/ntp.conf + regexp: '^(pool|server)\s' + state: absent + +- name: ntp.conf set ntp server + tags: ntp + lineinfile: + dest: /etc/ntp.conf + regexp: '^(pool|server)\s' + line: "server {{ ntp }} iburst" + insertafter: '^# pool:' + +- name: ntp.conf stretch+ remove limited + tags: ntp + replace: + path: /etc/ntp.conf + regexp: "noquery limited" + replace: "noquery" + when: + - ansible_distribution_major_version|int() >= 9 + + +- name: postfix master.cf jessie + tags: postfix + patch: + src: postfix_master.cf.patch.jessie + dest: /etc/postfix/master.cf + when: + - ansible_distribution_major_version == "8" + +- name: postfix master.cf stretch-buster + tags: postfix + patch: + src: postfix_master.cf.patch.stretch + dest: /etc/postfix/master.cf + when: + - (ansible_distribution_major_version|int() == 9) or + (ansible_distribution_major_version|int() == 10) + +- name: postfix master.cf bullseye + tags: postfix + patch: + src: postfix_master.cf.patch.bullseye + dest: /etc/postfix/master.cf + when: + - ansible_distribution_major_version|int() == 11 + +- name: postfix relay + tags: postfix + lineinfile: + dest: /etc/postfix/main.cf + regexp: '^relayhost\s' + line: "relayhost = mail-out.i.hwstudio.hu" + +- name: pvresize /dev/sdb + tags: + - lvm + - vmware + command: 'pvresize /dev/sdb' + +- name: /data in fstab + tags: lvm + lineinfile: + dest: /etc/fstab + line: '/dev/mapper/vg00-data /data ext4 defaults 0 2' + register: fstab_data + +- name: create /dev/vg00/data + tags: lvm + lvol: + vg: vg00 + lv: data + size: "{{ datasize | default('50%FREE') }}" + when: fstab_data.changed + +- name: ext4 filesystem on /dev/vg00/data + tags: lvm + filesystem: + dev: /dev/vg00/data + fstype: ext4 + when: fstab_data.changed + +- name: mount /data + tags: lvm + shell: 'mkdir -p /data && mount /data' + when: fstab_data.changed + +# vim: set tabstop=2 shiftwidth=2 expandtab smarttab: