Skip to content

Commit

Permalink
Allow use of foreman-installer PR
Browse files Browse the repository at this point in the history
  • Loading branch information
wbclark committed Sep 16, 2020
1 parent bb09a2c commit 8e50756
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions roles/foreman_installer/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ foreman_installer_module_prs_strategy: "merge"
# Comma-separated list of "organization/module/branch", e.g. "theforeman/foreman/foo,theforeman/katello/bar"
foreman_installer_module_branches: []

foreman_installer_from_source: False
installer_fork: theforeman
installer_branch: develop

# There are two options, so a user can supply their own, and a playbook can
# specify theirs. For example, foreman-proxy needs "--foreman-proxy-foreman-url"
# so we put it in internal_use_only in a role or playbook.
Expand Down
17 changes: 17 additions & 0 deletions roles/foreman_installer/tasks/installer_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
- name: "install git"
package:
name: 'git'
state: 'present'
tags:
- packages

- name: "fetch git PR"
shell: >
git init &&
git remote add {{ installer_fork }} https://github.com/{{ installer_fork }}/foreman-installer.git &&
git fetch &&
git branch {{ installer_branch }} origin/{{ installer_branch }} &&
git checkout -f {{ installer_branch }}
args:
chdir: "/usr/share/foreman-installer"
3 changes: 3 additions & 0 deletions roles/foreman_installer/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
- include_tasks: locales.yml
when: ansible_os_family == 'Debian'

- include_tasks: installer_pr.yml
when: foreman_installer_from_source == True

- include_tasks: module_prs.yml
when: (foreman_installer_module_prs|length > 0) or (foreman_installer_module_branches|length > 0)

Expand Down

0 comments on commit 8e50756

Please sign in to comment.