2021-02-11 20:04:27 -06:00
|
|
|
---
|
|
|
|
# Create file to easily push git changes and call SCM.
|
|
|
|
|
2021-02-11 20:16:23 -06:00
|
|
|
- name: General | Scripts | Root | scm.sh
|
2021-02-11 20:04:27 -06:00
|
|
|
blockinfile:
|
2021-02-12 07:50:38 -06:00
|
|
|
path: "{{ user_root.home }}/bin/scm.sh"
|
2021-02-11 20:04:27 -06:00
|
|
|
block: |
|
|
|
|
# 20210211 - Make life easier!
|
2021-02-15 20:46:46 -06:00
|
|
|
push.sh
|
2021-02-12 06:02:28 -06:00
|
|
|
time curl https://scm.hyperling.com | bash
|
2021-02-11 20:52:33 -06:00
|
|
|
marker: '{mark}'
|
2021-02-12 06:01:43 -06:00
|
|
|
marker_begin: "#!{{ bash_exec.stdout }}"
|
2021-02-11 20:52:33 -06:00
|
|
|
marker_end: "exit 0"
|
2021-02-11 20:04:27 -06:00
|
|
|
state: present
|
|
|
|
create: yes
|
2021-02-11 20:16:23 -06:00
|
|
|
|
|
|
|
- name: General | Scripts | Root | scm.sh Permissions
|
|
|
|
file:
|
2021-02-12 07:50:38 -06:00
|
|
|
path: "{{ user_root.home }}/bin/scm.sh"
|
2021-02-15 20:46:46 -06:00
|
|
|
mode: '0755'
|
|
|
|
|
|
|
|
|
|
|
|
- name: General | Scripts | Root | push.sh
|
|
|
|
blockinfile:
|
|
|
|
path: "{{ user_root.home }}/bin/push.sh"
|
|
|
|
block: |
|
|
|
|
# 20210215 - Make life even easier!
|
|
|
|
ssh ling@leet "cd Code/Ansible/ansible-pull; git push"
|
|
|
|
marker: '{mark}'
|
|
|
|
marker_begin: "#!{{ bash_exec.stdout }}"
|
|
|
|
marker_end: "exit 0"
|
|
|
|
state: present
|
|
|
|
create: yes
|
|
|
|
|
|
|
|
- name: General | Scripts | Root | push.sh Permissions
|
|
|
|
file:
|
|
|
|
path: "{{ user_root.home }}/bin/push.sh"
|
2021-07-13 06:47:31 -05:00
|
|
|
mode: '0755'
|
|
|
|
|
|
|
|
|
|
|
|
- name: General | Scripts | Root | scm-dev.sh
|
|
|
|
blockinfile:
|
|
|
|
path: "{{ user_root.home }}/bin/scm-dev.sh"
|
|
|
|
block: |
|
|
|
|
# 20210713 - Make life easier for development!
|
2021-07-19 17:56:04 -05:00
|
|
|
|
|
|
|
## Variables ##
|
|
|
|
|
|
|
|
# Use a specific branch if it was asked for.
|
|
|
|
branch="dev"
|
|
|
|
if [[ $1 != "" ]]; then
|
|
|
|
branch="$1"
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
## Main ##
|
|
|
|
|
2021-07-13 06:47:31 -05:00
|
|
|
push.sh
|
2021-07-19 17:56:04 -05:00
|
|
|
time {{ ansible_pull_exec.stdout }} -U https://github.com/Hyperling/ansible.git --checkout $branch
|
|
|
|
|
2021-07-13 06:47:31 -05:00
|
|
|
marker: '{mark}'
|
|
|
|
marker_begin: "#!{{ bash_exec.stdout }}"
|
|
|
|
marker_end: "exit 0"
|
|
|
|
state: present
|
|
|
|
create: yes
|
|
|
|
|
|
|
|
- name: General | Scripts | Root | scm-dev.sh Permissions
|
|
|
|
file:
|
|
|
|
path: "{{ user_root.home }}/bin/scm-dev.sh"
|
|
|
|
mode: '0755'
|