mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 00:43:06 -06:00
70 lines
1.9 KiB
YAML
70 lines
1.9 KiB
YAML
---
|
|
# rerun the mesh volume stat now that we _really_ should have the volume
|
|
- name: discover mesh volume device stat
|
|
ansible.builtin.stat:
|
|
path: '/dev/xvdd'
|
|
follow: no
|
|
get_attributes: yes
|
|
register: mesh_device_stat
|
|
retries: 10
|
|
delay: 10
|
|
until: mesh_device_stat.stat['lnk_source'] is defined
|
|
|
|
- name: describe mesh volume true device
|
|
ansible.builtin.set_fact:
|
|
mesh_device: "{{ mesh_device_stat.stat['lnk_source'] }}"
|
|
|
|
- name: check mesh, caches and logs filetypes
|
|
community.general.parted:
|
|
device: "{{ item }}"
|
|
with_items:
|
|
- "/dev/nvme1n1"
|
|
- "/dev/nvme2n1"
|
|
- "{{ mesh_device }}"
|
|
register: filesystem_types
|
|
|
|
- name: set filesystem type fact for mesh volume
|
|
ansible.builtin.set_fact:
|
|
mesh_filesystem: "{{ filesystem_types.results | community.general.json_query(query) }}"
|
|
vars:
|
|
query: "[?item=='{{ mesh_device }}'].partitions[0].fstype"
|
|
|
|
- name: ensure mesh volume has a filesystem
|
|
community.general.filesystem:
|
|
dev: "{{ mesh_device }}"
|
|
fstype: "{{ fstype }}"
|
|
vars:
|
|
fstype: "{{ (mesh_filesystem|length > 0) | ternary(mesh_filesystem[0], 'xfs') }}"
|
|
|
|
- name: ensure caches and logs volumes have filesystem
|
|
community.general.filesystem:
|
|
dev: "{{ item }}"
|
|
fstype: "xfs"
|
|
with_items:
|
|
- /dev/nvme1n1
|
|
- /dev/nvme2n1
|
|
|
|
- name: mount mesh vol to atl_product_home
|
|
ansible.posix.mount:
|
|
path: "{{ atl_product_home }}"
|
|
src: '/dev/xvdd'
|
|
fstype: "{{ fstype }}"
|
|
state: mounted
|
|
register: xfs_mesh_mount
|
|
vars:
|
|
fstype: "{{ (mesh_filesystem|length > 0) | ternary(mesh_filesystem[0], 'xfs') }}"
|
|
|
|
- name: mount cache to atl_product_home/caches
|
|
ansible.posix.mount:
|
|
path: "{{ atl_product_home }}/caches"
|
|
src: '/dev/xvdb'
|
|
fstype: xfs
|
|
state: mounted
|
|
|
|
- name: mount log to atl_product_home/log
|
|
ansible.posix.mount:
|
|
path: "{{ atl_product_home }}/log"
|
|
src: '/dev/xvdc'
|
|
fstype: xfs
|
|
state: mounted
|