ubuntu20.04

This commit is contained in:
ROTTLER Tamas 2022-09-07 02:40:51 +02:00
parent 2e97d95cdf
commit d3a318adab

View File

@ -25,6 +25,20 @@
state: absent
purge: yes
- name: remove ubuntu cloud init, etc.
tags: apt
apt:
name:
- cloud-init
- cloud-guest-utils
- cloud-initramfs-dyn-netconf
- cloud-initramfs-copymods
- netplan.io
state: absent
purge: yes
when:
- ansible_distribution == "Ubuntu"
- name: apt sources.list jessie
tags: apt
copy:
@ -58,8 +72,7 @@
src: sources.list.bullseye
dest: /etc/apt/sources.list
when:
- ansible_distribution == "Debian"
- ansible_distribution_major_version == "11"
- (ansible_distribution == "Debian" and ansible_distribution_major_version|int() >= 11)
- name: apt.conf allow unauthenticated jessie
tags: apt
@ -102,9 +115,7 @@
- name: install common packages for all opsys versions
tags: apt
apt:
name: "{{ item }}"
state: present
with_items:
name:
- bind9-host
- bzip2
- curl
@ -145,14 +156,15 @@
- libjson-perl
- net-tools
- man
- ifupdown
state: present
- name: install packages for debian buster and older
tags: apt
apt:
name: "{{ item }}"
state: present
with_items:
name:
- dnsutils
state: present
when:
- ansible_distribution == "Debian"
- ansible_distribution_major_version|int() <= 10
@ -160,13 +172,12 @@
- name: install packages for debian bullseye and newer
tags: apt
apt:
name: "{{ item }}"
state: present
with_items:
name:
- bind9-utils
state: present
when:
- ansible_distribution == "Debian"
- ansible_distribution_major_version|int() <= 11
- (ansible_distribution == "Debian" and ansible_distribution_major_version|int() >= 11) or
(ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int() >= 20)
- name: open-vm-tools
apt:
@ -192,8 +203,7 @@
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'
# XXX
key: "{{ mgmt_ssh_key }}"
- name: copy pf6 package
tags: pf6
@ -234,8 +244,16 @@
src: default_grub.patch.stretch
dest: /etc/default/grub
when:
- ansible_distribution == "Debian"
- ansible_distribution_major_version|int() >= 9
- (ansible_distribution == "Debian" and ansible_distribution_major_version|int() >= 9)
- name: grub defaults, stretch+
tags: grub
lineinfile:
path: /etc/default/grub
regexp: "^GRUB_CMDLINE_LINUX="
line: 'GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"'
when:
- (ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int() >= 20)
- name: update-grub
tags: grub
@ -275,8 +293,8 @@
regexp: "noquery limited"
replace: "noquery"
when:
- ansible_distribution == "Debian"
- ansible_distribution_major_version|int() >= 9
- (ansible_distribution == "Debian" and ansible_distribution_major_version|int() >= 9) or
(ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int() >= 20)
- name: postfix master.cf jessie
@ -304,16 +322,23 @@
src: postfix_master.cf.patch.bullseye
dest: /etc/postfix/master.cf
when:
- ansible_distribution == "Debian"
- ansible_distribution_major_version|int() == 11
- (ansible_distribution == "Debian" and ansible_distribution_major_version|int() >= 11)
- name: postfix relay
- name: postfix master.cf ubuntu 20.04
tags: postfix
patch:
src: postfix_master.cf.patch.ubuntu20.04
dest: /etc/postfix/master.cf
when:
- (ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int() >= 20)
- name: postfix relayhost
tags: postfix
lineinfile:
dest: /etc/postfix/main.cf
regexp: '^relayhost\s'
line: "relayhost = mail-out.i.hwstudio.hu"
# XXX
line: "relayhost = {{ postfix_relayhost }}"
when: postfix_relayhost is defined
- name: pvresize /dev/sdb
tags: