]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
moving to ansible v2.2 compatibility
authorSébastien Han <seb@redhat.com>
Thu, 3 Nov 2016 09:16:33 +0000 (10:16 +0100)
committerSébastien Han <seb@redhat.com>
Fri, 4 Nov 2016 09:09:38 +0000 (10:09 +0100)
Signed-off-by: Sébastien Han <seb@redhat.com>
Co-Authored-By: Julien Francoz julien@francoz.net
51 files changed:
contrib/splitup.yml
group_vars/mdss.sample
group_vars/mons.sample
group_vars/nfss.sample
group_vars/osds.sample
group_vars/rbd-mirrors.sample
group_vars/restapis.sample
group_vars/rgws.sample
infrastructure-playbooks/cluster-os-migration.yml
infrastructure-playbooks/purge-cluster.yml
infrastructure-playbooks/rolling_update.yml
infrastructure-playbooks/shrink-osd.yml
infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml
roles/ceph-client/tasks/create_users_keys.yml
roles/ceph-common/tasks/installs/install_on_debian.yml
roles/ceph-common/tasks/installs/install_rh_storage_on_debian.yml
roles/ceph-common/tasks/installs/install_rh_storage_on_redhat.yml
roles/ceph-common/tasks/misc/system_tuning.yml
roles/ceph-mds/defaults/main.yml
roles/ceph-mds/tasks/docker/checks.yml
roles/ceph-mds/tasks/docker/fetch_configs.yml
roles/ceph-mon/defaults/main.yml
roles/ceph-mon/tasks/docker/checks.yml
roles/ceph-mon/tasks/docker/copy_configs.yml
roles/ceph-mon/tasks/docker/fetch_configs.yml
roles/ceph-mon/tasks/secure_cluster.yml
roles/ceph-nfs/defaults/main.yml
roles/ceph-nfs/tasks/docker/checks.yml
roles/ceph-nfs/tasks/docker/copy_configs.yml
roles/ceph-nfs/tasks/docker/fetch_configs.yml
roles/ceph-osd/defaults/main.yml
roles/ceph-osd/tasks/activate_osds.yml
roles/ceph-osd/tasks/check_devices_auto.yml
roles/ceph-osd/tasks/docker/checks.yml
roles/ceph-osd/tasks/docker/fetch_configs.yml
roles/ceph-osd/tasks/docker/start_docker_osd.yml
roles/ceph-osd/tasks/osd_fragment.yml
roles/ceph-osd/tasks/scenarios/bluestore.yml
roles/ceph-osd/tasks/scenarios/dmcrypt-dedicated-journal.yml
roles/ceph-osd/tasks/scenarios/dmcrypt-journal-collocation.yml
roles/ceph-osd/tasks/scenarios/journal_collocation.yml
roles/ceph-osd/tasks/scenarios/osd_directory.yml
roles/ceph-rbd-mirror/defaults/main.yml
roles/ceph-rbd-mirror/tasks/docker/checks.yml
roles/ceph-rbd-mirror/tasks/docker/fetch_configs.yml
roles/ceph-restapi/defaults/main.yml
roles/ceph-restapi/tasks/docker/fetch_configs.yml
roles/ceph-rgw/defaults/main.yml
roles/ceph-rgw/tasks/docker/checks.yml
roles/ceph-rgw/tasks/docker/copy_configs.yml
roles/ceph-rgw/tasks/docker/fetch_configs.yml

index 9c3d804d3743d0b9aa7a5c4e42922e784683a86b..c3bc28001893ee5ca73b13d8d0cd4156fe7a0874 100644 (file)
       command: git subtree split --prefix=roles/{{ item }} -b {{ item }} --squash
       args:
         chdir: "{{ basedir }}"
-      with_items: roles
+      with_items: "{{ roles }}"
 
     - name: adds remote github repos for the splits
       tags: split
       command: git remote add {{ item }} git@github.com:{{ github }}-{{ item }}.git
       args:
         chdir: "{{ basedir }}"
-      with_items: roles
+      with_items: "{{ roles }}"
 
     - name: adds upstream remote
       tags: update
@@ -68,4 +68,4 @@
       shell: git push {{ item }} $(git subtree split --prefix roles/{{ item }} master):master --force
       args:
         chdir: "{{ basedir }}"
-      with_items: roles
+      with_items: "{{ roles }}"
index 308ac192ea0ea1911ef9fff78574c2553552334d..303989cdee12361a0d34872ad17b6debf40563ed 100644 (file)
@@ -37,4 +37,5 @@ dummy:
 #ceph_mds_docker_image_tag: latest
 #ceph_mds_docker_extra_env: "MDS_NAME={{ ansible_hostname }}" # comma separated variables
 #ceph_docker_on_openstack: false
+#ceph_config_keys: [] # DON'T TOUCH ME
 
index e4ea4d434fb8f9ad715b6605af3b1749368773c2..5bd1cde794a3dc98213e966001f42bc6ca34280f 100644 (file)
@@ -89,4 +89,5 @@ dummy:
 #ceph_docker_on_openstack: false
 #mon_docker_privileged: false
 #mon_docker_net_host: true
+#ceph_config_keys: [] # DON'T TOUCH ME
 
index e0942cb92508379bfbe934eb3dbde1dde098fd69..7bd6ba095cb12f8c8fb7f3d644d547effa4d51eb 100644 (file)
@@ -19,6 +19,7 @@ dummy:
 #
 #cephx: true
 
+
 #######################
 # Access type options #
 #######################
@@ -89,4 +90,5 @@ dummy:
 #ceph_nfs_docker_image_tag: latest
 #ceph_nfs_docker_extra_env: "GANESHA_EPOCH={{ ganesha_epoch }}" # comma separated variables
 #ceph_docker_on_openstack: false
+#ceph_config_keys: [] # DON'T TOUCH ME
 
index 88d1b6b6282381e8454219462dc6bfa7dd148a3c..b1eb4f91c1cfd99b663186b9c24a3d98910166f2 100644 (file)
@@ -183,4 +183,5 @@ dummy:
 #ceph_osd_docker_devices:
 # - /dev/sdb
 #ceph_docker_on_openstack: false
+#ceph_config_keys: [] # DON'T TOUCH ME
 
index a32435e79a7c032287527d2a6df134bbfc748e82..15ab9cd021a161419b3fdd14664471da5f5e2843 100644 (file)
@@ -11,6 +11,7 @@ dummy:
 # SETUP #
 #########
 
+
 # NOTE (leseb): the rbd-mirror daemon needs a user to start
 # because it has to authenticate with the local cluster.
 # By default, using the admin user is fine, so you should not
@@ -49,4 +50,5 @@ dummy:
 #ceph_rbd_mirror_docker_imagename: daemon
 #ceph_rbd_mirror_docker_image_tag: latest
 #ceph_docker_on_openstack: false
+#ceph_config_keys: [] # DON'T TOUCH ME
 
index f21cbcef7f4e364a86c4c0106ec8910a38b4b37f..a4e01e75399214b8e668fe6354b40ebaa3661699 100644 (file)
@@ -26,4 +26,5 @@ dummy:
 #ceph_restapi_docker_image_tag: latest
 #ceph_restapi_docker_extra_env: "RESTAPI_IP=0.0.0.0" # comma separated variables
 #ceph_docker_on_openstack: false
+#ceph_config_keys: [] # DON'T TOUCH ME
 
index 3916c9ab76cc8ca1785fdb165cd19111c05bd0b8..05d5fd851a3af2a6cefcde029e0a59e8f2d0b10c 100644 (file)
@@ -44,4 +44,5 @@ dummy:
 #ceph_rgw_docker_image_tag: latest
 #ceph_rgw_docker_extra_env: "RGW_CIVETWEB_PORT={{ ceph_rgw_civetweb_port }}" # comma separated variables
 #ceph_docker_on_openstack: false
+#ceph_config_keys: [] # DON'T TOUCH ME
 
index 21e17d90482e7cdd4cfee808d2baeba54cc38140..7126c862d9fb37a251901941b7adb933cace4798 100644 (file)
         group=root
         mode=0644
       delegate_to: "{{ item }}"
-      with_items: groups.backup[0]
+      with_items: "{{ groups.backup[0] }}"
       when: migration_completed.stat.exists == False
 
     # NOTE (leseb): should we convert upstart to sysvinit here already?
       retries: 5
       delay: 10
       delegate_to: "{{ item }}"
-      with_items: groups.backup[0]
+      with_items: "{{ groups.backup[0] }}"
       when: migration_completed.stat.exists == False
 
     - name: Done moving to the next monitor
     - name: Set the noout flag
       command: ceph osd set noout
       delegate_to: "{{ item }}"
-      with_items: groups.mons[0]
+      with_items: "{{ groups.mons[0] }}"
       when: migration_completed.stat.exists == False
 
     - name: Check if sysvinit
         group=root
         mode=0644
       delegate_to: "{{ item }}"
-      with_items: groups.backup[0]
+      with_items: "{{ groups.backup[0] }}"
       when: migration_completed.stat.exists == False
 
     - name: Scp OSDs dirs and configs
         port={{ item }}
         timeout=10
         state=stopped
-      with_items:
-        - "{{ osd_ports.stdout_lines }}"
+      with_items: "{{ osd_ports.stdout_lines }}"
       when: migration_completed.stat.exists == False
 
     - name: Configure RHEL with sysvinit
       retries: 10
       delay: 10
       delegate_to: "{{ item }}"
-      with_items: groups.backup[0]
+      with_items: "{{ groups.backup[0] }}"
       when: migration_completed.stat.exists == False
 
     - name: Done moving to the next OSD
     - name: Unset the noout flag
       command: ceph osd unset noout
       delegate_to: "{{ item }}"
-      with_items: groups.mons[0]
+      with_items: "{{ groups.mons[0] }}"
       when: migration_completed.stat.exists == False
 
 - hosts: rgws
         group=root
         mode=0644
       delegate_to: "{{ item }}"
-      with_items: groups.backup[0]
+      with_items: "{{ groups.backup[0] }}"
       when: migration_completed.stat.exists == False
 
     - name: Scp RGWs dirs and configs
index bbcab8e94181b3619a3932d2f2df1775f4dfe017..141679c2592404e7a764ae1f6afb4e2f5b651237 100644 (file)
       raw_device=$(echo "{{ item }}" | egrep -o '/dev/([hsv]d[a-z]{1,2}|cciss/c[0-9]d[0-9]p|nvme[0-9]n[0-9]p){1,2}')
       partition_nb=$(echo "{{ item }}" | egrep -o '[0-9]{1,2}$')
       sgdisk --delete $partition_nb $raw_device
-    with_items: "{{ceph_journal_partition_to_erase_path.stdout_lines}}"
+    with_items: "{{ ceph_journal_partition_to_erase_path.stdout_lines }}"
     when:
       ceph_journal_partlabels.rc == 0 and
       zap_block_devs
index 0c232abe988a1eddf8786d2e12a8e7f6759c2396..7e64e358a44deba349b34dcefe6ff044be79390a 100644 (file)
 
     - name: select a running monitor
       set_fact: mon_host={{ item }}
-      with_items: groups.mons
+      with_items: "{{ groups.mons }}"
       when: item != inventory_hostname
 
     - name: waiting for the monitor to join the quorum...
index 5fb1bd60fb66df4b3145ce0976d0e1ef82162da6..bf266b6faf2bd9cfb6d2d9425ec04f1ca1667dfe 100644 (file)
@@ -70,7 +70,7 @@
 
   - fail:
       msg: "Ceph's configuration file is not present in /etc/ceph"
-    with_items: "{{ceph_conf_key.results}}"
+    with_items: "{{ ceph_conf_key.results }}"
     when:
       -  item.stat.exists == false
 
 #
   - name: find the host where the osd(s) is/are running on
     command: ceph --cluster {{ cluster }} osd find {{ item }}
-    with_items: "{{osd_ids.split(',')}}"
+    with_items: "{{ osd_ids.split(',') }}"
     register: osd_hosts
 
   - set_fact: ip_item="{{(item.stdout | from_json).ip}}"
-    with_items: "{{osd_hosts.results}}"
+    with_items: "{{ osd_hosts.results }}"
     register: ip_result
 
   - set_fact: ips="{{ ip_result.results | map(attribute='ansible_facts.ip_item') | list }}"
     stat:
       path: "/etc/ceph/{{ cluster }}.client.admin.keyring"
     register: ceph_admin_key
-    with_items: "{{real_ips}}"
-    delegate_to: "{{item}}"
+    with_items: "{{ real_ips }}"
+    delegate_to: "{{ item }}"
     failed_when: false
 
   - fail:
       msg: "The Ceph admin key is not present on the OSD node, please add it and remove it after the playbook is done."
-    with_items: "{{ceph_admin_key.results}}"
+    with_items: "{{ ceph_admin_key.results }}"
     when:
       -  item.stat.exists == false
 
   - name: deactivating osd(s)
     command: ceph-disk deactivate --cluster {{ cluster }} --deactivate-by-id {{ item.0 }} --mark-out
     with_together:
-      - "{{osd_ids.split(',')}}"
-      - "{{real_ips}}"
-    delegate_to: "{{item.1}}"
+      - "{{ osd_ids.split(',') }}"
+      - "{{ real_ips }}"
+    delegate_to: "{{ item.1 }}"
 
   - name: destroying osd(s)
     command: ceph-disk destroy --cluster {{ cluster }} --destroy-by-id {{ item.0 }} --zap
     with_together:
-      - "{{osd_ids.split(',')}}"
-      - "{{real_ips}}"
-    delegate_to: "{{item.1}}"
+      - "{{ osd_ids.split(',') }}"
+      - "{{ real_ips }}"
+    delegate_to: "{{ item.1 }}"
index e8fcbf8d67321b5acb9f09249746f8b9b1b14256..6fdf6b776bb786211c798dd57769f06874875898 100644 (file)
@@ -93,7 +93,7 @@
 - name: switching from non-containerized to containerized ceph mon
 
   vars:
-    mon_group_name:       mons    
+    mon_group_name:       mons
     restapi_group_name:   restapis
 
   hosts:
 
   - name: select a running monitor
     set_fact: mon_host={{ item }}
-    with_items: groups.mons
+    with_items: "{{ groups.mons }}"
     when: item != inventory_hostname
 
   - name: get current ceph fsid
index f52864dc83a3d339ecbb8b5302c0181e8b745982..0cc5af74a100ca54ab11b09c78a00e716c5e31b7 100644 (file)
@@ -1,7 +1,7 @@
 ---
 - name: create pools
   command: ceph --cluster {{ cluster }} osd pool create {{ item.name }} {{ item.pgs }}
-  with_items: pools
+  with_items: "{{ pools }}"
   changed_when: false
   failed_when: false
 
@@ -9,6 +9,6 @@
   command: ceph --cluster {{ cluster }} auth get-or-create {{ item.name }} {{ item.value }} -o /etc/ceph/{{ cluster }}.{{ item.name }}.keyring
   args:
     creates: /etc/ceph/{{ cluster }}.{{ item.name }}.keyring
-  with_items: keys
+  with_items: "{{ keys }}"
   changed_when: false
   when: cephx
index 1f0ceeda3d01999c0f776ca5e29e3e27ca1f488a..9a464988b392a2c807aa3a57793a1277533e6587 100644 (file)
@@ -5,7 +5,7 @@
     state: present
     update_cache: yes
     cache_valid_time: 3600
-  with_items: "{{debian_package_dependencies}}"
+  with_items: "{{ debian_package_dependencies }}"
 
 - name: configure ceph apt repository
   include: debian_ceph_repository.yml
@@ -17,7 +17,7 @@
     update_cache: yes
     state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
     default_release: "{{ ceph_stable_release_uca | default(ansible_distribution_release) }}{{ '-backports' if ceph_origin == 'distro' and ceph_use_distro_backports else ''}}"
-  with_items: "{{debian_ceph_packages}}"
+  with_items: "{{ debian_ceph_packages }}"
 
 - name: install ceph-test
   apt:
index 1a67ef6ce3658a5dfffee6c50614b3531168c42b..8feabcb873705c752967656ddd5d52f2b19bf5fb 100644 (file)
@@ -37,7 +37,7 @@
     state: present
     update_cache: yes
     cache_valid_time: 3600
-  with_items: debian_package_dependencies
+  with_items: "{{ debian_package_dependencies }}"
 
 - name: install red hat storage ceph mon
   apt:
index b950e113675127244f3f21658e46d232b26c07d1..97f392322d57e1ba77ccbe9277d2cd4f544adfd1 100644 (file)
@@ -20,7 +20,7 @@
   yum:
     name: "{{ item }}"
     state: present
-  with_items: redhat_package_dependencies
+  with_items: "{{ redhat_package_dependencies }}"
   when:
     - ansible_pkg_mgr == "yum"
 
index 621770520fbc9a8d3ff2a289dccf4bafb58606e1..b63d4096e20fb1bc9306de560cee122be42399b1 100644 (file)
@@ -28,4 +28,4 @@
     state: present
     sysctl_file: /etc/sysctl.conf
     ignoreerrors: yes
-  with_items: os_tuning_params
+  with_items: "{{ os_tuning_params }}"
index c20bc7c4f8947d6febf4c02778dc60ce210edcb8..e59e7208fac21d2af25c8b27308de11e4fcc56f7 100644 (file)
@@ -29,3 +29,4 @@ ceph_mds_docker_imagename: daemon
 ceph_mds_docker_image_tag: latest
 ceph_mds_docker_extra_env: "MDS_NAME={{ ansible_hostname }}" # comma separated variables
 ceph_docker_on_openstack: false
+ceph_config_keys: [] # DON'T TOUCH ME
index 53ea48053d68dd88eced629ecaeb4618d8596343..09cb57b577440d923c8b11179af952b01e8cca31 100644 (file)
@@ -13,7 +13,7 @@
 - name: stat for ceph config and keys
   stat:
     path: "{{ item }}"
-  with_items: ceph_config_keys
+  with_items: "{{ ceph_config_keys }}"
   changed_when: false
   failed_when: false
   register: statleftover
@@ -22,6 +22,6 @@
   fail:
     msg: "looks like no cluster is running but ceph files are present, please remove them"
   with_together:
-    - ceph_config_keys
-    - statleftover.results
+    - "{{ ceph_config_keys }}"
+    - "{{ statleftover.results }}"
   when: item.1.stat.exists == true
index 7153506f7347ebedafbccaa05475a27650b02cbf..59fbf9f8b1d3aab177f2f1cb1fd35284039674c6 100644 (file)
@@ -10,7 +10,7 @@
 
 - name: stat for ceph config and keys
   local_action: stat path={{ fetch_directory }}/docker_mon_files/{{ item }}
-  with_items: ceph_config_keys
+  with_items: "{{ ceph_config_keys }}"
   changed_when: false
   become: false
   failed_when: false
@@ -25,6 +25,6 @@
     mode: 0644
   changed_when: false
   with_together:
-    - ceph_config_keys
-    - statconfig.results
+    - "{{ ceph_config_keys }}"
+    - "{{ statconfig.results }}"
   when: item.1.stat.exists == true
index 0737ef3ea4137afcf72741e97f02e5cdf086685e..77ae55cec745bd748bee67ffb4310e6e9e877c74 100644 (file)
@@ -81,3 +81,4 @@ ceph_mon_extra_envs: "MON_NAME={{ ansible_hostname }}" # comma separated variabl
 ceph_docker_on_openstack: false
 mon_docker_privileged: false
 mon_docker_net_host: true
+ceph_config_keys: [] # DON'T TOUCH ME
index 53ea48053d68dd88eced629ecaeb4618d8596343..09cb57b577440d923c8b11179af952b01e8cca31 100644 (file)
@@ -13,7 +13,7 @@
 - name: stat for ceph config and keys
   stat:
     path: "{{ item }}"
-  with_items: ceph_config_keys
+  with_items: "{{ ceph_config_keys }}"
   changed_when: false
   failed_when: false
   register: statleftover
@@ -22,6 +22,6 @@
   fail:
     msg: "looks like no cluster is running but ceph files are present, please remove them"
   with_together:
-    - ceph_config_keys
-    - statleftover.results
+    - "{{ ceph_config_keys }}"
+    - "{{ statleftover.results }}"
   when: item.1.stat.exists == true
index f2ba50e81b7d4cb9a0c1b8e3cf006cf59488b91f..e5a684a96966aee110fb6573df3ea127910c27ca 100644 (file)
@@ -5,6 +5,6 @@
     dest: "{{ fetch_directory }}/docker_mon_files/{{ item.0 }}"
     flat: yes
   with_together:
-    - ceph_config_keys
-    - statconfig.results
+    - "{{ ceph_config_keys }}"
+    - "{{ statconfig.results }}"
   when: item.1.stat.exists == false
index 63c8b3c459b99693ff810f73df8e0502fb7994ec..00ed642ab0aeeb59b41bd9d6cf20e8ab4df6f719 100644 (file)
@@ -12,7 +12,7 @@
 
 - name: stat for ceph config and keys
   local_action: stat path={{ fetch_directory }}/docker_mon_files/{{ item }}
-  with_items: ceph_config_keys
+  with_items: "{{ ceph_config_keys }}"
   changed_when: false
   become: false
   failed_when: false
@@ -27,6 +27,6 @@
     mode: 0644
   changed_when: false
   with_together:
-    - ceph_config_keys
-    - statconfig.results
+    - "{{ ceph_config_keys }}"
+    - "{{ statconfig.results }}"
   when: item.1.stat.exists == true
index 74666493a83d9bae0acb17382281a18d03766c7b..a388cca44c2932cd7f9aa88c21e1824a18cdb8ed 100644 (file)
@@ -8,5 +8,5 @@
   command: ceph --cluster {{ cluster }} osd pool set {{ item[0] }} {{ item[1] }} true
   with_nested:
     - "{{ ceph_pools.stdout_lines|default([]) }}"
-    - secure_cluster_flags
+    - "{{ secure_cluster_flags }}"
   when: ceph_release_num.{{ ceph_release }} >= ceph_release_num.hammer
index f4b82f316e92b19f5b830c25339f1969b3e48c1e..adab1743e4b1cf225dde2ad7fe9f71809599f476 100644 (file)
@@ -11,6 +11,7 @@ fetch_directory: fetch/
 #
 cephx: true
 
