Skip to content

consider failing earlier when no device is provided #63

@tabowling

Description

@tabowling

I accidentally executed a playbook using the storage role where I did not have a device defined. Would it be good to detect very early that a device name is NULL or invalid before executing so much of the logic? Below is the snippet from my playbook:

    - name: Configure Image Builder Storage
      include_role:
        name: linux-system-roles.storage
      vars:
        use_partitions: false
        storage_pools:
          - name: image_builder
            disks: ['']  # something like vdb
            # type: lvm
            state: present
            volumes:
              - name: composer
                size: "19.5G"
                # type: lvm
                # fs_type: xfs
                fs_label: "imgbldr"
                mount_point: '/var/lib/lorax/composer'
      when: CONFIG_STORAGE

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions