From c8abd13f861aba5bf0e719b8602a34db31022dc3 Mon Sep 17 00:00:00 2001 From: michael Date: Mon, 31 Oct 2022 00:56:06 +1300 Subject: [PATCH] begin disk config --- ansible/playbooks/03_vm_deploy.yaml | 21 ++++++++++++++------- ansible/roles/k8s_control/tasks/main.yaml | 1 + ansible/roles/vm_disks/tasks/main.yaml | 10 ++++++++++ 3 files changed, 25 insertions(+), 7 deletions(-) create mode 100644 ansible/roles/k8s_control/tasks/main.yaml create mode 100644 ansible/roles/vm_disks/tasks/main.yaml diff --git a/ansible/playbooks/03_vm_deploy.yaml b/ansible/playbooks/03_vm_deploy.yaml index d37cfae..5770745 100644 --- a/ansible/playbooks/03_vm_deploy.yaml +++ b/ansible/playbooks/03_vm_deploy.yaml @@ -1,10 +1,10 @@ --- -- name: create the vms - hosts: hv00 - gather_facts: true - become: true - roles: - - vm_deploy +# - name: create the vms +# hosts: hv00 +# gather_facts: true +# become: true +# roles: +# - vm_deploy # - name: python bootstrap # hosts: k8s @@ -19,4 +19,11 @@ # become: true # roles: # - sshd -# - firewall \ No newline at end of file +# - firewall + +- name: configure vm disks + hosts: k8s + gather_facts: true + become: true + roles: + - vm_disks \ No newline at end of file diff --git a/ansible/roles/k8s_control/tasks/main.yaml b/ansible/roles/k8s_control/tasks/main.yaml new file mode 100644 index 0000000..ed97d53 --- /dev/null +++ b/ansible/roles/k8s_control/tasks/main.yaml @@ -0,0 +1 @@ +--- diff --git a/ansible/roles/vm_disks/tasks/main.yaml b/ansible/roles/vm_disks/tasks/main.yaml new file mode 100644 index 0000000..d744900 --- /dev/null +++ b/ansible/roles/vm_disks/tasks/main.yaml @@ -0,0 +1,10 @@ +--- + +- name: create gpt labels + community.general.parted: + device: "{{ item }}" + label: gpt + with_items: + - /dev/vdb + - /dev/vdc + - /dev/vdd \ No newline at end of file