+
 #######################
 # Access type options #
 #######################
@@ -81,3 +82,4 @@ ceph_nfs_docker_imagename: ganesha
 ceph_nfs_docker_image_tag: latest
 #ceph_nfs_docker_extra_env: "GANESHA_EPOCH={{ ganesha_epoch }}" # comma separated variables
 ceph_docker_on_openstack: false
+ceph_config_keys: [] # DON'T TOUCH ME
index 992fc0e336620739970eb48979953501dc1038ac..ec58106f6a83fdf055924cd1c43438bceac1e77e 100644 (file)
@@ -11,7 +11,7 @@
 - name: stat for ceph config and keys
   stat:
     path: "{{ item }}"
-  with_items: ceph_config_keys
+  with_items: "{{ ceph_config_keys }}"
   changed_when: false
   failed_when: false
   register: statleftover
@@ -20,6 +20,6 @@
   fail:
     msg: "looks like no cluster is running but ceph files are present, please remove them"
   with_together:
-    - ceph_config_keys
-    - statleftover.results
+    - "{{ ceph_config_keys }}"
+    - "{{ statleftover.results }}"
   when: item.1.stat.exists == true
index 6b37760b3193f3482259ae6dbe7550235698d70c..920c7623d16fbf0ef273ecbb4350d4143a574d0d 100644 (file)
@@ -8,7 +8,7 @@
 
 - name: stat for config and keys
   local_action: stat path={{ fetch_directory }}/docker_mon_files/{{ item }}
-  with_items: ceph_config_keys
+  with_items: "{{ ceph_config_keys }}"
   changed_when: false
   become: false
   failed_when: false
@@ -23,6 +23,6 @@
     mode: 0644
   changed_when: false
   with_together:
-    - ceph_config_keys
-    - statconfig.results
+    - "{{ ceph_config_keys }}"
+    - "{{ statconfig.results }}"
   when: item.1.stat.exists == true
index 07e6a40d25399d02f46451d2d1747380c3cb4a2e..d94b1dad63ff913163f71fda43e899eb071a94d8 100644 (file)
@@ -6,7 +6,7 @@
 
 - name: stat for config and keys
   local_action: stat path={{ fetch_directory }}/docker_mon_files/{{ item }}
-  with_items: nfs_config_keys
+  with_items: "{{ nfs_config_keys }}"
   changed_when: false
   become: false
   failed_when: false
@@ -21,8 +21,8 @@
     mode: 0644
   changed_when: false
   with_together:
-    - nfs_config_keys
-    - statconfig.results
+    - "{{ nfs_config_keys }}"
+    - "{{ statconfig.results }}"
   when: item.1.stat.exists == true
 
 - name: push ganesha files to the ansible server
@@ -31,6 +31,6 @@
     dest: "{{ fetch_directory }}/docker_mon_files/{{ item.0 }}"
     flat: yes
   with_together:
-    - nfs_config_keys
-    - statconfig.results
+    - "{{ nfs_config_keys }}"
+    - "{{ statconfig.results }}"
   when: item.1.stat.exists == false
index a4757f9e87fc47f51210b458baed3487864b8e2e..4a1710c25443d1331ddd9dc391b504c7e0d953e2 100644 (file)
@@ -175,3 +175,4 @@ ceph_osd_docker_extra_env: "CEPH_DAEMON=OSD_CEPH_DISK_ACTIVATE" # comma separate
 #ceph_osd_docker_devices:
 # - /dev/sdb
 ceph_docker_on_openstack: false
+ceph_config_keys: [] # DON'T TOUCH ME
index 834ac3eacacc8302022e2084015940c6a90df47d..1ea1d5e9da46fd5aff8fac60436a8be14999dbc8 100644 (file)
@@ -5,7 +5,7 @@
 - name: automatically activate osd disk(s) without partitions
   command: ceph-disk activate "/dev/{{ item.key | regex_replace('^(\/dev\/cciss\/c[0-9]{1}d[0-9]{1})$', '\\1p') }}1"
   ignore_errors: true
-  with_dict: ansible_devices
+  with_dict: "{{ ansible_devices }}"
   when:
     - ansible_devices is defined
     - item.value.removable == "0"
@@ -30,7 +30,7 @@
 - name: automatically activate osd disk(s) without partitions (dmcrypt)
   command: ceph-disk activate --dmcrypt "/dev/{{ item.key }}"
   ignore_errors: true
-  with_dict: ansible_devices
+  with_dict: "{{ ansible_devices }}"
   when:
     - ansible_devices is defined
     - item.value.removable == "0"
index ae6807dd9d65941d9b5aa90354a00eff909aba2d..893eac48ec6512075dd765500c55198df578ee0c 100644 (file)
@@ -11,7 +11,7 @@
 
 - name: check the partition status of the osd disks (autodiscover disks)
   shell: "parted --script /dev/{{ item.key }} print > /dev/null 2>&1"
-  with_dict: '{{ ansible_devices }}'
+  with_dict: "{{ ansible_devices }}"
   changed_when: false
   failed_when: false
   register: osd_partition_status_results
index 53ea48053d68dd88eced629ecaeb4618d8596343..09cb57b577440d923c8b11179af952b01e8cca31 100644 (file)
@@ -13,7 +13,7 @@
 - name: stat for ceph config and keys
   stat:
     path: "{{ item }}"
-  with_items: ceph_config_keys
+  with_items: "{{ ceph_config_keys }}"
   changed_when: false
   failed_when: false
   register: statleftover
@@ -22,6 +22,6 @@
   fail:
     msg: "looks like no cluster is running but ceph files are present, please remove them"
   with_together:
