From d0851b0b4ac46db48eab48a963a6c233b59de52e Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Mon, 13 Nov 2017 17:32:49 -0500 Subject: [PATCH] Add role to build Puppet module This patch adds an Ansible role which can be used to build Puppet modules. Change-Id: I45761c2d111640733ddec8b4c08066655b6944e2 --- roles/build-puppet-module/README.rst | 9 +++++++++ roles/build-puppet-module/defaults/main.yaml | 1 + roles/build-puppet-module/tasks/main.yaml | 4 ++++ 3 files changed, 14 insertions(+) create mode 100644 roles/build-puppet-module/README.rst create mode 100644 roles/build-puppet-module/defaults/main.yaml create mode 100644 roles/build-puppet-module/tasks/main.yaml diff --git a/roles/build-puppet-module/README.rst b/roles/build-puppet-module/README.rst new file mode 100644 index 000000000..edf50c5e4 --- /dev/null +++ b/roles/build-puppet-module/README.rst @@ -0,0 +1,9 @@ +An ansible role to build a Puppet module. This role assumes that Puppet is +already installed on the target system (either manually or using bindep). + +**Role Variables** + +.. zuul:rolevar:: puppet_module_chdir + :default: {{ zuul.project.src_dir }} + + The folder to switch into in order to build the Puppet module diff --git a/roles/build-puppet-module/defaults/main.yaml b/roles/build-puppet-module/defaults/main.yaml new file mode 100644 index 000000000..c71e5e299 --- /dev/null +++ b/roles/build-puppet-module/defaults/main.yaml @@ -0,0 +1 @@ +puppet_module_chdir: "{{ zuul.project.src_dir }}" diff --git a/roles/build-puppet-module/tasks/main.yaml b/roles/build-puppet-module/tasks/main.yaml new file mode 100644 index 000000000..a8188696c --- /dev/null +++ b/roles/build-puppet-module/tasks/main.yaml @@ -0,0 +1,4 @@ +- name: Build puppet module + command: puppet module build . + args: + chdir: "{{ puppet_module_chdir }}"