diff --git a/MIGRATION.md b/MIGRATION.md index 4ddf0e7..507af19 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -23,7 +23,7 @@ On the hosts: |`roles/service` | **YES** | **YES** | NO | Changes in Ansible built-in `apt` module. | |`roles/ssh_server` | **YES** | **YES** | NO | `lxc_ssh.py` --> `ssh_lxc.py`. | |`roles/ca` | **YES** | ReadNote | NO | Changes in Ansible built-in `apt` module. Needs update of `ca_manager` to [1] to work. | -|`prepare_host.yaml` | **YES** | NO | NO | Install `python3` and `python3-lxc` instead of version 2. | +|`prepare_host.yaml` | **YES** | **YES** | NO | Debian stretch --> buster and Python 2 --> 3 | |`roles/ldap` | NO | NO | NO | | |`roles/nginx` | NO | NO | NO | | |`roles/projects` | NO | NO | NO | | diff --git a/prepare_host.yaml b/prepare_host.yaml index 51764fc..c8c6e19 100644 --- a/prepare_host.yaml +++ b/prepare_host.yaml @@ -8,14 +8,13 @@ tasks: - name: install lxc related packages apt: - name: "{{ item }}" + pkg: + - lxc + - python3 + - python3-lxc state: present update_cache: yes cache_valid_time: 3600 - with_items: - - lxc - - python3 - - python3-lxc - name: install common lxc filesystem support apt: @@ -24,13 +23,12 @@ - name: install network bridge utilities apt: - name: "{{ item }}" + pkg: + - bridge-utils + - vlan state: present update_cache: yes cache_valid_time: 3600 - with_items: - - bridge-utils - - vlan notify: restart networking # We should fix this bug. We really should. It's a bug. # Bridge-utils requires a complete system reboot to enable the new bridge. @@ -43,19 +41,18 @@ - name: install utilities apt: - name: "{{ item }}" + pkg: + - vim + - htop state: present update_cache: yes cache_valid_time: 3600 - with_items: - - vim - - htop - name: enable lvm wipe signature lineinfile: dest: /etc/lvm/lvm.conf state: present - line: " wipe_signatures_when_zeroing_new_lvs = 0" + line: " wipe_signatures_when_zeroing_new_lvs = 0" regexp: '^\s*.+wipe_signatures_when_zeroing_new_lvs = ' notify: restart lvm handlers: diff --git a/templates/interfaces.j2 b/templates/interfaces.j2 index d711185..3ce8631 100644 --- a/templates/interfaces.j2 +++ b/templates/interfaces.j2 @@ -10,12 +10,12 @@ iface lo inet loopback # The primary network interface auto br0 iface br0 inet manual - bridge_ports {{ ansible_default_ipv4.alias }}.{{ virtual_machine_vlan }} - bridge_fd 1 + bridge_ports {{ ansible_default_ipv4.alias }}.{{ virtual_machine_vlan }} + bridge_fd 1 auto {{ ansible_default_ipv4.alias }} iface {{ ansible_default_ipv4.alias }} inet static address {{ ansible_default_ipv4.address }} - gateway {{ hostvars | ip_from_inventory('management_gateway') }} - netmask 255.255.255.0 + gateway {{ hostvars | ip_from_inventory('management_gateway') }} + netmask 255.255.255.0 vlan-raw-device {{ ansible_default_ipv4.alias }}