-    - ceph_config_keys
-    - statleftover.results
+    - "{{ ceph_config_keys }}"
+    - "{{ statleftover.results }}"
   when: item.1.stat.exists == true
index 540dad17f2063a9eea51c12dff1f8bc7d8345ab7..0e1f0658a99265b81a22286b80dd2c8b29665759 100644 (file)
     wait_for
     path="{{ playbook_dir }}/{{ fetch_directory }}/docker_mon_files/{{ item.0 }}"
   become: false
-  with_together:
-      - ceph_config_keys
+  with_together: "{{ ceph_config_keys }}"
 
 - name: stat for ceph config and keys
   local_action: stat path={{ fetch_directory }}/docker_mon_files/{{ item }}
-  with_items: ceph_config_keys
+  with_items: "{{ ceph_config_keys }}"
   changed_when: false
   become: false
   failed_when: false
@@ -29,5 +28,4 @@
     group: root
     mode: 0644
   changed_when: false
-  with_together:
-    - ceph_config_keys
+  with_together: "{{ ceph_config_keys }}"
index 3bfdb3ade2de6dd85f8c49fe62870d627b41fd92..a39493168e0a288ae66c4d5fed266de1f60d5047 100644 (file)
@@ -12,7 +12,7 @@
 - name: verify if the disk was already prepared
   shell: "lsblk -o PARTLABEL {{ item }} | grep -sq 'ceph'"
   failed_when: false
-  with_items: ceph_osd_docker_devices
+  with_items: "{{ ceph_osd_docker_devices }}"
   register: osd_prepared
 
 # use shell rather than docker module
@@ -34,8 +34,8 @@
     -e CEPH_DAEMON=OSD_CEPH_DISK_PREPARE \
     "{{ ceph_osd_docker_username }}/{{ ceph_osd_docker_imagename }}:{{ ceph_osd_docker_image_tag }}"
   with_together:
-    - ceph_osd_docker_devices
-    - osd_prepared.results
+    - "{{ ceph_osd_docker_devices }}"
+    - "{{ osd_prepared.results }}"
   when:
     - item.1.get("rc", 0) != 0
     - ceph_osd_docker_prepare_env is defined
@@ -58,8 +58,8 @@
     -e KV_PORT={{kv_port}} \
     "{{ ceph_osd_docker_username }}/{{ ceph_osd_docker_imagename }}:{{ ceph_osd_docker_image_tag }}" \
   with_together:
-    - ceph_osd_docker_devices
-    - osd_prepared.results
+    - "{{ ceph_osd_docker_devices }}"
+    - "{{ osd_prepared.results }}"
   when:
     - item.1.get("rc", 0) != 0
     - ceph_osd_docker_prepare_env is defined
@@ -81,7 +81,7 @@
   shell: systemctl enable ceph-osd@{{ item | basename }}.service
   failed_when: false
   changed_when: false
-  with_items: ceph_osd_docker_devices
+  with_items: "{{ ceph_osd_docker_devices }}"
   when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
 
 - name: reload systemd unit files
@@ -96,7 +96,7 @@
     state: started
     enabled: yes
   changed_when: false
-  with_items: ceph_osd_docker_devices
+  with_items: "{{ ceph_osd_docker_devices }}"
   when: ansible_os_family == 'RedHat' or ansible_os_family == 'CoreOS'
 
 - name: run the ceph osd docker image
     privileged: yes
     env: "OSD_DEVICE={{ item }},{{ ceph_osd_docker_extra_env }}"
     volumes: "/var/lib/ceph:/var/lib/ceph,/etc/ceph:/etc/ceph,/etc/localtime:/etc/localtime:ro,/dev:/dev,/run:/run"
-  with_items: ceph_osd_docker_devices
+  with_items: "{{ ceph_osd_docker_devices }}"
   when:
     - ansible_os_family != 'RedHat'
     - ansible_os_family != 'CoreOS'
     privileged: yes
     env: "KV_TYPE={{kv_type}},KV_IP={{kv_endpoint}},OSD_DEVICE={{ item }},{{ ceph_osd_docker_extra_env }}"
     volumes: "/etc/localtime:/etc/localtime:ro,/dev/:/dev/"
-  with_items: ceph_osd_docker_devices
+  with_items: "{{ ceph_osd_docker_devices }}"
   when:
    - ansible_os_family != 'RedHat'
    - ansible_os_family != 'CoreOS'
    - osd_containerized_deployment_with_kv
+
index cd70c5275338d2b0e7d1dcae479dc204ed59d53b..7cd0f36a1c19927f725ceb6ed3933170e33ec4e1 100644 (file)
@@ -1,7 +1,7 @@
 ---
 - name: get osd path
   shell: "df | grep {{ item }} | awk '{print $6}'"
-  with_items: devices
+  with_items: "{{ devices }}"
   changed_when: false
   failed_when: false
   register: osd_path
@@ -9,7 +9,7 @@
 
 - name: get osd id
   command: cat {{ item.stdout }}/whoami
-  with_items: osd_path.results
+  with_items: "{{ osd_path.results }}"
   changed_when: false
   failed_when: false
   register: osd_id_non_dir_scenario
@@ -17,7 +17,7 @@
 
 - name: get osd id for directory scenario
   command: cat {{ item.stdout }}/whoami
-  with_items: osd_directories
+  with_items: "{{ osd_directories }}"
   changed_when: false
   failed_when: false
   register: osd_id_dir_scenario
@@ -47,7 +47,7 @@
     owner: "{{ dir_owner }}"
     group: "{{ dir_group }}"
     mode: "{{ activate_file_mode }}"
