configure for ipv6 dual stack

This commit is contained in:
2022-12-06 01:56:55 +13:00
parent 5c72b57d9c
commit 678da5e314
9 changed files with 117 additions and 75 deletions

View File

@ -0,0 +1,53 @@
---
- name: setup disks on storage nodes
delegate_to: "{{ node }}"
delegate_facts: true
block:
- name: ensure parted is installed
community.general.pacman:
name: parted
state: latest
update_cache: false
when:
- ansible_os_family == 'Archlinux'
- name: create containerd image partition
community.general.parted:
device: "{{ item.disk }}"
align: optimal
name: "{{ item.part }}"
label: gpt
number: 1
part_start: 0%
part_end: 100%
state: present
fs_type: ext4
with_items:
- disk: /dev/vdc
part: ebs-ssd
- disk: /dev/vdd
part: ebs-hdd
- name: create containerd partition filesystem
community.general.filesystem:
dev: "{{ item }}"
fstype: ext4
resizefs: true
state: present
with_items:
- /dev/disk/by-partlabel/ebs-ssd
- /dev/disk/by-partlabel/ebs-hdd
- name: mount ebs disks
ansible.posix.mount:
state: mounted
src: "{{ item.src }}"
path: "{{ item.path }}"
fstype: ext4
boot: true
with_items:
- src: /dev/disk/by-partlabel/ebs-ssd
path: /ebs/ssd
- src: /dev/disk/by-partlabel/ebs-hdd
path: /ebs/hdd

View File

@ -1,4 +1,12 @@
---
- name: setup disks for ebs
ansible.builtin.include_tasks:
file: disks.yaml
with_items:
- "{{ groups['k8s_storage'] }}"
loop_control:
loop_var: node
- name: create target directory for open-ebs files
become: false
ansible.builtin.file:

View File

@ -1,60 +0,0 @@
---
# - name: create mount directories for ebs drives
# ansible.builtin.file:
# path: "{{ item }}"
# state: directory
# owner: root
# group: root
# mode: 0775
# with_items:
# - /ebs
# - /ebs/ssd
# - /ebs/hdd
- name: ensure parted is installed
community.general.pacman:
name: parted
state: latest
update_cache: true
when:
- ansible_os_family == 'Archlinux'
- name: create containerd image partition
community.general.parted:
device: "{{ item.disk }}"
align: optimal
name: "{{ item.part }}"
label: gpt
number: 1
part_start: 0%
part_end: 100%
state: present
fs_type: ext4
with_items:
- disk: /dev/vdc
part: ebs-ssd
- disk: /dev/vdd
part: ebs-hdd
- name: create containerd partition filesystem
community.general.filesystem:
dev: "{{ item }}"
fstype: ext4
resizefs: true
state: present
with_items:
- /dev/disk/by-partlabel/ebs-ssd
- /dev/disk/by-partlabel/ebs-hdd
- name: mount ebs disks
ansible.posix.mount:
state: mounted
src: "{{ item.src }}"
path: "{{ item.path }}"
fstype: ext4
boot: true
with_items:
- src: /dev/disk/by-partlabel/ebs-ssd
path: /ebs/ssd
- src: /dev/disk/by-partlabel/ebs-hdd
path: /ebs/hdd