Browse Source

prepare_host.yaml: new apt pkg style and tab fixed

- New apt multipackage style

- Tabulation in `templates/interfaces.j2` and in `/etc/lvm/lvm.conf`
  line fixed: in Debian buster tabulation is used to indent this config
  files by default.
python3
Zolfa 4 years ago
parent
commit
1ca84a3319
Signed by: zolfa GPG Key ID: E1A43B038C4D6616
3 changed files with 16 additions and 19 deletions
  1. +1
    -1
      MIGRATION.md
  2. +11
    -14
      prepare_host.yaml
  3. +4
    -4
      templates/interfaces.j2

+ 1
- 1
MIGRATION.md View File

@ -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 | |


+ 11
- 14
prepare_host.yaml View File

@ -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:


+ 4
- 4
templates/interfaces.j2 View File

@ -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 }}

Loading…
Cancel
Save