-  with_items: combined_osd_id.results
+  with_items: "{{ combined_osd_id.results }}"
 
 - name: copy {{ cluster }}.conf for assembling
   command: cp /etc/ceph/{{ cluster }}.conf /etc/ceph/ceph.d/
index 68ab01a615d936881272d00f788acb508e447a52..2c5011c2bbf24dfee3261b68f02bfe9442647467 100644 (file)
@@ -12,7 +12,7 @@
 - name: automatic prepare osd disk(s) without partitions
   command: ceph-disk prepare --bluestore --cluster "{{ cluster }}" "/dev/{{ item.key }}"
   register: prepared_osds
-  with_dict: ansible_devices
+  with_dict: "{{ ansible_devices }}"
   when:
     - ansible_devices is defined
     - item.value.removable == "0"
@@ -23,9 +23,9 @@
 - name: manually prepare osd disk(s)
   command: ceph-disk prepare --bluestore --cluster "{{ cluster }}" "{{ item.2 }}"
   with_together:
-    - parted_results.results
-    - ispartition_results.results
-    - devices
+    - "{{ parted_results.results }}"
+    - "{{ ispartition_results.results }}"
+    - "{{ devices }}"
   when:
     - not item.0.get("skipped")
     - not item.1.get("skipped")
index f44407ba43b228918861fdb8df68c7726c78d71a..04d3a7b42eece943a68f902635f2f86192655246 100644 (file)
 - name: prepare osd disk(s)
   command: "ceph-disk prepare --dmcrypt --cluster {{ cluster }} {{ item.2 }} {{ item.3 }}"
   with_together:
-    - parted_results.results
-    - ispartition_results.results
-    - devices
-    - raw_journal_devices
+    - "{{ parted_results.results }}"
+    - "{{ ispartition_results.results }}"
+    - "{{ devices }}"
+    - "{{ raw_journal_devices }}"
   changed_when: false
   when:
     - not item.0.get("skipped")
index 642f193fbb50e77ddbda4fa8c9c6bccd50d0f953..a5431e69225c97c5423a5d40e8a40a0cd0be7cf0 100644 (file)
@@ -11,7 +11,7 @@
 # failed, this is why we check if the device is a partition too.
 - name: automatic prepare osd disk(s) without partitions (dmcrypt)
   command: ceph-disk prepare --dmcrypt --cluster "{{ cluster }}" "/dev/{{ item.key }}"
-  with_dict: ansible_devices
+  with_dict: "{{ ansible_devices }}"
   when:
     - ansible_devices is defined
     - item.value.removable == "0"
@@ -22,9 +22,9 @@
 - name: manually prepare osd disk(s) (dmcrypt)
   command: ceph-disk prepare --dmcrypt --cluster "{{ cluster }}" "{{ item.2 }}"
   with_together:
-    - parted_results.results
-    - ispartition_results.results
-    - devices
+    - "{{ parted_results.results }}"
+    - "{{ ispartition_results.results }}"
+    - "{{ devices }}"
   when:
     - not item.0.get("skipped")
     - not item.1.get("skipped")
index ba0fbb41f9c48d62bc4cc8950ae9b8cb66537903..7d286983e39ab57e58152614ebb557a24e7d08bf 100644 (file)
@@ -12,7 +12,7 @@
 - name: automatic prepare osd disk(s) without partitions
   command: ceph-disk prepare --cluster "{{ cluster }}" "/dev/{{ item.key }}"
   register: prepared_osds
-  with_dict: ansible_devices
+  with_dict: "{{ ansible_devices }}"
   when:
     - ansible_devices is defined
     - item.value.removable == "0"
@@ -23,9 +23,9 @@
 - name: manually prepare osd disk(s)
   command: "ceph-disk prepare --cluster {{ cluster }} {{ item.2 }}"
   with_together:
-    - parted_results.results
-    - ispartition_results.results
-    - devices
+    - "{{ parted_results.results }}"
+    - "{{ ispartition_results.results }}"
+    - "{{ devices }}"
   when:
     - not item.0.get("skipped")
     - not item.1.get("skipped")
index 9cad4cfdfba9229c0ae098f187a1b5ac15cbb77f..899af7d334c43829a840298abddc1bd32e341915 100644 (file)
     state: directory
     owner: "{{ dir_owner }}"
     group: "{{ dir_group }}"
-  with_items: osd_directories
+  with_items: "{{ osd_directories }}"
 
 # NOTE (leseb): the prepare process must be parallelized somehow...
 # if you have 64 disks with 4TB each, this will take a while
 # since Ansible will sequential process the loop
 - name: prepare OSD disk(s)
   command: "ceph-disk prepare --cluster {{ cluster }} {{ item }}"
-  with_items: osd_directories
+  with_items: "{{ osd_directories }}"
   changed_when: false
   when: osd_directory
 
 - name: activate OSD(s)
   command: "ceph-disk activate {{ item }}"
-  with_items: osd_directories
+  with_items: "{{ osd_directories }}"
   changed_when: false
 
 - name: start and add that the OSD service to the init sequence
index 2292a238a2d3b32d8b83581c85cfd608c0d29b62..6ecf8acde7073691aa8afd32cf7b17d165e6139e 100644 (file)
@@ -3,6 +3,7 @@
 # SETUP #
 #########
 
+
 # NOTE (leseb): the rbd-mirror daemon needs a user to start
 # because it has to authenticate with the local cluster.
 # By default, using the admin user is fine, so you should not
@@ -41,3 +42,4 @@ ceph_rbd_mirror_docker_username: ceph
 ceph_rbd_mirror_docker_imagename: daemon
 ceph_rbd_mirror_docker_image_tag: latest
 ceph_docker_on_openstack: false
