From 1d1c88a89e3fdb5badf3b9c432496dfaaf5e97cd Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 20 Feb 2018 19:56:11 +0100 Subject: [PATCH] Refactor playbooks/nodepool-zuul-functional/pre.yaml Instead of using tasks and roles together, create a new role and use it. This makes ordering easier to understand. This is followup for https://review.openstack.org/#/c/545158/14/playbooks/nodepool-zuul-functional/pre.yaml Change-Id: I5242e9333dd8761272731d1e5e8af2fd5ca5ee8f --- playbooks/nodepool-zuul-functional/pre.yaml | 10 +--------- roles/nodepool-zuul-functional/README.rst | 1 + roles/nodepool-zuul-functional/tasks/main.yaml | 6 ++++++ 3 files changed, 8 insertions(+), 9 deletions(-) create mode 100644 roles/nodepool-zuul-functional/README.rst create mode 100644 roles/nodepool-zuul-functional/tasks/main.yaml diff --git a/playbooks/nodepool-zuul-functional/pre.yaml b/playbooks/nodepool-zuul-functional/pre.yaml index 4d68a3c5c..8b7a7faf6 100644 --- a/playbooks/nodepool-zuul-functional/pre.yaml +++ b/playbooks/nodepool-zuul-functional/pre.yaml @@ -4,12 +4,4 @@ - role: bindep bindep_profile: default bindep_dir: "{{ zuul.projects['git.openstack.org/openstack-infra/zuul'].src_dir }}" - - tasks: - - - name: Install packages and run zuul-nodepool-integration/start.sh - shell: - cmd: | - sudo pip3 install . - ./tools/zuul-nodepool-integration/start.sh - chdir: "{{ zuul.projects['git.openstack.org/openstack-infra/nodepool'].src_dir }}" + - nodepool-zuul-functional diff --git a/roles/nodepool-zuul-functional/README.rst b/roles/nodepool-zuul-functional/README.rst new file mode 100644 index 000000000..63e49058f --- /dev/null +++ b/roles/nodepool-zuul-functional/README.rst @@ -0,0 +1 @@ +Prepare nodepool installation. diff --git a/roles/nodepool-zuul-functional/tasks/main.yaml b/roles/nodepool-zuul-functional/tasks/main.yaml new file mode 100644 index 000000000..f87f9205f --- /dev/null +++ b/roles/nodepool-zuul-functional/tasks/main.yaml @@ -0,0 +1,6 @@ +- name: Install packages and run zuul-nodepool-integration/start.sh + shell: + cmd: | + sudo pip3 install . + ./tools/zuul-nodepool-integration/start.sh + chdir: "{{ zuul.projects['git.openstack.org/openstack-infra/nodepool'].src_dir }}"