|
495 | 495 | register: remote_user_keyring
|
496 | 496 |
|
497 | 497 | - name: get quorum_status
|
498 |
| - command: "{{ ceph_cmd }} quorum_status --format json" |
| 498 | + command: "{{ cephadm_cmd }} shell -k /etc/ceph/{{ cluster }}.client.admin.keyring --fsid {{ fsid }} -- ceph quorum_status --format json" |
499 | 499 | changed_when: false
|
500 | 500 | delegate_to: "{{ groups[mon_group_name][0] }}"
|
501 | 501 | register: quorum_status
|
|
581 | 581 | - /etc/systemd/system/ceph-mon.target
|
582 | 582 |
|
583 | 583 | - name: waiting for the monitor to join the quorum...
|
584 |
| - command: "{{ cephadm_cmd }} shell --fsid {{ fsid }} -- ceph --cluster {{ cluster }} quorum_status --format json" |
| 584 | + command: "{{ cephadm_cmd }} shell -k /etc/ceph/{{ cluster }}.client.admin.keyring --fsid {{ fsid }} -- ceph quorum_status --format json" |
585 | 585 | changed_when: false
|
586 | 586 | register: ceph_health_raw
|
587 | 587 | until: >
|
|
678 | 678 | name: ceph-defaults
|
679 | 679 |
|
680 | 680 | - name: update the placement of iscsigw hosts
|
681 |
| - command: "{{ cephadm_cmd }} shell --fsid {{ fsid }} -- ceph --cluster {{ cluster }} orch apply iscsi {{ iscsi_pool_name | default('rbd') }} {{ api_user | default('admin') }} {{ api_password | default('admin') }} {{ trusted_ip_list | default('192.168.122.1') }} --placement='{{ groups.get(iscsi_gw_group_name, []) | length }} label:{{ iscsi_gw_group_name }}'" |
| 681 | + command: "{{ cephadm_cmd }} shell -k /etc/ceph/{{ cluster }}.client.admin.keyring --fsid {{ fsid }} -- ceph orch apply iscsi {{ iscsi_pool_name | default('rbd') }} {{ api_user | default('admin') }} {{ api_password | default('admin') }} {{ trusted_ip_list | default('192.168.122.1') }} --placement='{{ groups.get(iscsi_gw_group_name, []) | length }} label:{{ iscsi_gw_group_name }}'" |
682 | 682 | run_once: true
|
683 | 683 | changed_when: false
|
684 | 684 | delegate_to: '{{ groups[mon_group_name][0] }}'
|
|
824 | 824 | loop: '{{ (osd_list.stdout | from_json).keys() | list }}'
|
825 | 825 |
|
826 | 826 | - name: waiting for clean pgs...
|
827 |
| - command: "{{ cephadm_cmd }} shell --fsid {{ fsid }} -- ceph --cluster {{ cluster }} pg stat --format json" |
| 827 | + command: "{{ cephadm_cmd }} shell -k /etc/ceph/{{ cluster }}.client.admin.keyring --fsid {{ fsid }} -- ceph pg stat --format json" |
828 | 828 | changed_when: false
|
829 | 829 | register: ceph_health_post
|
830 | 830 | until: >
|
|
892 | 892 | name: ceph-defaults
|
893 | 893 |
|
894 | 894 | - name: update the placement of metadata hosts
|
895 |
| - command: "{{ cephadm_cmd }} shell --fsid {{ fsid }} -- ceph --cluster {{ cluster }} orch apply mds {{ cephfs }} --placement='{{ groups.get(mds_group_name, []) | length }} label:{{ mds_group_name }}'" |
| 895 | + command: "{{ cephadm_cmd }} shell -k /etc/ceph/{{ cluster }}.client.admin.keyring --fsid {{ fsid }} -- ceph orch apply mds {{ cephfs }} --placement='{{ groups.get(mds_group_name, []) | length }} label:{{ mds_group_name }}'" |
896 | 896 | run_once: true
|
897 | 897 | changed_when: false
|
898 | 898 | delegate_to: "{{ groups[mon_group_name][0] }}"
|
|
993 | 993 |
|
994 | 994 | - name: update the placement of radosgw hosts
|
995 | 995 | command: >
|
996 |
| - {{ cephadm_cmd }} shell --fsid {{ fsid }} -- |
| 996 | + {{ cephadm_cmd }} shell -k /etc/ceph/{{ cluster }}.client.admin.keyring --fsid {{ fsid }} -- |
997 | 997 | ceph --cluster {{ cluster }} orch apply rgw {{ ansible_facts['hostname'] }}
|
998 | 998 | --placement='count-per-host:{{ radosgw_num_instances }} {{ ansible_facts['nodename'] }}'
|
999 | 999 | --port={{ radosgw_frontend_port }}
|
|
1006 | 1006 |
|
1007 | 1007 | - name: update the placement of radosgw multisite hosts
|
1008 | 1008 | command: >
|
1009 |
| - {{ cephadm_cmd }} shell --fsid {{ fsid }} -- |
| 1009 | + {{ cephadm_cmd }} shell -k /etc/ceph/{{ cluster }}.client.admin.keyring --fsid {{ fsid }} -- |
1010 | 1010 | ceph --cluster {{ cluster }} orch apply rgw {{ ansible_facts['hostname'] }}.{{ item.rgw_realm }}.{{ item.rgw_zone }}.{{ item.radosgw_frontend_port }}
|
1011 | 1011 | --placement={{ ansible_facts['nodename'] }}
|
1012 | 1012 | --realm={{ item.rgw_realm }} --zone={{ item.rgw_zone }}
|
|
1127 | 1127 | state: absent
|
1128 | 1128 |
|
1129 | 1129 | - name: create nfs ganesha cluster
|
1130 |
| - command: "{{ cephadm_cmd }} shell --fsid {{ fsid }} -- ceph --cluster {{ cluster }} nfs cluster create {{ ansible_facts['hostname'] }} {{ ansible_facts['hostname'] }}" |
| 1130 | + command: "{{ cephadm_cmd }} shell -k /etc/ceph/{{ cluster }}.client.admin.keyring --fsid {{ fsid }} -- ceph nfs cluster create {{ ansible_facts['hostname'] }} {{ ansible_facts['hostname'] }}" |
1131 | 1131 | changed_when: false
|
1132 | 1132 | delegate_to: "{{ groups[mon_group_name][0] }}"
|
1133 | 1133 | environment:
|
1134 | 1134 | CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'
|
1135 | 1135 |
|
1136 | 1136 | - name: create cephfs export
|
1137 |
| - command: "{{ cephadm_cmd }} shell --fsid {{ fsid }} -- ceph --cluster {{ cluster }} nfs export create cephfs {{ cephfs }} {{ ansible_facts['hostname'] }} {{ ceph_nfs_ceph_pseudo_path }} --squash {{ ceph_nfs_ceph_squash }}" |
| 1137 | + command: "{{ cephadm_cmd }} shell -k /etc/ceph/{{ cluster }}.client.admin.keyring --fsid {{ fsid }} -- ceph nfs export create cephfs {{ cephfs }} {{ ansible_facts['hostname'] }} {{ ceph_nfs_ceph_pseudo_path }} --squash {{ ceph_nfs_ceph_squash }}" |
1138 | 1138 | changed_when: false
|
1139 | 1139 | delegate_to: "{{ groups[mon_group_name][0] }}"
|
1140 | 1140 | environment:
|
1141 | 1141 | CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'
|
1142 | 1142 | when: nfs_file_gw | bool
|
1143 | 1143 |
|
1144 | 1144 | - name: create rgw export
|
1145 |
| - command: "{{ cephadm_cmd }} shell --fsid {{ fsid }} -- ceph --cluster {{ cluster }} nfs export create rgw --cluster-id {{ ansible_facts['hostname'] }} --pseudo-path {{ ceph_nfs_rgw_pseudo_path }} --user-id {{ ceph_nfs_rgw_user }} --squash {{ ceph_nfs_rgw_squash }}" |
| 1145 | + command: "{{ cephadm_cmd }} shell -k /etc/ceph/{{ cluster }}.client.admin.keyring --fsid {{ fsid }} -- ceph nfs export create rgw --cluster-id {{ ansible_facts['hostname'] }} --pseudo-path {{ ceph_nfs_rgw_pseudo_path }} --user-id {{ ceph_nfs_rgw_user }} --squash {{ ceph_nfs_rgw_squash }}" |
1146 | 1146 | changed_when: false
|
1147 | 1147 | delegate_to: "{{ groups[mon_group_name][0] }}"
|
1148 | 1148 | environment:
|
|
1159 | 1159 | name: ceph-defaults
|
1160 | 1160 |
|
1161 | 1161 | - name: update the placement of rbd-mirror hosts
|
1162 |
| - command: "{{ cephadm_cmd }} shell --fsid {{ fsid }} -- ceph --cluster {{ cluster }} orch apply rbd-mirror --placement='{{ groups.get(rbdmirror_group_name, []) | length }} label:{{ rbdmirror_group_name }}'" |
| 1162 | + command: "{{ cephadm_cmd }} shell -k /etc/ceph/{{ cluster }}.client.admin.keyring --fsid {{ fsid }} -- ceph orch apply rbd-mirror --placement='{{ groups.get(rbdmirror_group_name, []) | length }} label:{{ rbdmirror_group_name }}'" |
1163 | 1163 | run_once: true
|
1164 | 1164 | changed_when: false
|
1165 | 1165 | delegate_to: "{{ groups[mon_group_name][0] }}"
|
|
1234 | 1234 | state: absent
|
1235 | 1235 |
|
1236 | 1236 | - name: update the placement of ceph-crash hosts
|
1237 |
| - command: "{{ cephadm_cmd }} shell --fsid {{ fsid }} -- ceph --cluster {{ cluster }} orch apply crash --placement='label:ceph'" |
| 1237 | + command: "{{ cephadm_cmd }} shell -k /etc/ceph/{{ cluster }}.client.admin.keyring --fsid {{ fsid }} -- ceph orch apply crash --placement='label:ceph'" |
1238 | 1238 | run_once: true
|
1239 | 1239 | changed_when: false
|
1240 | 1240 | delegate_to: '{{ groups[mon_group_name][0] }}'
|
|
1443 | 1443 | state: absent
|
1444 | 1444 |
|
1445 | 1445 | - name: update the placement of node-exporter hosts
|
1446 |
| - command: "{{ cephadm_cmd }} shell --fsid {{ fsid }} -- ceph --cluster {{ cluster }} orch apply node-exporter --placement='*'" |
| 1446 | + command: "{{ cephadm_cmd }} shell -k /etc/ceph/{{ cluster }}.client.admin.keyring --fsid {{ fsid }} -- ceph orch apply node-exporter --placement='*'" |
1447 | 1447 | run_once: true
|
1448 | 1448 | changed_when: false
|
1449 | 1449 | delegate_to: '{{ groups[mon_group_name][0] }}'
|
|
1461 | 1461 | name: ceph-defaults
|
1462 | 1462 |
|
1463 | 1463 | - name: update the placement of monitor hosts
|
1464 |
| - command: "{{ cephadm_cmd }} shell --fsid {{ fsid }} -- ceph --cluster {{ cluster }} orch apply mon --placement='{{ groups.get(mon_group_name, []) | length }} label:{{ mon_group_name }}'" |
| 1464 | + command: "{{ cephadm_cmd }} shell -k /etc/ceph/{{ cluster }}.client.admin.keyring --fsid {{ fsid }} -- ceph orch apply mon --placement='{{ groups.get(mon_group_name, []) | length }} label:{{ mon_group_name }}'" |
1465 | 1465 | changed_when: false
|
1466 | 1466 | environment:
|
1467 | 1467 | CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'
|
|
1475 | 1475 | mgr_placement_label: "{{ mgr_group_name if groups.get(mgr_group_name, []) | length > 0 else mon_group_name }}"
|
1476 | 1476 |
|
1477 | 1477 | - name: update the placement of manager hosts
|
1478 |
| - command: "{{ cephadm_cmd }} shell --fsid {{ fsid }} -- ceph --cluster {{ cluster }} orch apply mgr --placement='{{ mgr_placement_count }} label:{{ mgr_placement_label }}'" |
| 1478 | + command: "{{ cephadm_cmd }} shell -k /etc/ceph/{{ cluster }}.client.admin.keyring --fsid {{ fsid }} -- ceph orch apply mgr --placement='{{ mgr_placement_count }} label:{{ mgr_placement_label }}'" |
1479 | 1479 | changed_when: false
|
1480 | 1480 | environment:
|
1481 | 1481 | CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'
|
|
1484 | 1484 | when: dashboard_enabled | bool
|
1485 | 1485 | block:
|
1486 | 1486 | - name: update the placement of alertmanager hosts
|
1487 |
| - command: "{{ cephadm_cmd }} shell --fsid {{ fsid }} -- ceph --cluster {{ cluster }} orch apply alertmanager --placement='{{ groups.get(monitoring_group_name, []) | length }} label:{{ monitoring_group_name }}'" |
| 1487 | + command: "{{ cephadm_cmd }} shell -k /etc/ceph/{{ cluster }}.client.admin.keyring --fsid {{ fsid }} -- ceph orch apply alertmanager --placement='{{ groups.get(monitoring_group_name, []) | length }} label:{{ monitoring_group_name }}'" |
1488 | 1488 | changed_when: false
|
1489 | 1489 | environment:
|
1490 | 1490 | CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'
|
1491 | 1491 |
|
1492 | 1492 | - name: update the placement of grafana hosts
|
1493 |
| - command: "{{ cephadm_cmd }} shell --fsid {{ fsid }} -- ceph --cluster {{ cluster }} orch apply grafana --placement='{{ groups.get(monitoring_group_name, []) | length }} label:{{ monitoring_group_name }}'" |
| 1493 | + command: "{{ cephadm_cmd }} shell -k /etc/ceph/{{ cluster }}.client.admin.keyring --fsid {{ fsid }} -- ceph orch apply grafana --placement='{{ groups.get(monitoring_group_name, []) | length }} label:{{ monitoring_group_name }}'" |
1494 | 1494 | changed_when: false
|
1495 | 1495 | environment:
|
1496 | 1496 | CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'
|
1497 | 1497 |
|
1498 | 1498 | - name: update the placement of prometheus hosts
|
1499 |
| - command: "{{ cephadm_cmd }} shell --fsid {{ fsid }} -- ceph --cluster {{ cluster }} orch apply prometheus --placement='{{ groups.get(monitoring_group_name, []) | length }} label:{{ monitoring_group_name }}'" |
| 1499 | + command: "{{ cephadm_cmd }} shell -k /etc/ceph/{{ cluster }}.client.admin.keyring --fsid {{ fsid }} -- ceph orch apply prometheus --placement='{{ groups.get(monitoring_group_name, []) | length }} label:{{ monitoring_group_name }}'" |
1500 | 1500 | changed_when: false
|
1501 | 1501 | environment:
|
1502 | 1502 | CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'
|
|
1511 | 1511 | name: ceph-defaults
|
1512 | 1512 |
|
1513 | 1513 | - name: show ceph orchestrator services
|
1514 |
| - command: "{{ cephadm_cmd }} shell --fsid {{ fsid }} -- ceph --cluster {{ cluster }} orch ls --refresh" |
| 1514 | + command: "{{ cephadm_cmd }} shell -k /etc/ceph/{{ cluster }}.client.admin.keyring --fsid {{ fsid }} -- ceph orch ls --refresh" |
1515 | 1515 | changed_when: false
|
1516 | 1516 | environment:
|
1517 | 1517 | CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'
|
1518 | 1518 |
|
1519 | 1519 | - name: show ceph orchestrator daemons
|
1520 |
| - command: "{{ cephadm_cmd }} shell --fsid {{ fsid }} -- ceph --cluster {{ cluster }} orch ps --refresh" |
| 1520 | + command: "{{ cephadm_cmd }} shell -k /etc/ceph/{{ cluster }}.client.admin.keyring --fsid {{ fsid }} -- ceph orch ps --refresh" |
1521 | 1521 | changed_when: false
|
1522 | 1522 | environment:
|
1523 | 1523 | CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'
|
|
0 commit comments