From 2cb9f249a8518abf9645c3cf39c3627e285b3337 Mon Sep 17 00:00:00 2001 From: vass Date: Wed, 1 Apr 2020 19:30:03 +0200 Subject: [PATCH] Rename install-podman to ensure-podman for consistency The old role will be kept and include ensure-podman for backwards-compatability. Change-Id: I21cfdfef4a88f66f51d139abed04f70b3228a22d --- doc/source/container-roles.rst | 1 + roles/build-container-image/common.rst | 2 +- roles/ensure-podman/README.rst | 4 ++++ .../tasks/Ubuntu.yaml | 0 .../tasks/default.yaml | 0 roles/ensure-podman/tasks/main.yaml | 8 ++++++++ roles/install-podman/README.rst | 5 +---- roles/install-podman/tasks/main.yaml | 11 +++-------- .../{install-podman => ensure-podman}/main.yaml | 2 +- zuul-tests.d/container-roles-jobs.yaml | 16 ++++++++-------- 10 files changed, 27 insertions(+), 22 deletions(-) create mode 100644 roles/ensure-podman/README.rst rename roles/{install-podman => ensure-podman}/tasks/Ubuntu.yaml (100%) rename roles/{install-podman => ensure-podman}/tasks/default.yaml (100%) create mode 100644 roles/ensure-podman/tasks/main.yaml rename test-playbooks/{install-podman => ensure-podman}/main.yaml (90%) diff --git a/doc/source/container-roles.rst b/doc/source/container-roles.rst index 32a9faa3e..6d0f92442 100644 --- a/doc/source/container-roles.rst +++ b/doc/source/container-roles.rst @@ -8,6 +8,7 @@ Container Roles .. zuul:autorole:: ensure-docker .. zuul:autorole:: ensure-kubernetes .. zuul:autorole:: ensure-openshift +.. zuul:autorole:: ensure-podman .. zuul:autorole:: install-docker .. zuul:autorole:: install-kubernetes .. zuul:autorole:: install-openshift diff --git a/roles/build-container-image/common.rst b/roles/build-container-image/common.rst index 91af46fd6..27f9ff323 100644 --- a/roles/build-container-image/common.rst +++ b/roles/build-container-image/common.rst @@ -15,7 +15,7 @@ They all accept the same input data, principally a list of dictionaries representing the images to build. YAML anchors_ can be used to supply the same data to all three jobs. -Use the :zuul:role:`ensure-docker` or :zuul:role:`install-podman` +Use the :zuul:role:`ensure-docker` or :zuul:role:`ensure-podman` role to install Docker or Podman before using these roles. **Role Variables** diff --git a/roles/ensure-podman/README.rst b/roles/ensure-podman/README.rst new file mode 100644 index 000000000..0103e63db --- /dev/null +++ b/roles/ensure-podman/README.rst @@ -0,0 +1,4 @@ +Install podman container manager + +**Role Variables** + diff --git a/roles/install-podman/tasks/Ubuntu.yaml b/roles/ensure-podman/tasks/Ubuntu.yaml similarity index 100% rename from roles/install-podman/tasks/Ubuntu.yaml rename to roles/ensure-podman/tasks/Ubuntu.yaml diff --git a/roles/install-podman/tasks/default.yaml b/roles/ensure-podman/tasks/default.yaml similarity index 100% rename from roles/install-podman/tasks/default.yaml rename to roles/ensure-podman/tasks/default.yaml diff --git a/roles/ensure-podman/tasks/main.yaml b/roles/ensure-podman/tasks/main.yaml new file mode 100644 index 000000000..6c8da737d --- /dev/null +++ b/roles/ensure-podman/tasks/main.yaml @@ -0,0 +1,8 @@ +- name: Find distribution installation + include: "{{ item }}" + static: no + with_first_found: + - "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yaml" + - "{{ ansible_distribution }}.yaml" + - "{{ ansible_os_family }}.yaml" + - "default.yaml" diff --git a/roles/install-podman/README.rst b/roles/install-podman/README.rst index 0103e63db..fea21f24e 100644 --- a/roles/install-podman/README.rst +++ b/roles/install-podman/README.rst @@ -1,4 +1 @@ -Install podman container manager - -**Role Variables** - +.. warning:: Deprecated, use ensure-podman instead. diff --git a/roles/install-podman/tasks/main.yaml b/roles/install-podman/tasks/main.yaml index 6c8da737d..1a2ea1ade 100644 --- a/roles/install-podman/tasks/main.yaml +++ b/roles/install-podman/tasks/main.yaml @@ -1,8 +1,3 @@ -- name: Find distribution installation - include: "{{ item }}" - static: no - with_first_found: - - "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yaml" - - "{{ ansible_distribution }}.yaml" - - "{{ ansible_os_family }}.yaml" - - "default.yaml" +- name: Include ensure-podman + include_role: + name: ensure-podman diff --git a/test-playbooks/install-podman/main.yaml b/test-playbooks/ensure-podman/main.yaml similarity index 90% rename from test-playbooks/install-podman/main.yaml rename to test-playbooks/ensure-podman/main.yaml index cc2c8487c..7d2ff92e4 100644 --- a/test-playbooks/install-podman/main.yaml +++ b/test-playbooks/ensure-podman/main.yaml @@ -1,6 +1,6 @@ - hosts: all roles: - - install-podman + - ensure-podman - hosts: all tasks: diff --git a/zuul-tests.d/container-roles-jobs.yaml b/zuul-tests.d/container-roles-jobs.yaml index 3ed4b8105..0371a26cf 100644 --- a/zuul-tests.d/container-roles-jobs.yaml +++ b/zuul-tests.d/container-roles-jobs.yaml @@ -102,7 +102,7 @@ files: - roles/pull-from-intermediate-registry/.* - roles/push-to-intermediate-registry/.* - - roles/install-podman/.* + - roles/ensure-podman/.* - roles/build-container-image/.* - roles/run-buildset-registry/.* - roles/use-buildset-registry/.* @@ -256,17 +256,17 @@ post-run: test-playbooks/ensure-kubernetes/post.yaml - job: - name: zuul-jobs-test-install-podman + name: zuul-jobs-test-ensure-podman description: | - Test the install-podman role + Test the ensure-podman role - This job tests the install-podman role. It is not meant to be + This job tests the ensure-podman role. It is not meant to be used directly but rather run on changes to roles in the zuul-jobs repo. files: - - roles/install-podman/.* - - test-playbooks/install-podman/.* - run: test-playbooks/install-podman/main.yaml + - roles/ensure-podman/.* + - test-playbooks/ensure-podman/.* + run: test-playbooks/ensure-podman/main.yaml # -* AUTOGENERATED *- # The following project section is autogenerated by @@ -290,6 +290,6 @@ - zuul-jobs-test-registry-buildset-registry-openshift-docker - zuul-jobs-test-ensure-kubernetes-docker - zuul-jobs-test-ensure-kubernetes-crio - - zuul-jobs-test-install-podman + - zuul-jobs-test-ensure-podman gate: jobs: *id001