From 654694f9276cd9c30a7f2690f9336cf63a0172ef Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Sun, 16 Mar 2025 21:23:16 -0700 Subject: a good starting point for traefik --- playbooks/roles/ceph/tasks/main.yml | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 playbooks/roles/ceph/tasks/main.yml (limited to 'playbooks/roles/ceph/tasks') diff --git a/playbooks/roles/ceph/tasks/main.yml b/playbooks/roles/ceph/tasks/main.yml new file mode 100644 index 0000000..b554340 --- /dev/null +++ b/playbooks/roles/ceph/tasks/main.yml @@ -0,0 +1,44 @@ +--- + +- name: Install Ceph Packages + ansible.builtin.apt: + name: + - ceph-common + - ceph-fuse + state: present + +- name: Copy Ceph Configuration + ansible.builtin.copy: + content: | + [global] + fsid = {{ ceph_fsid }} + mon_host = {{ ceph_mon_host }} + dest: /etc/ceph/ceph.conf + mode: '0644' + +- name: Copy Ceph Keyring + ansible.builtin.copy: + content: | + [client.{{ ceph_client_name }}] + key = {{ ceph_secret }} + dest: "/etc/ceph/ceph.client.{{ ceph_client_name }}.keyring" + mode: '0600' + +- name: Ensure Ceph Base Exists + ansible.builtin.file: + path: "{{ ceph_base }}" + owner: root + group: root + state: directory + recurse: true + +- name: Mount Ceph on Boot + ansible.builtin.lineinfile: + path: /etc/fstab + regexp: '{{ ceph_base }}\w+fuse.ceph' + line: "none {{ ceph_base }} fuse.ceph ceph.id={{ ceph_client_name }},_netdev,defaults 0 0" + create: true + mode: "0644" + +- name: Mount Ceph Now + ansible.builtin.command: mount -a -- cgit v1.2.3-70-g09d2