- name: install required packages
  become: yes
  apt:
    name: "{{ item }}"
  with_items:
    - debootstrap
    - qemu-utils
    - curl
    - uuid-runtime

- name: install nodepool sudoers file (for DIB builds)
  become: yes
  copy:
    dest: /etc/sudoers.d/99_nodepool_suoders
    mode: 0400
    owner: root
    content: "nodepool ALL=(ALL) NOPASSWD:ALL"

- name: ensure image build directory
  become: yes
  file:
    path: /opt/nodepool/images
    state: directory
    owner: nodepool
    group: nodepool

- name: create ~/.openstack
  become: yes
  file:
    path: /var/lib/nodepool/.config/openstack
    state: directory
    owner: nodepool
    group: nodepool

- name: create clouds.yaml
  become: yes
  copy:
    dest: /var/lib/nodepool/.config/openstack/clouds.yaml
    content: "{{ secrets.nodepool.providers | to_nice_yaml }}"
    owner: nodepool
    group: nodepool
    mode: 0400

- name: install required packages
  become: yes
  apt:
    name: "{{ item }}"
  with_items:
    - debootstrap
    - qemu-utils
    - curl
    - uuid-runtime
    - parted

- name: install nodepool sudoers file (for DIB builds)
  become: yes
  copy:
    dest: /etc/sudoers.d/99_nodepool_suoders
    mode: 0400
    owner: root
    content: "nodepool ALL=(ALL) NOPASSWD:ALL"

- name: ensure image build directory
  become: yes
  file:
    path: /opt/nodepool/images
    state: directory
    owner: nodepool
    group: nodepool

- name: create ~/.openstack
  become: yes
  file:
    path: /var/lib/nodepool/.config/openstack
    state: directory
    owner: nodepool
    group: nodepool

- name: create clouds.yaml
  become: yes
  copy:
    dest: /var/lib/nodepool/.config/openstack/clouds.yaml
    content: "{{ secrets.nodepool.providers | to_nice_yaml }}"
    owner: nodepool
    group: nodepool
    mode: 0400

Add parted as nodepool dep
Add parted as nodepool dep
