aboutsummaryrefslogtreecommitdiff
path: root/roles/cephadm/tasks
diff options
context:
space:
mode:
authorBertrand Lanson <bertrand.lanson@infomaniak.com>2026-03-11 11:51:55 +0100
committerBertrand Lanson <bertrand.lanson@infomaniak.com>2026-03-13 17:40:14 +0100
commitfc6c1721dc8bf70652311be2cc96fc485efdd085 (patch)
tree7ed3a423248a27fac562745e03942deabd37ad14 /roles/cephadm/tasks
parent394421d3b4e63de3d6861314801f9694d57851e6 (diff)
downloadkolla-ansible-fc6c1721dc8bf70652311be2cc96fc485efdd085.tar.gz
kolla-ansible-fc6c1721dc8bf70652311be2cc96fc485efdd085.zip
ansible-lint: fix yaml[line-length] in test roles
Change-Id: If3a5ac62502e14160e0a5e638d3bc1234a201731 Signed-off-by: Bertrand Lanson <bertrand.lanson@infomaniak.com>
Diffstat (limited to 'roles/cephadm/tasks')
-rw-r--r--roles/cephadm/tasks/main.yml9
1 files changed, 8 insertions, 1 deletions
diff --git a/roles/cephadm/tasks/main.yml b/roles/cephadm/tasks/main.yml
index 7f0133779..5abf30a38 100644
--- a/roles/cephadm/tasks/main.yml
+++ b/roles/cephadm/tasks/main.yml
@@ -85,10 +85,17 @@
# TODO(mnasiadka): Fix merge_configs to support tabs
- name: Generate ceph.conf without tabs
vars:
+ _mon_host: >-
+ {%- set ns = namespace(mon_host=[]) -%}
+ {%- for host in groups['all'] -%}
+ {%- set current_mon_host = hostvars[host]['ansible_' + api_interface_name | replace('-', '_')].ipv4.address -%}
+ {%- set ns.mon_host = ns.mon_host + [current_mon_host] -%}
+ {%- endfor -%}
+ {{ ns.mon_host }}
ceph_conf_fixed: |
[global]
fsid = {{ ceph_fsid }}
- mon_host = {% for host in groups['all'] %} {{ hostvars[host]['ansible_' + api_interface_name | replace('-', '_')].ipv4.address }} {% if not loop.last %},{% endif %} {% endfor %}
+ mon_host = {{ _mon_host | join(", ") }}
copy:
content: "{{ ceph_conf_fixed }}"
dest: "/etc/ceph/ceph.conf.fixed"