fix lost+found bug

This commit is contained in:
Adrien Reslinger 2020-10-17 01:53:00 +02:00
parent dae84110df
commit 1ec1ebb89d

View file

@ -75,6 +75,7 @@
fstype: ext4 fstype: ext4
opts: "{{ item.mount_opts }}" opts: "{{ item.mount_opts }}"
state: mounted state: mounted
register: partition_formated
with_items: with_items:
- { name: var_lib_etcd, vg: vg_sys, size: 1g, mount_point: /var/lib/etcd, mount_opts: "nodev,noexec,nosuid,discard"} - { name: var_lib_etcd, vg: vg_sys, size: 1g, mount_point: /var/lib/etcd, mount_opts: "nodev,noexec,nosuid,discard"}
- { name: etc_kubernetes, vg: vg_sys, size: 1g, mount_point: /etc/kubernetes, mount_opts: "nodev,noexec,nosuid,discard"} - { name: etc_kubernetes, vg: vg_sys, size: 1g, mount_point: /etc/kubernetes, mount_opts: "nodev,noexec,nosuid,discard"}
@ -82,6 +83,13 @@
when: when:
- kubernetes_master|bool - kubernetes_master|bool
- name: Ensuring /var/lib/etcd/lost+found Folder does not exists
file:
path: "/var/lib/etcd/lost+found"
state: "absent"
when:
- partition_formated is changed
- name: Secure etcd directory - name: Secure etcd directory
file: file:
path: "/var/lib/etcd" path: "/var/lib/etcd"