diff --git a/roles/ceph-agent/tasks/main.yml b/roles/ceph-agent/tasks/main.yml new file mode 100644 index 000000000..091baf71d --- /dev/null +++ b/roles/ceph-agent/tasks/main.yml @@ -0,0 +1,4 @@ +--- +- include: pre_requisite.yml + +- include: start_agent.yml diff --git a/roles/ceph-agent/tasks/pre_requisite.yml b/roles/ceph-agent/tasks/pre_requisite.yml new file mode 100644 index 000000000..02a00300a --- /dev/null +++ b/roles/ceph-agent/tasks/pre_requisite.yml @@ -0,0 +1,26 @@ +--- +- name: install dependencies + apt: + pkg: calamari-server + state: present + when: ansible_os_family == 'Debian' + tags: + - package-install + +- name: install dependencies + yum: + name: rhscon-agent + state: present + when: ansible_os_family == 'RedHat' + tags: + - package-install + +- name: create minion.d directory + file: + path: /etc/salt/minion.d + state: directory + +- name: generate agent configuration file + template: + src: ceph_agent.j2 + dest: /etc/salt/minion.d/ceph_agent.conf diff --git a/roles/ceph-agent/tasks/start_agent.yml b/roles/ceph-agent/tasks/start_agent.yml new file mode 100644 index 000000000..3723e4a2b --- /dev/null +++ b/roles/ceph-agent/tasks/start_agent.yml @@ -0,0 +1,6 @@ +--- +- name: enable and start the agent + service: + name: salt-minion + state: started + enabled: yes