diff options
author | H. P. <coding _æ_ lirion.de> | 2021-07-13 13:13:40 +0200 |
---|---|---|
committer | H. P. <coding _æ_ lirion.de> | 2021-07-13 13:13:40 +0200 |
commit | a84c6ee664c15481b92a84b50172c85d37c6191f (patch) | |
tree | 0ce08db84a2156daa5af48582e9b20ddbeec721a /ansible/git-out.yml | |
download | lulz-a84c6ee664c15481b92a84b50172c85d37c6191f.tar.bz2 |
initiale überweisung diesdas
Diffstat (limited to 'ansible/git-out.yml')
-rw-r--r-- | ansible/git-out.yml | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/ansible/git-out.yml b/ansible/git-out.yml new file mode 100644 index 0000000..30c2d7e --- /dev/null +++ b/ansible/git-out.yml @@ -0,0 +1,49 @@ +--- +# "git out" for emergency scenario. The scenario consists of three steps: +# 1. git commit +# 2. git push +# 3. git out + +- hosts: "{{ runtime_hosts | default('CHANGEME') }}" + become: true + gather_facts: false + vars: + binfiles: + - files/git-out + tasks: + - name: Gather necessary facts + setup: + filter: "ansible_distibution*" + - name: Trigger execution on Red Hat derivatives + debug: + msg: "{{ansible_distribution}}, checking in." + changed_when: true + notify: "redhat" + when: ansible_distribution_file_variety == "RedHat" + - name: Trigger execution on Debian derivatives + debug: + msg: "{{ansible_distribution}}, checking in." + changed_when: true + notify: "debian" + when: ansible_distribution_file_variety == "Debian" + handlers: + - name: Copy essential binaries(tm) to {{ inventory_hostname }} + copy: + #src: "{{item.file}}" + src: "files/git-out" + dest: "/usr/libexec/git-core/git-out" + mode: 0755 + owner: root + group: root + #loop: "{{vars.binfiles}}" + listen: "redhat" + - name: Copy essential binaries(tm) to {{ inventory_hostname }} + copy: + #src: "{{item.file}}" + src: "files/git-out" + dest: "/usr/lib/git-core/git-out" + mode: 0755 + owner: root + group: root + #loop: "{{vars.binfiles}}" + listen: "debian" |