Hi,

I am trying to create the partition, but got the following error:

---

- hosts: default

  become: true

  become_method: sudo

  tasks:

    - name: part1

      parted:

        device: "/dev/vdb"

        number: 1

        state: present

    - name: filesystem

      filesystem:

        fstype: ext4

        dev: /dev/vdb

    - name: mounted

      mount:

        path: /opt

        src: /dev/vdb

        fstype: ext4

        state: mounted


    - name: partition

      lvg:

        vg: "datavg"

        pvs: "/dev/vdb"

        state: present

    - name: resize pv

      command: "pvresize /dev/vdb"


    - name: activate vg

      command: "vgchange -a y datavg"


    - name: Ensure

      lvol:

        vg: datavg

        lv: datalv

        size: "100%FREE"

      ignore_errors: true


    - name: sql file

      filesystem:

        dev: "/dev/datavg/datalv"

        fstype: ext4
Error:

TASK [part1] 
**********************************************************************************************************************************************************************************************

fatal: [localhost]: FAILED! => {"changed": false, "err": "Error: Could not 
stat device /dev/vdb - No such file or directory.\n", "msg": "Error while 
getting device information with parted script: '/sbin/parted -s -m /dev/vdb 
-- unit 'KiB' print'", "out": "", "rc": 1}



-- 
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-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/3a39c550-240b-40c9-ac52-508089cd14c4n%40googlegroups.com.

Reply via email to