From 4aeac7efea2d663a84352bf3e4776603676cea5e Mon Sep 17 00:00:00 2001 From: Paul Belanger Date: Sun, 22 Jan 2017 16:21:51 -0500 Subject: [PATCH] Add support to clone a refspec Expose the ability for a user to pass a refspec to our git task. Change-Id: I6554bfbcfbd3b7d72f3dbd89d3cc8aa3ee5725bd Signed-off-by: Paul Belanger --- defaults/main.yaml | 3 ++- tasks/install/git.yaml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/defaults/main.yaml b/defaults/main.yaml index 743e51d..4a45e8b 100644 --- a/defaults/main.yaml +++ b/defaults/main.yaml @@ -69,7 +69,8 @@ nodepool_file_launcher_logging_conf_src: etc/nodepool/launcher-logging.conf # tasks/install.yaml nodepool_git_dest: /opt/ansible-role-nodepool/git/openstack-infra/nodepool nodepool_git_uri: https://git.openstack.org/openstack-infra/nodepool -nodepool_git_version: master +# nodepool_git_refspec: +# nodepool_git_version: nodepool_install_method: git diff --git a/tasks/install/git.yaml b/tasks/install/git.yaml index a5af6bd..7295a1e 100644 --- a/tasks/install/git.yaml +++ b/tasks/install/git.yaml @@ -16,8 +16,9 @@ become: yes git: dest: "{{ nodepool_git_dest }}" + refspec: "{{ nodepool_git_refspec|default(omit) }}" repo: "{{ nodepool_git_uri }}" - version: "{{ nodepool_git_version }}" + version: "{{ nodepool_git_version|default(omit) }}" - name: Set nodepool_pip_name to local git repo. set_fact: