summaryrefslogtreecommitdiffstats
path: root/playbooks/adhoc/create_pv
diff options
context:
space:
mode:
Diffstat (limited to 'playbooks/adhoc/create_pv')
-rw-r--r--playbooks/adhoc/create_pv/create_pv.yaml17
1 files changed, 17 insertions, 0 deletions
diff --git a/playbooks/adhoc/create_pv/create_pv.yaml b/playbooks/adhoc/create_pv/create_pv.yaml
index 684a0ca72..4f0ef7a75 100644
--- a/playbooks/adhoc/create_pv/create_pv.yaml
+++ b/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
@@ -118,6 +128,13 @@
state: unmounted
fstype: ext4
+ - name: remove from fstab
+ mount:
+ name: "{{ pv_mntdir }}"
+ src: "{{ cli_device_name }}"
+ state: absent
+ fstype: ext4
+
- name: detach drive
delegate_to: localhost
ec2_vol: