diff --git a/roles/upload-logs-swift/README.rst b/roles/upload-logs-swift/README.rst index d5d3a4972..17c661e40 100644 --- a/roles/upload-logs-swift/README.rst +++ b/roles/upload-logs-swift/README.rst @@ -53,3 +53,10 @@ This uploads logs to an OpenStack Object Store (Swift) container. :default: Generated by the role `set-zuul-log-path-fact` Prepend this path to the object names when uploading. + +.. zuul:rolevar:: zuul_log_create_indexes + :default: true + + Whether to create `index.html` files with directory indexes. If set + to false, Swift containers can be marked with a `Web-Listings=true` + property to activate Swift's own directory indexing. diff --git a/roles/upload-logs-swift/defaults/main.yaml b/roles/upload-logs-swift/defaults/main.yaml index 846ed0459..27893357b 100644 --- a/roles/upload-logs-swift/defaults/main.yaml +++ b/roles/upload-logs-swift/defaults/main.yaml @@ -1,3 +1,4 @@ zuul_log_partition: false zuul_log_container: logs zuul_log_container_public: true +zuul_log_create_indexes: true diff --git a/roles/upload-logs-swift/tasks/main.yaml b/roles/upload-logs-swift/tasks/main.yaml index f1d44ecd7..b66b1b023 100644 --- a/roles/upload-logs-swift/tasks/main.yaml +++ b/roles/upload-logs-swift/tasks/main.yaml @@ -24,6 +24,7 @@ container: "{{ zuul_log_container }}" public: "{{ zuul_log_container_public }}" prefix: "{{ zuul_log_path }}" + indexes: "{{ zuul_log_create_indexes }}" files: - "{{ zuul.executor.log_root }}/" delete_after: "{{zuul_log_delete_after | default(omit) }}"