install weir for zfssync and fix some writespace
This commit is contained in:
parent
81e49c21e9
commit
944553ffe8
|
@ -14,11 +14,11 @@
|
||||||
when: hostname.stdout != "mirror"
|
when: hostname.stdout != "mirror"
|
||||||
|
|
||||||
- name: run the system role first
|
- name: run the system role first
|
||||||
include_role:
|
include_role:
|
||||||
name: "../roles/system"
|
name: "../roles/system"
|
||||||
|
|
||||||
- name: run mirror system role second
|
- name: run mirror system role second
|
||||||
include_role:
|
include_role:
|
||||||
name: "../roles/mirror"
|
name: "../roles/mirror"
|
||||||
|
|
||||||
- name: run the rest of the roles
|
- name: run the rest of the roles
|
||||||
|
|
|
@ -1,3 +1,14 @@
|
||||||
|
- name: install python3-pip
|
||||||
|
apt:
|
||||||
|
name: python3-pip
|
||||||
|
state: present
|
||||||
|
update_cache: yes
|
||||||
|
|
||||||
|
- name: install weir (for zfssync)
|
||||||
|
pip:
|
||||||
|
name: weir
|
||||||
|
executable: pip3
|
||||||
|
|
||||||
- name: copy cron job
|
- name: copy cron job
|
||||||
copy:
|
copy:
|
||||||
src: "{{ role_path }}/templates/cron/csc-mirror"
|
src: "{{ role_path }}/templates/cron/csc-mirror"
|
||||||
|
@ -21,7 +32,7 @@
|
||||||
mode: preserve
|
mode: preserve
|
||||||
|
|
||||||
- name: copy files for /mirror/root
|
- name: copy files for /mirror/root
|
||||||
copy:
|
copy:
|
||||||
src: "{{ role_path }}/templates/root/root/"
|
src: "{{ role_path }}/templates/root/root/"
|
||||||
dest: /mirror/root
|
dest: /mirror/root
|
||||||
owner: root
|
owner: root
|
||||||
|
@ -84,7 +95,7 @@
|
||||||
- name: create first merlin.sock symlink
|
- name: create first merlin.sock symlink
|
||||||
# noqa deprecated-command-syntax
|
# noqa deprecated-command-syntax
|
||||||
# need chdir to create relative symlinks
|
# need chdir to create relative symlinks
|
||||||
command:
|
command:
|
||||||
cmd: "ln -s run/merlin.sock merlin.sock"
|
cmd: "ln -s run/merlin.sock merlin.sock"
|
||||||
chdir: "/mirror/merlin"
|
chdir: "/mirror/merlin"
|
||||||
creates: "/mirror/merlin/merlin.sock"
|
creates: "/mirror/merlin/merlin.sock"
|
||||||
|
|
|
@ -76,9 +76,9 @@
|
||||||
# create the var using
|
# create the var using
|
||||||
# vars:
|
# vars:
|
||||||
# disks:
|
# disks:
|
||||||
# - /dev/vdc
|
# - /dev/vdc
|
||||||
# - /dev/vdd
|
# - /dev/vdd
|
||||||
# - /dev/vde
|
# - /dev/vde
|
||||||
# - /dev/vdf
|
# - /dev/vdf
|
||||||
# disk_arg: "{{ disks | join(' ') }}"
|
# disk_arg: "{{ disks | join(' ') }}"
|
||||||
|
|
||||||
|
@ -87,9 +87,9 @@
|
||||||
- name: disks to be used for zpool
|
- name: disks to be used for zpool
|
||||||
set_fact:
|
set_fact:
|
||||||
disks:
|
disks:
|
||||||
- /dev/vdc
|
- /dev/vdc
|
||||||
- /dev/vdd
|
- /dev/vdd
|
||||||
- /dev/vde
|
- /dev/vde
|
||||||
- /dev/vdf
|
- /dev/vdf
|
||||||
|
|
||||||
- name: join disk pathes onto one line
|
- name: join disk pathes onto one line
|
||||||
|
@ -104,9 +104,9 @@
|
||||||
|
|
||||||
- name: create and mount zpool
|
- name: create and mount zpool
|
||||||
command: >
|
command: >
|
||||||
zpool create
|
zpool create
|
||||||
-m /mirror/root/.cscmirror
|
-m /mirror/root/.cscmirror
|
||||||
cscmirror
|
cscmirror
|
||||||
raidz2
|
raidz2
|
||||||
{{ disk_arg }}
|
{{ disk_arg }}
|
||||||
when: zpool_exists.rc != 0
|
when: zpool_exists.rc != 0
|
||||||
|
|
Loading…
Reference in New Issue