Commit 2a78d320 by ansible

no message

1 parent 8f160391
---
- hosts: New Server
become: true
tasks:
- import_role:
name: partition
---
- hosts: 02_vdc-disk
become: true
tasks:
- name: Create partiton
parted:
device: "{{ item.device }}"
number: "{{ item.number }}"
part_end: "{{ item.end }}"
part_start: "{{ item.start }}"
state: present
# part_type: logical
with_items:
- { device: "/dev/vdc", number: "1", start: "0%", end: "40%" }
- { device: "/dev/vdc", number: "2", start: "41%", end: "80%" }
- { device: "/dev/vdc", number: "3", start: "81%", end: "90%" }
- { device: "/dev/vdc", number: "4", start: "91%", end: "100%" }
- hosts: 02_sdb-disk
become: true
tasks:
- name: Create partiton
parted:
device: "{{ item.device }}"
number: "{{ item.number }}"
part_end: "{{ item.end }}"
part_start: "{{ item.start }}"
state: present
# part_type: logical
with_items:
- { device: "/dev/sdb", number: "1", start: "0%", end: "40%" }
- { device: "/dev/sdb", number: "2", start: "41%", end: "80%" }
- { device: "/dev/sdb", number: "3", start: "81%", end: "90%" }
- { device: "/dev/sdb", number: "4", start: "91%", end: "100%" }
- hosts: 02_vdb-disk
become: true
tasks:
- name: Create partiton
parted:
device: "{{ item.device }}"
number: "{{ item.number }}"
part_end: "{{ item.end }}"
part_start: "{{ item.start }}"
state: present
# part_type: logical
with_items:
- { device: "/dev/vdb", number: "1", start: "0%", end: "40%" }
- { device: "/dev/vdb", number: "2", start: "41%", end: "80%" }
- { device: "/dev/vdb", number: "3", start: "81%", end: "90%" }
- { device: "/dev/vdb", number: "4", start: "91%", end: "100%" }
---
- hosts: 02_vdc-disk
become: true
tasks:
- name: "Format disk: \"{{ item.device }}\" using etx4"
filesystem:
dev: "{{ item.device }}"
fstype: ext4
with_items:
- { device: /dev/vdc1 }
- { device: /dev/vdc2 }
- { device: /dev/vdc3 }
- { device: /dev/vdc4 }
- hosts: 02_sdb-disk
become: true
tasks:
- name: "Format disk: \"{{ item.device }}\" using etx4"
filesystem:
dev: "{{ item.device }}"
fstype: ext4
with_items:
- { device: /dev/sdb1 }
- { device: /dev/sdb2 }
- { device: /dev/sdb3 }
- { device: /dev/sdb4 }
- hosts: 02_vdb-disk
become: true
tasks:
- name: "Format disk: \"{{ item.device }}\" using etx4"
filesystem:
dev: "{{ item.device }}"
fstype: ext4
with_items:
- { device: /dev/vdb1 }
- { device: /dev/vdb2 }
- { device: /dev/vdb3 }
- { device: /dev/vdb4 }
---
- hosts: 02_vdc-disk
become: true
tasks:
- name: "Mount up \"{{ item.device }}\" to \"{{ item.path }}\""
mount:
state: mounted
fstype: ext4
src: "{{ item.device }}"
path: "{{ item.path }}"
with_items:
- { device: /dev/vdc1, path: /opt }
- { device: /dev/vdc2, path: /upload }
- { device: /dev/vdc3, path: /archive }
- { device: /dev/vdc4, path: /data }
- hosts: 02_sdb-disk
become: true
tasks:
- name: "Mount up \"{{ item.device }}\" to \"{{ item.path }}\""
mount:
state: mounted
fstype: ext4
src: "{{ item.device }}"
path: "{{ item.path }}"
with_items:
- { device: /dev/sdb1, path: /opt }
- { device: /dev/sdb2, path: /upload }
- { device: /dev/sdb3, path: /archive }
- { device: /dev/sdb4, path: /data }
- hosts: 02_vdb-disk
become: true
tasks:
- name: "Mount up \"{{ item.device }}\" to \"{{ item.path }}\""
mount:
state: mounted
fstype: ext4
src: "{{ item.device }}"
path: "{{ item.path }}"
with_items:
- { device: /dev/vdb1, path: /opt }
- { device: /dev/vdb2, path: /upload }
- { device: /dev/vdb3, path: /archive }
- { device: /dev/vdb4, path: /data }
---
- hosts: 02_vdc-disk
become: true
tasks:
- name: Create partiton
parted:
device: "{{ item.device }}"
number: "{{ item.number }}"
part_end: "{{ item.end }}"
part_start: "{{ item.start }}"
state: present
# part_type: logical
with_items:
- { device: "/dev/vdc", number: "1", start: "0%", end: "40%" }
- { device: "/dev/vdc", number: "2", start: "41%", end: "80%" }
- { device: "/dev/vdc", number: "3", start: "81%", end: "90%" }
- { device: "/dev/vdc", number: "4", start: "91%", end: "100%" }
- hosts: 02_sdb-disk
become: true
tasks:
- name: Create partiton
parted:
device: "{{ item.device }}"
number: "{{ item.number }}"
part_end: "{{ item.end }}"
part_start: "{{ item.start }}"
state: present
# part_type: logical
with_items:
- { device: "/dev/sdb", number: "1", start: "0%", end: "40%" }
- { device: "/dev/sdb", number: "2", start: "41%", end: "80%" }
- { device: "/dev/sdb", number: "3", start: "81%", end: "90%" }
- { device: "/dev/sdb", number: "4", start: "91%", end: "100%" }
- hosts: 02_vdb-disk
become: true
tasks:
- name: Create partiton
parted:
device: "{{ item.device }}"
number: "{{ item.number }}"
part_end: "{{ item.end }}"
part_start: "{{ item.start }}"
state: present
# part_type: logical
with_items:
- { device: "/dev/vdb", number: "1", start: "0%", end: "40%" }
- { device: "/dev/vdb", number: "2", start: "41%", end: "80%" }
- { device: "/dev/vdb", number: "3", start: "81%", end: "90%" }
- { device: "/dev/vdb", number: "4", start: "91%", end: "100%" }
---
- hosts: 02_vdc-disk
become: true
tasks:
- name: "Format disk: \"{{ item.device }}\" using etx4"
filesystem:
dev: "{{ item.device }}"
fstype: ext4
with_items:
- { device: /dev/vdc1 }
- { device: /dev/vdc2 }
- { device: /dev/vdc3 }
- { device: /dev/vdc4 }
- hosts: 02_sdb-disk
become: true
tasks:
- name: "Format disk: \"{{ item.device }}\" using etx4"
filesystem:
dev: "{{ item.device }}"
fstype: ext4
with_items:
- { device: /dev/sdb1 }
- { device: /dev/sdb2 }
- { device: /dev/sdb3 }
- { device: /dev/sdb4 }
- hosts: 02_vdb-disk
become: true
tasks:
- name: "Format disk: \"{{ item.device }}\" using etx4"
filesystem:
dev: "{{ item.device }}"
fstype: ext4
with_items:
- { device: /dev/vdb1 }
- { device: /dev/vdb2 }
- { device: /dev/vdb3 }
- { device: /dev/vdb4 }
---
- hosts: 02_vdc-disk
become: true
tasks:
- name: "Mount up \"{{ item.device }}\" to \"{{ item.path }}\""
mount:
state: mounted
fstype: ext4
src: "{{ item.device }}"
path: "{{ item.path }}"
with_items:
- { device: /dev/vdc1, path: /opt }
- { device: /dev/vdc2, path: /upload }
- { device: /dev/vdc3, path: /archive }
- { device: /dev/vdc4, path: /data }
- hosts: 02_sdb-disk
become: true
tasks:
- name: "Mount up \"{{ item.device }}\" to \"{{ item.path }}\""
mount:
state: mounted
fstype: ext4
src: "{{ item.device }}"
path: "{{ item.path }}"
with_items:
- { device: /dev/sdb1, path: /opt }
- { device: /dev/sdb2, path: /upload }
- { device: /dev/sdb3, path: /archive }
- { device: /dev/sdb4, path: /data }
- hosts: 02_vdb-disk
become: true
tasks:
- name: "Mount up \"{{ item.device }}\" to \"{{ item.path }}\""
mount:
state: mounted
fstype: ext4
src: "{{ item.device }}"
path: "{{ item.path }}"
with_items:
- { device: /dev/vdb1, path: /opt }
- { device: /dev/vdb2, path: /upload }
- { device: /dev/vdb3, path: /archive }
- { device: /dev/vdb4, path: /data }
- name: Disk Partitioning based on Application Name
import_tasks: apimanager.yml
when: app_name == 'apimanager'
- import_tasks: dma.yml
when: app_name == 'dma'
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!