+ceph_config_keys: [] # DON'T TOUCH ME
index 53ea48053d68dd88eced629ecaeb4618d8596343..09cb57b577440d923c8b11179af952b01e8cca31 100644 (file)
@@ -13,7 +13,7 @@
 - name: stat for ceph config and keys
   stat:
     path: "{{ item }}"
-  with_items: ceph_config_keys
+  with_items: "{{ ceph_config_keys }}"
   changed_when: false
   failed_when: false
   register: statleftover
@@ -22,6 +22,6 @@
   fail:
     msg: "looks like no cluster is running but ceph files are present, please remove them"
   with_together:
-    - ceph_config_keys
-    - statleftover.results
+    - "{{ ceph_config_keys }}"
+    - "{{ statleftover.results }}"
   when: item.1.stat.exists == true
index 91afa69fa2426fa4675b88fd5afec5a339c14c9b..b2d3b6c82ee9ceafdf768835b7858d04343a7f73 100644 (file)
@@ -9,7 +9,7 @@
 
 - name: stat for ceph config and keys
   local_action: stat path={{ fetch_directory }}/docker_mon_files/{{ item }}
-  with_items: ceph_config_keys
+  with_items: "{{ ceph_config_keys }}"
   changed_when: false
   become: false
   failed_when: false
@@ -24,6 +24,6 @@
     mode: 0644
   changed_when: false
   with_together:
-    - ceph_config_keys
-    - statconfig.results
+    - "{{ ceph_config_keys }}"
+    - "{{ statconfig.results }}"
   when: item.1.stat.exists == true
index cfe565922b367fb66ec0e8b3039b9949f6d71e4c..b93605b15bac847f116f4bffb41f328d5ff9f3f8 100644 (file)
@@ -18,3 +18,4 @@ ceph_restapi_docker_imagename: daemon
 ceph_restapi_docker_image_tag: latest
 ceph_restapi_docker_extra_env: "RESTAPI_IP=0.0.0.0" # comma separated variables
 ceph_docker_on_openstack: false
+ceph_config_keys: [] # DON'T TOUCH ME
index 8cbdc1d31360de03966a12152f5bcdb6aa9ade78..ac369b3841eb1aa2e257ef0ee508933fc75ec505 100644 (file)
@@ -7,7 +7,7 @@
 
 - name: stat for ceph config and keys
   local_action: stat path={{ fetch_directory }}/docker_mon_files/{{ item }}
-  with_items: ceph_config_keys
+  with_items: "{{ ceph_config_keys }}"
   changed_when: false
   become: false
   ignore_errors: true
@@ -22,6 +22,6 @@
     mode: 0644
   changed_when: false
   with_together:
-    - ceph_config_keys
-    - statconfig.results
+    - "{{ ceph_config_keys }}"
+    - "{{ statconfig.results }}"
   when: item.1.stat.exists == true
index 3b9282e36858c938630c172f40ca6387bbc2bc04..c47f7c60ebbd6f8686ed587000bd28b31264bbc8 100644 (file)
@@ -36,3 +36,4 @@ ceph_rgw_docker_imagename: daemon
 ceph_rgw_docker_image_tag: latest
 ceph_rgw_docker_extra_env: "RGW_CIVETWEB_PORT={{ ceph_rgw_civetweb_port }}" # comma separated variables
 ceph_docker_on_openstack: false
+ceph_config_keys: [] # DON'T TOUCH ME
index 53ea48053d68dd88eced629ecaeb4618d8596343..09cb57b577440d923c8b11179af952b01e8cca31 100644 (file)
@@ -13,7 +13,7 @@
 - name: stat for ceph config and keys
   stat:
     path: "{{ item }}"
-  with_items: ceph_config_keys
+  with_items: "{{ ceph_config_keys }}"
   changed_when: false
   failed_when: false
   register: statleftover
@@ -22,6 +22,6 @@
   fail:
     msg: "looks like no cluster is running but ceph files are present, please remove them"
   with_together:
-    - ceph_config_keys
-    - statleftover.results
+    - "{{ ceph_config_keys }}"
+    - "{{ statleftover.results }}"
   when: item.1.stat.exists == true
index 8e91c2ffe988fa9d1ec29a2c3757aa0393727787..10e7052202996d594ca5f642b46c84541a68b8f2 100644 (file)
@@ -13,7 +13,7 @@
 
 - name: stat for config and keys
   local_action: stat path={{ fetch_directory }}/docker_mon_files/{{ item }}
-  with_items: rgw_config_keys
+  with_items: "{{ rgw_config_keys }}"
   changed_when: false
   become: false
   failed_when: false
@@ -28,8 +28,8 @@
     dest: "{{ fetch_directory }}/docker_mon_files/var/lib/ceph/radosgw/keyring"
     flat: yes
   with_together:
-    - rgw_config_keys
-    - statconfig.results
+    - "{{ rgw_config_keys }}"
+    - "{{ statconfig.results }}"
   when:
     - nfs_obj_gw
     - item.1.stat.exists == false
index 9b0e9544e2121f35fee1b88419c99faa1d9ce7bc..19337240dfa2d01dea5c8472e3837f93f3d3a541 100644 (file)
@@ -7,7 +7,7 @@
 
 - name: stat for ceph config and keys
   local_action: stat path={{ fetch_directory }}/docker_mon_files/{{ item }}
-  with_items: ceph_config_keys
+  with_items: "{{ ceph_config_keys }}"
   changed_when: false
   become: false
   ignore_errors: true
@@ -22,6 +22,6 @@
     mode: 0644
   changed_when: false
   with_together:
-    - ceph_config_keys
-    - statconfig.results
+    - "{{ ceph_config_keys }}"
+    - "{{ statconfig.results }}"
   when: item.1.stat.exists == true