Hyperling
451e76559d
* Fedora Minimal does not come with tar. Need installed for Telegraf. * First attempt at automating HTTP git server setup. * Add cron jobs to keep projects up to date. * Add new git playbook to server. * Add new server variables for git. Put all variables in a dictionary. * Put variables into run file. * Fix the loop variables to be dictionaries, not jinja. * Upgrade nanominer. * Attempt to fix templating error. * Attempt to fix templating error, but in the right spot this time. :) * Attempt another fix for building list of dictionaries. * Change strings to dicts. * Add quotes for jinja variables. * Remove extra curly brackets. * Fix the rest of the file's dictionaries now that General works. * Remove testing code. * Variablize ansible repo. Begin watching personal repos rather than pinging GitHub. * Fix variables to append, not replace. * Fix variable names. * Try to prevent variables from being strings, without getting formatting error. * Try to fix variables, again. * Fixed git.yml. Found a way to test locally and all is working now.
71 lines
1.7 KiB
YAML
71 lines
1.7 KiB
YAML
---
|
|
# Create file to easily push git changes and call SCM.
|
|
|
|
- name: General | Scripts | Root | scm.sh
|
|
blockinfile:
|
|
path: "{{ user_root.home }}/bin/scm.sh"
|
|
block: |
|
|
# 20210211 - Make life easier!
|
|
push.sh
|
|
time curl https://scm.hyperling.com | bash
|
|
marker: '{mark}'
|
|
marker_begin: "#!{{ bash_exec.stdout }}"
|
|
marker_end: "exit 0"
|
|
state: present
|
|
create: yes
|
|
|
|
- name: General | Scripts | Root | scm.sh Permissions
|
|
file:
|
|
path: "{{ user_root.home }}/bin/scm.sh"
|
|
mode: '0755'
|
|
|
|
|
|
- name: General | Scripts | Root | push.sh
|
|
blockinfile:
|
|
path: "{{ user_root.home }}/bin/push.sh"
|
|
block: |
|
|
# 20210215 - Make life even easier!
|
|
ssh {{ user }}@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"
|
|
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!
|
|
|
|
## Variables ##
|
|
|
|
# Use a specific branch if it was asked for.
|
|
branch="dev"
|
|
if [[ $1 != "" ]]; then
|
|
branch="$1"
|
|
fi
|
|
|
|
|
|
## Main ##
|
|
|
|
push.sh
|
|
time {{ ansible_pull_exec.stdout }} -U {{ repo_github }} --checkout $branch
|
|
|
|
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'
|