Skip to content

Commit

Permalink
Fix the linters error and add README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
larainema committed Nov 18, 2024
1 parent fae8ffb commit c6f658a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions roles/lvm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# `lvm`
7 changes: 4 additions & 3 deletions roles/lvm/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,22 @@
# under the License.

- name: Discover lvm devices
shell: >-
ansible.builtin.shell: |
set -o pipefail
/sbin/pvdisplay | awk '/PV\ Name/ {print $3}' | sed 's/\/dev\///g'
register: lvm_devices
changed_when: lvm_devices.rc != 0
failed_when: false

- name: Ensure "/etc/lvm" directory
file:
ansible.builtin.file:
state: "directory"
path: "/etc/lvm"
mode: "0755"
when: lvm_devices.rc == 0

- name: Drop lvm Config
template:
ansible.builtin.template:
src: "lvm.conf.j2"
dest: "/etc/lvm/lvm.conf"
owner: "root"
Expand Down

0 comments on commit c6f658a

Please sign in to comment.