---
- name: Ensure growpart is installed
  package: name=cloud-utils-growpart state=present
  when: not openshift_is_containerized | bool
  register: result
  until: result is succeeded

- name: Determine if growpart is installed
  command: "rpm -q cloud-utils-growpart"
  register: has_growpart
  failed_when: has_growpart.cr != 0 and 'package cloud-utils-growpart is not installed' not in has_growpart.stdout
  changed_when: false
  when: openshift_is_containerized | bool

- name: Grow the partitions
  command: "growpart {{oep_drive}} {{oep_partition}}"

- name: Expand the filesystem - xfs
  command: "xfs_growfs {{oep_drive}}{{oep_partition}}"
  when: oep_file_system == "xfs"

- name: Expand the filesystem - ext(2,3,4)
  command: "resize2fs {{oep_drive}}{{oep_partition}}"
  when: oep_file_system == "ext"

---
- name: Ensure growpart is installed
  package: name=cloud-utils-growpart state=present
  when: not openshift_is_containerized | bool
  register: result
  until: result is succeeded

- name: Determine if growpart is installed
  command: "rpm -q cloud-utils-growpart"
  register: has_growpart
  failed_when: has_growpart.rc != 0 and 'package cloud-utils-growpart is not installed' not in has_growpart.stdout
  changed_when: false
  when: openshift_is_containerized | bool

- name: Grow the partitions
  command: "growpart {{oep_drive}} {{oep_partition}}"

- name: Expand the filesystem - xfs
  command: "xfs_growfs {{oep_drive}}{{oep_partition}}"
  when: oep_file_system == "xfs"

- name: Expand the filesystem - ext(2,3,4)
  command: "resize2fs {{oep_drive}}{{oep_partition}}"
  when: oep_file_system == "ext"

Fix a typo in "Determine if growpart is installed"
Fix a typo in "Determine if growpart is installed"
