please help me to create a swap partition using ansible

628 views
Skip to first unread message

Jobin A T. A T.

unread,
Jul 19, 2018, 7:01:11 AM7/19/18
to ansible...@googlegroups.com
hello all iam trying to create the swap partition using 


- name: creating lvm partition
    parted:
      device: /dev/sdb
      number: 1
      flags: [ swap ]
      state: present
      part_end: 1GiB

but i didn't get the exact flag name is that any other method for creating it 

Kai Stian Olstad

unread,
Jul 20, 2018, 4:04:41 AM7/20/18
to ansible...@googlegroups.com
flag swap is something completely different and not what you are after.

After looking at the code I see that you cant create a partition with
type set to swap/82 with the parted module.
So your option is to do it with commands using command/shell module.

--
Kai Stian Olstad

Jobin A T. A T.

unread,
Jul 21, 2018, 6:10:05 AM7/21/18
to ansible...@googlegroups.com
thank you sir


--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ddf8ee848d279393d1827265abd850e4%40olstad.com.
For more options, visit https://groups.google.com/d/optout.


--

​​
Jobin A T

Jr. Consultant - Technical Services
m: +91  8606784823

a:
ipsr solutions ltd.IPSR IT Tower, Illom Lane,Palliam Road,Cochin-South
w: 

​​​​​​INDIA: Trivandrum|Kottayam|Kochi|Calicut|Bangalore
|CyberPark
UK:​​London

https://www.facebook.com/ipsrsolutions    
Reply all
Reply to author
Forward
0 new messages