How to force EBS volume to detached from EC2? ec2_vol is not working.

93 views
Skip to first unread message

Bhavin Parmar

unread,
Apr 3, 2017, 11:20:40 AM4/3/17
to Ansible Project
I am trying to detach EBS volume:

--- # Ansible role to detach EBS Volume
  - name: Detach AWS EBS Volume
    ec2_vol:
      aws_access_key: '{{ AwsAccesskey }}'
      aws_secret_key: '{{ AwsSecretkey }}'
      region: '{{ region  }}'
      id: '{{ item }}'
      instance: None
    with_items: "{{ awsebsid }}"
...

It is not able to detach EBS volume if it is mounted. Please, can you suggest how to force or detach EBS volume? I understand it is best practice to unmount the volume from OS before detaching but is it compulsory?


Reply all
Reply to author
Forward
0 new messages