diff --git a/infra_config.yml.sample b/infra_config.yml.sample index 4c9abfc..945b044 100644 --- a/infra_config.yml.sample +++ b/infra_config.yml.sample @@ -28,6 +28,11 @@ infra_servers: net_name: your_neutron_network security_groups: "default,webserver" infra_type: gerrit + volumes: + - name: gerrit_volume + size: 40 + - name: gerrit_volume2 + size: 60 - name: nodepool image: 9d25fe2d-cf31-4b05-8c58-f238ec78e633 flavor: standard.small diff --git a/roles/provision_infra_servers/tasks/main.yml b/roles/provision_infra_servers/tasks/main.yml index 2abeace..47bd9b1 100644 --- a/roles/provision_infra_servers/tasks/main.yml +++ b/roles/provision_infra_servers/tasks/main.yml @@ -16,3 +16,13 @@ group: infra infra_type: "{{ item.infra_type }}" with_items: infra_servers + +- name: Create OpenStack volumes + os_volume: + state: present + cloud: "{{item.os_client_config_cloud | default(os_client_config_cloud) }}" + display_name: "{{ item.1.name }}" + size: "{{ item.1.size }}" + with_subelements: + - infra_servers + - volumes