Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion roles/cephadm/tasks/bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
block:
- name: Bootstrap cephadm
vars:
mon_ip: "{{ hostvars[inventory_hostname]['ansible_'~cephadm_public_interface].ipv4.address }}"
mon_ip: "{{ hostvars[inventory_hostname].ansible_facts[cephadm_public_interface].ipv4.address }}"
monitoring_stack: "{{ '--skip-monitoring-stack' if not (cephadm_enable_monitoring | bool) else '' }}"
dashboard: "{{ '--skip-dashboard' if not cephadm_enable_dashboard | bool else '' }}"
firewalld: "{{ '--skip-firewalld' if not cephadm_enable_firewalld | bool else '' }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/cephadm/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- include_tasks: "prechecks.yml"
when: not cephadm_skip_prechecks | bool

- include_tasks: "pkg_{{ ansible_os_family | lower }}.yml"
- include_tasks: "pkg_{{ ansible_facts.os_family | lower }}.yml"

- include_tasks: "prereqs.yml"

Expand Down
2 changes: 1 addition & 1 deletion roles/cephadm/tasks/osds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
block:
- name: Add OSDs individually
command:
cmd: "cephadm daemon add osd {{ ansible_hostname }}:{{ item }}"
cmd: "cephadm daemon add osd {{ ansible_facts.hostname }}:{{ item }}"
become: true
when: cephadm_osd_devices | length > 0
with_items: "{{ cephadm_osd_devices }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/cephadm/tasks/pkg_debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

- name: Ensure Ceph repositories are defined
apt_repository:
repo: "deb https://download.ceph.com/debian-{{ item }}/ {{ ansible_distribution_release }} main"
repo: "deb https://download.ceph.com/debian-{{ item }}/ {{ ansible_facts.distribution_release }} main"
state: "{{ 'present' if item == cephadm_ceph_release else 'absent' }}"
when: not cephadm_custom_repos | bool
become: true
Expand Down
4 changes: 2 additions & 2 deletions roles/cephadm/templates/cluster.yml.j2
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% for host in groups['ceph'] %}
---
service_type: host
hostname: {{ hostvars[host]['ansible_hostname'] }}
addr: {{ hostvars[host]['ansible_'~cephadm_admin_interface]['ipv4']['address'] }}
hostname: {{ hostvars[host].ansible_facts.hostname }}
addr: {{ hostvars[host].ansible_facts[cephadm_admin_interface]['ipv4']['address'] }}
labels:
{% if host in groups['mons'] %}
- _admin
Expand Down