Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ansible: avoid lvmcluster tasks for empty cluster name #10

Merged
merged 1 commit into from
Jun 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ansible/books/lvmcluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
template:
src: "../files/lvmcluster/host_id.yaml.tpl"
dest: "../data/lvmcluster/{{ task_name }}/host_id.yaml"
when: 'task_name'
vars:
task_host_ids: "{{ lookup('file', '../data/lvmcluster/' + task_name + '/host_id.yaml') | from_yaml }}"

Expand All @@ -57,6 +58,7 @@
template:
src: ../files/lvmcluster/lvmlocal.conf.tpl
dest: /etc/lvm/lvmlocal.conf
when: 'task_name'

- name: LVM Cluster - Create VGs
hosts: all
Expand All @@ -70,7 +72,7 @@
shell:
cmd: "vgs {{ item }}"
register: check
loop: "{{ lvmcluster_vgs.keys() }}"
loop: "{{ task_vgs.keys() }}"
run_once: true
changed_when: false
failed_when: "check.rc not in (0, 5)"
Expand Down
Loading