From 84c06a37c4e84461b78821bc17abb6cd870da531 Mon Sep 17 00:00:00 2001 From: vass Date: Wed, 1 Apr 2020 19:40:35 +0200 Subject: [PATCH] Rename install-devstack to ensure-devstack for consistency The old role will be kept and include ensure-devstack for backwards-compatability. Change-Id: Ia5fe33649a66a24ce6bb9de3cccbd5ef612dfb2f --- doc/source/cloud-roles.rst | 1 + roles/ensure-devstack/README.rst | 12 ++++++++++ roles/ensure-devstack/tasks/main.yaml | 20 ++++++++++++++++ .../templates/local.conf.j2 | 0 roles/install-devstack/tasks/main.yaml | 23 +++---------------- zuul-tests.d/cloud-roles-jobs.yaml | 10 ++++---- 6 files changed, 41 insertions(+), 25 deletions(-) create mode 100644 roles/ensure-devstack/README.rst create mode 100644 roles/ensure-devstack/tasks/main.yaml rename roles/{install-devstack => ensure-devstack}/templates/local.conf.j2 (100%) diff --git a/doc/source/cloud-roles.rst b/doc/source/cloud-roles.rst index da76e7554..108580b4c 100644 --- a/doc/source/cloud-roles.rst +++ b/doc/source/cloud-roles.rst @@ -1,4 +1,5 @@ Cloud Computing Roles ===================== +.. zuul:autorole:: ensure-devstack .. zuul:autorole:: install-devstack diff --git a/roles/ensure-devstack/README.rst b/roles/ensure-devstack/README.rst new file mode 100644 index 000000000..98a68b5be --- /dev/null +++ b/roles/ensure-devstack/README.rst @@ -0,0 +1,12 @@ +Install OpenStack using devstack. + +There are currently no configuration options available. This role +uses the devstack default settings, except that it does not install +horizon, tempest, cinder, or swift, and it supplies a restricted +network configuration designed to work in the maximum number of +environments. + +.. warning:: Do not use this role for testing changes to OpenStack or + OpenStack related projects. Use the ``devstack`` job + defined in the https://opendev.org/openstack/devstack + project instead. diff --git a/roles/ensure-devstack/tasks/main.yaml b/roles/ensure-devstack/tasks/main.yaml new file mode 100644 index 000000000..46a38102e --- /dev/null +++ b/roles/ensure-devstack/tasks/main.yaml @@ -0,0 +1,20 @@ +- name: Set ownership of /opt + become: true + file: + path: /opt + state: directory + owner: "{{ ansible_user }}" + group: "{{ ansible_user }}" +- name: Clone devstack + git: + repo: https://opendev.org/openstack/devstack + dest: /opt/devstack + version: master +- name: Write local.conf + template: + dest: /opt/devstack/local.conf + src: local.conf.j2 +- name: Run devstack + command: ./stack.sh + args: + chdir: /opt/devstack diff --git a/roles/install-devstack/templates/local.conf.j2 b/roles/ensure-devstack/templates/local.conf.j2 similarity index 100% rename from roles/install-devstack/templates/local.conf.j2 rename to roles/ensure-devstack/templates/local.conf.j2 diff --git a/roles/install-devstack/tasks/main.yaml b/roles/install-devstack/tasks/main.yaml index 46a38102e..9ddb2b903 100644 --- a/roles/install-devstack/tasks/main.yaml +++ b/roles/install-devstack/tasks/main.yaml @@ -1,20 +1,3 @@ -- name: Set ownership of /opt - become: true - file: - path: /opt - state: directory - owner: "{{ ansible_user }}" - group: "{{ ansible_user }}" -- name: Clone devstack - git: - repo: https://opendev.org/openstack/devstack - dest: /opt/devstack - version: master -- name: Write local.conf - template: - dest: /opt/devstack/local.conf - src: local.conf.j2 -- name: Run devstack - command: ./stack.sh - args: - chdir: /opt/devstack +- name: Include ensure-devstack + include_role: + name: ensure-devstack diff --git a/zuul-tests.d/cloud-roles-jobs.yaml b/zuul-tests.d/cloud-roles-jobs.yaml index 8668f3975..36d9addec 100644 --- a/zuul-tests.d/cloud-roles-jobs.yaml +++ b/zuul-tests.d/cloud-roles-jobs.yaml @@ -1,11 +1,11 @@ - job: - name: zuul-jobs-test-install-devstack - description: Test the install-devstack role + name: zuul-jobs-test-ensure-devstack + description: Test the ensure-devstack role files: - - roles/install-devstack/.* + - roles/ensure-devstack/.* run: test-playbooks/simple-role-test.yaml vars: - role_name: install-devstack + role_name: ensure-devstack # -* AUTOGENERATED *- # The following project section is autogenerated by @@ -15,6 +15,6 @@ - project: check: jobs: &id001 - - zuul-jobs-test-install-devstack + - zuul-jobs-test-ensure-devstack gate: jobs: *id001