浏览代码

Merge pull request #495 from kwoodson/pvfix1

tagging pv
Kenny Woodson 9 年之前
父节点
当前提交
caa042dd0b
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      playbooks/adhoc/create_pv/create_pv.yaml

+ 10 - 0
playbooks/adhoc/create_pv/create_pv.yaml

@@ -50,6 +50,16 @@
 
   - debug: var=vol
 
+  - name: tag the vol with a name
+    ec2_tag: region={{ hostvars[oo_name]['ec2_region'] }} resource={{vol.volume_id}}
+    args:
+      tags:
+        Name: "pv-{{ hostvars[oo_name]['ec2_tag_Name'] }}"
+        env: "{{cli_environment}}"
+    register: voltags
+
+  - debug: var=voltags
+
 - name: Configure the drive
   gather_facts: no
   hosts: oo_master