redhat-cop / casl-ansible

Ansible automation for Managing OpenShift Container Platform clusters
Apache License 2.0
120 stars 81 forks source link

Provision fails when not running `end-to-end` playbook #162

Open makentenza opened 6 years ago

makentenza commented 6 years ago

The following entries in all.yml causes the Cluster deployment to fail when running the config.yml playbook. It works while running the end-to-end.yml playbook.

openshift_hosted_registry_storage_kind: openstack
openshift_hosted_registry_storage_access_modes: ['ReadWriteOnce']
openshift_hosted_registry_storage_openstack_filesystem: ext4

Deployment ends with the following error:

Play:     Create Hosted Resources - persistent volumes
     Task:     Create temp directory for volume definitions
     Message:  The conditional check 'persistent_volumes | length > 0 or persistent_volume_claims | length > 0' failed. The error was: '{{ hostvars[groups.oo_first_master.0] | oo_persistent_volumes(groups) }}: volumeID'

               The error appears to have been in '{PATH}/casl-ansible/roles/openshift-ansible/roles/openshift_persistent_volumes/tasks/main.yml': line 2, column 3, but may
               be elsewhere in the file depending on the exact syntax problem.

               The offending line appears to be:

               ---
               - name: Create temp directory for volume definitions
                 ^ here
oybed commented 6 years ago

@day4skiing can you please propose a solution for this?

day4skiing commented 6 years ago

@oybed Move these values out of all.yml and push the setting of them into the cider-registry.yml "set registry volumeID fact" play (along with the other facts). Then trigger off a unique variable to execute the cinder-registry.yml playbook

day4skiing commented 6 years ago

@makentenza @oybed With the changes in #168 the values

openshift_hosted_registry_storage_access_modes: ['ReadWriteOnce']
openshift_hosted_registry_storage_openstack_filesystem: ext4

Are no longer part of all.yml . I tested this last night with the latest version of CASL and the byo/config.yml completed cleanly with the new inventory.