Allow choosing Github branch dynamically.

This commit is contained in:
Hyperling 2021-07-13 08:10:14 -05:00
parent bb4fabf833
commit 246e83a13a
3 changed files with 14 additions and 4 deletions

View File

@ -67,3 +67,9 @@
lynis_report_scp: "{{ leet_ssh }}:{{ report_scp_location }}/lynis/{{ lynis_report_name }}" lynis_report_scp: "{{ leet_ssh }}:{{ report_scp_location }}/lynis/{{ lynis_report_name }}"
nmap_report_scp: "{{ leet_ssh }}:{{ report_scp_location }}/nmap/{{ nmap_report_name }}" nmap_report_scp: "{{ leet_ssh }}:{{ report_scp_location }}/nmap/{{ nmap_report_name }}"
when: not leet_drive_details.stat.exists when: not leet_drive_details.stat.exists
- name: General | Facts | System | Ansible Branch
set_fact:
branch: main
when: branch is not defined

8
hosts
View File

@ -1,3 +1,7 @@
;;;;;;; Available options - all require lowercase values ;;;;;;
; branch : Provide the Github branch that the machine should poll.
; Exampel: main, dev
;
[everything] [everything]
localhost localhost
@ -83,5 +87,5 @@ reverse-proxy certbot=true
nextcloud certbot=true nextcloud certbot=true
wordpress certbot=true wordpress certbot=true
usb-server usb-server
parrotsec-dev-www domain=hyperling.com hugo=true hugo_site_path=/mnt/leet/Code/parrotsec/website parrotsec-dev-www branch=dev domain=hyperling.com hugo=true hugo_site_path=/mnt/leet/Code/parrotsec/website
my-parrotsec-dev-www hugo=true domain=hyperling.com hugo_site_path=/mnt/leet/Code/parrotsec/website-hyperling my-parrotsec-dev-www branch=dev hugo=true domain=hyperling.com hugo_site_path=/mnt/leet/Code/parrotsec/website-hyperling

View File

@ -6,7 +6,7 @@
user: ansible user: ansible
name: "Ansible Sync" name: "Ansible Sync"
minute: "*/15" minute: "*/15"
job: "sudo {{ ansible_pull_exec.stdout }} -o -U https://github.com/Hyperling/ansible.git --checkout main" job: "sudo {{ ansible_pull_exec.stdout }} -o -U https://github.com/Hyperling/ansible.git --checkout {{ branch }}"
state: present state: present
disabled: no disabled: no