]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
systemd: remove changed_when: false
authorSébastien Han <seb@redhat.com>
Thu, 28 Jun 2018 07:53:03 +0000 (09:53 +0200)
committermergify[bot] <mergify[bot]@users.noreply.github.com>
Fri, 29 Jun 2018 07:22:15 +0000 (07:22 +0000)
When using a module there is no need to apply this Ansible option. The
module will handle the idempotency on its own. So the module decides
wether or not the task has changed during the execution.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit f6239972716b013bafcb9313c9c83723615aa7d6)

# Conflicts:
# roles/ceph-iscsi-gw/tasks/container/containerized.yml

roles/ceph-iscsi-gw/tasks/container/containerized.yml [new file with mode: 0644]
roles/ceph-mds/tasks/containerized.yml
roles/ceph-mgr/tasks/docker/start_docker_mgr.yml
roles/ceph-mon/tasks/docker/start_docker_monitor.yml
roles/ceph-rbd-mirror/tasks/docker/start_docker_rbd_mirror.yml
roles/ceph-rgw/tasks/docker/start_docker_rgw.yml

diff --git a/roles/ceph-iscsi-gw/tasks/container/containerized.yml b/roles/ceph-iscsi-gw/tasks/container/containerized.yml
new file mode 100644 (file)
index 0000000..a7316c4
--- /dev/null
@@ -0,0 +1,26 @@
+---
+- name: generate systemd unit files for tcmu-runner, rbd-target-api and rbd-target-gw
+  become: true
+  template:
+    src: "{{ role_path }}/templates/{{ item }}.service.j2"
+    dest: /etc/systemd/system/{{ item }}.service
+    owner: "root"
+    group: "root"
+    mode: "0644"
+  with_items:
+    - tcmu-runner
+    - rbd-target-gw
+    - rbd-target-api
+  notify:
+    - restart ceph {{ item }}
+
+- name: systemd start tcmu-runner, rbd-target-api and rbd-target-gw containers
+  systemd:
+    name: "{{ item }}"
+    state: started
+    enabled: yes
+    daemon_reload: yes
+  with_items:
+    - tcmu-runner
+    - rbd-target-gw
+    - rbd-target-api
index c7ecca30808366cd2b9aaf66548fc47040124795..c3cc1f22c890a89d7edc80163dc15401484d3908 100644 (file)
@@ -73,7 +73,6 @@
     state: started
     enabled: yes
     daemon_reload: yes
-  changed_when: false
 
 - name: wait for mds socket to exist
   command: "{{ docker_exec_cmd }} sh -c 'stat /var/run/ceph/{{ cluster }}-mds.{{ ansible_hostname }}.asok || stat /var/run/ceph/{{ cluster }}-mds.{{ ansible_fqdn }}.asok'"
index ad78bdcc28eaacaf1fc4a35aeb7dc894cb9005b2..40e623bf899579c35e7a4d4fc070cd31d9d82dcc 100644 (file)
@@ -15,5 +15,4 @@
     name: ceph-mgr@{{ ansible_hostname }}
     state: started
     enabled: yes
-    daemon_reload: yes
 changed_when: false
+    daemon_reload: yes
No newline at end of file
index 02b7209f1962e60df4b169bbcff856bafdad11d5..8df4826d2a4167011115e67ec28625eb0c666800 100644 (file)
@@ -56,5 +56,4 @@
     name: ceph-mon@{{ ansible_hostname }}
     state: started
     enabled: yes
-    daemon_reload: yes
 changed_when: false
+    daemon_reload: yes
No newline at end of file
index fb57cded53d8d0e6df32b19a1ff1f29835e2c2a0..6bb2844f621330272275208323852d4077f7b3bc 100644 (file)
@@ -16,5 +16,4 @@
     name: ceph-rbd-mirror@rbd-mirror.{{ ansible_hostname }}
     state: started
     enabled: yes
-    daemon_reload: yes
 changed_when: false
+    daemon_reload: yes
No newline at end of file
index 4b8ca17f8acf476e52d4b1cd042a59af569783fe..83c270d7549a18094568d9d20cdc201313d0e8ab 100644 (file)
@@ -29,5 +29,4 @@
     name: "ceph-radosgw@rgw.{{ ansible_hostname }}.service"
     state: started
     enabled: yes
-    daemon_reload: yes
 changed_when: false
+    daemon_reload: yes
No newline at end of file