]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
infrastructure-playbooks/lv-create.yml: copy without using a template file
authorNeha Ojha <nojha@redhat.com>
Mon, 6 Aug 2018 17:40:58 +0000 (17:40 +0000)
committerSébastien Han <seb@redhat.com>
Thu, 16 Aug 2018 14:38:23 +0000 (16:38 +0200)
Signed-off-by: Neha Ojha <nojha@redhat.com>
infrastructure-playbooks/lv-create.yml
infrastructure-playbooks/templates/logfile.j2 [deleted file]

index c485c8a631dbba917dabe22bcf7afabf10ad4387..519b889f323df2775bbf304caaf3445d4005cdd6 100644 (file)
@@ -2,6 +2,23 @@
   hosts:
   - osds
 
+  vars:
+    logfile: |
+      Suggested cut and paste into "group_vars/osds.yml" for configuring with osd_scenario=lvm
+      ----------------------------------------------------------------------------------------
+      {% for lv in nvme_device_lvs %}
+        - data: {{ lv.lv_name }}
+          data_vg: {{ nvme_vg_name }}
+          journal: {{ lv.journal_name }}
+          journal_vg: {{ nvme_vg_name }}
+      {% endfor %}
+      {% for hdd in hdd_devices %}
+        - data: {{ hdd_lv_prefix }}-{{ hdd.split('/')[-1] }}
+          data_vg: {{ hdd_vg_prefix }}-{{ hdd.split('/')[-1] }}
+          journal: {{ hdd_journal_prefix }}-{{ hdd.split('/')[-1] }}
+          journal_vg: {{ nvme_vg_name }}
+      {% endfor %}
+
   tasks:
 
   - name: include vars of lv_vars.yaml
@@ -71,7 +88,7 @@
 
   # Write ending configuration logfile
   - name: write output for osds.yml to logfile /tmp/logfile.txt
-    template:
-      src: templates/logfile.j2
-      dest: /tmp/logfile.txt
+    copy:
+      content: "{{ logfile }}"
+      dest: "/tmp/logfile.txt"
     delegate_to: localhost
diff --git a/infrastructure-playbooks/templates/logfile.j2 b/infrastructure-playbooks/templates/logfile.j2
deleted file mode 100644 (file)
index 7cb70f5..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-Suggested cut and paste into "group_vars/osds.yml" for configuring with osd_scenario=lvm
-----------------------------------------------------------------------------------------
-{% for lv in nvme_device_lvs %}
-  - data: {{ lv.lv_name }}
-    data_vg: {{ nvme_vg_name }}
-    journal: {{ lv.journal_name }}
-    journal_vg: {{ nvme_vg_name }}
-{% endfor %}
-{% for hdd in hdd_devices %}
-  - data: {{ hdd_lv_prefix }}-{{ hdd.split('/')[-1] }}
-    data_vg: {{ hdd_vg_prefix }}-{{ hdd.split('/')[-1] }}
-    journal: {{ hdd_journal_prefix }}-{{ hdd.split('/')[-1] }}
-    journal_vg: {{ nvme_vg_name }}
-{% endfor %}