Skip to content

Commit

Permalink
fix: lint and make sure ssh key generated
Browse files Browse the repository at this point in the history
  • Loading branch information
ricolin committed Dec 5, 2023
1 parent a99f084 commit c2bad9f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
10 changes: 7 additions & 3 deletions roles/mon/tasks/adopt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@
# License for the specific language governing permissions and limitations
# under the License.

# TODO: assimilate config from a mon (we can use run_once here, configs should all be same)
# TODO: assimilate config from a mon
# (we can use run_once here, configs should all be same)
# TODO: adopt mon (with throttle: 1) so we do it one at a time
# TODO: adopt mgr (with throttle: 1) so we do it one at a time (note this is kinda cheating, because we are adopting it in mon role, but we always ran them on same node)
# TODO: adopt mgr (with throttle: 1) so we do it one at a time
# (note this is kinda cheating, because we are adopting it
# in mon role, but we always ran them on same node)
# TODO: enable cephadm mgr module + set orch to cephadm
# TODO: ceph cephadm set-user
# TODO: generate key
# TODO: essetnially the end-state here should be that the rest of the main.yml runs fine
# TODO: essetnially the end-state here should be that
# the rest of the main.yml runs fine

- name: Validate monitor adoption
ansible.builtin.command: ceph orch ps
Expand Down
6 changes: 6 additions & 0 deletions roles/mon/tasks/bootstrap-ceph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@
--config {{ ceph_mon_conf_tempfile.path }}
--skip-monitoring-stack
changed_when: false

- name: Generate ssh key
changed_when: false
ansible.builtin.command:
cmd: cephadm shell -- ceph cephadm generate-key

always:
- name: Remove temporary file for "ceph.conf"
ansible.builtin.file:
Expand Down
2 changes: 2 additions & 0 deletions roles/osd/tasks/adopt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
- name: Get osd list from cluster
ansible.builtin.command: ceph osd ls
register: osd_list
changed_when: false

- name: Adopt existing osds
ansible.builtin.command:
cmd: cephadm adopt --style legacy --name "osd.{{ item }}"
with_items: "{{ osd_list.stdout_lines }}"
changed_when: false

0 comments on commit c2bad9f

Please sign in to comment.