]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
create the task to install and configure the agent
authorAlfredo Deza <adeza@redhat.com>
Fri, 12 Feb 2016 20:37:06 +0000 (15:37 -0500)
committerAlfredo Deza <adeza@redhat.com>
Fri, 12 Feb 2016 20:37:06 +0000 (15:37 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
roles/ceph-agent/tasks/main.yml [new file with mode: 0644]
roles/ceph-agent/tasks/pre_requisite.yml [new file with mode: 0644]
roles/ceph-agent/tasks/start_agent.yml [new file with mode: 0644]

diff --git a/roles/ceph-agent/tasks/main.yml b/roles/ceph-agent/tasks/main.yml
new file mode 100644 (file)
index 0000000..091baf7
--- /dev/null
@@ -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 (file)
index 0000000..02a0030
--- /dev/null
@@ -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 (file)
index 0000000..3723e4a
--- /dev/null
@@ -0,0 +1,6 @@
+---
+- name: enable and start the agent
+  service:
+    name: salt-minion
+    state: started
+    enabled: yes