From 3c18d5da449d2e991f9ce92675475547c1e7e67a Mon Sep 17 00:00:00 2001 From: root Date: Sun, 4 Sep 2022 17:07:52 +0200 Subject: [PATCH] tisztitas --- files/ntp.conf.patch.jessie | 14 --------- files/ntp.conf.patch.stretch | 19 ------------ tasks/main.yml | 57 +++++++++++++++++++++++------------- 3 files changed, 37 insertions(+), 53 deletions(-) delete mode 100644 files/ntp.conf.patch.jessie delete mode 100644 files/ntp.conf.patch.stretch diff --git a/files/ntp.conf.patch.jessie b/files/ntp.conf.patch.jessie deleted file mode 100644 index 2f91d8c..0000000 --- a/files/ntp.conf.patch.jessie +++ /dev/null @@ -1,14 +0,0 @@ ---- 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 deleted file mode 100644 index a94fcbb..0000000 --- a/files/ntp.conf.patch.stretch +++ /dev/null @@ -1,19 +0,0 @@ ---- 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/tasks/main.yml b/tasks/main.yml index f2539a0..1ddea2b 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -31,6 +31,7 @@ src: sources.list.jessie dest: /etc/apt/sources.list when: + - ansible_distribution == "Debian" - ansible_distribution_major_version == "8" - name: apt sources.list stretch @@ -39,6 +40,7 @@ src: sources.list.stretch dest: /etc/apt/sources.list when: + - ansible_distribution == "Debian" - ansible_distribution_major_version == "9" - name: apt sources.list buster @@ -47,6 +49,7 @@ src: sources.list.buster dest: /etc/apt/sources.list when: + - ansible_distribution == "Debian" - ansible_distribution_major_version == "10" - name: apt sources.list bullseye @@ -55,6 +58,7 @@ src: sources.list.bullseye dest: /etc/apt/sources.list when: + - ansible_distribution == "Debian" - ansible_distribution_major_version == "11" - name: apt.conf allow unauthenticated jessie @@ -65,6 +69,7 @@ line: 'APT::Get::AllowUnauthenticated "1";' create: yes when: + - ansible_distribution == "Debian" - ansible_distribution_major_version == "8" - name: apt.conf allow expired jessie @@ -75,6 +80,7 @@ line: 'Acquire::Check-Valid-Until "0";' create: yes when: + - ansible_distribution == "Debian" - ansible_distribution_major_version == "8" - name: apt update @@ -93,7 +99,7 @@ apt: upgrade: full -- name: install packages +- name: install common packages for all opsys versions tags: apt apt: name: "{{ item }}" @@ -102,12 +108,8 @@ - bind9-host - bzip2 - curl - #- dnsutils - #- bind9-dnsutils - - bind9utils - file - git - #- heirloom-mailx - bsd-mailx - iotop - libpam-systemd @@ -144,6 +146,28 @@ - net-tools - man +- name: install packages for debian buster and older + tags: apt + apt: + name: "{{ item }}" + state: present + with_items: + - dnsutils + when: + - ansible_distribution == "Debian" + - ansible_distribution_major_version|int() <= 10 + +- name: install packages for debian bullseye and newer + tags: apt + apt: + name: "{{ item }}" + state: present + with_items: + - bind9-utils + when: + - ansible_distribution == "Debian" + - ansible_distribution_major_version|int() <= 11 + - name: open-vm-tools apt: name: open-vm-tools @@ -169,6 +193,7 @@ 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' + # XXX - name: copy pf6 package tags: pf6 @@ -200,6 +225,7 @@ src: default_grub.patch.jessie dest: /etc/default/grub when: + - ansible_distribution == "Debian" - ansible_distribution_major_version == "8" - name: grub defaults, stretch+ @@ -208,6 +234,7 @@ src: default_grub.patch.stretch dest: /etc/default/grub when: + - ansible_distribution == "Debian" - ansible_distribution_major_version|int() >= 9 - name: update-grub @@ -225,21 +252,6 @@ 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 @@ -263,6 +275,7 @@ regexp: "noquery limited" replace: "noquery" when: + - ansible_distribution == "Debian" - ansible_distribution_major_version|int() >= 9 @@ -272,6 +285,7 @@ src: postfix_master.cf.patch.jessie dest: /etc/postfix/master.cf when: + - ansible_distribution == "Debian" - ansible_distribution_major_version == "8" - name: postfix master.cf stretch-buster @@ -280,6 +294,7 @@ src: postfix_master.cf.patch.stretch dest: /etc/postfix/master.cf when: + - ansible_distribution == "Debian" - (ansible_distribution_major_version|int() == 9) or (ansible_distribution_major_version|int() == 10) @@ -289,6 +304,7 @@ src: postfix_master.cf.patch.bullseye dest: /etc/postfix/master.cf when: + - ansible_distribution == "Debian" - ansible_distribution_major_version|int() == 11 - name: postfix relay @@ -297,6 +313,7 @@ dest: /etc/postfix/main.cf regexp: '^relayhost\s' line: "relayhost = mail-out.i.hwstudio.hu" + # XXX - name: pvresize /dev/sdb tags: