Commit 65359a3c authored by Matthew Smith's avatar Matthew Smith
Browse files

Add http update method

parent 3fa0c115
......@@ -3,6 +3,7 @@
# Usage
Git by ssh
```
icinga2_plugins_repos:
- key_name: my_icinga_plugins
......@@ -15,3 +16,14 @@ icinga2_plugins_repos:
- bar
```
Git by http/https
```
icinga2_plugins_repos:
- git_repo: https://<user>:<token>@gitlab.example.net/my/icinga-plugins.git
git_destination: /usr/lib/nagios/plugins/my
proto: http
prequsite_packages: []
```
......@@ -6,6 +6,7 @@ icinga2_plugins_repos: []
# key_destination: /root/.ssh
# git_repo: ssh://git@gitlab.example.net/MY/icinga-plugins.git
# git_destination: /usr/lib/nagios/plugins/my
# proto: ssh
# prequsite_packages:
# - foo
# - bar
......
......@@ -36,6 +36,7 @@
dest: "{{ item.key_destination }}/{{ item.key_name }}"
mode: 0600
loop: "{{ icinga2_plugins_repos }}"
when: item.proto == "ssh"
tags:
- repo
......@@ -45,17 +46,30 @@
dest: "{{ item.key_destination }}/{{ item.key_name }}.pub"
mode: 0600
loop: "{{ icinga2_plugins_repos }}"
when: item.proto == "ssh"
tags:
- repo
- name: update sol1 git repo
- name: update sol1 git repo (ssh)
git:
repo: "{{ item.git_repo}}"
repo: "{{ item.git_repo }}"
dest: "{{ item.git_destination }}/"
accept_hostkey: yes
key_file: "{{ item.key_destination }}/{{ item.key_name }}"
force: no
loop: "{{ icinga2_plugins_repos }}"
when: item.proto == "ssh"
tags:
- update
- repo
- name: update sol1 git repo (http)
git:
repo: "{{ item.git_repo }}"
dest: "{{ item.git_destination }}/"
force: no
loop: "{{ icinga2_plugins_repos }}"
when: item.proto == "http"
tags:
- update
- repo
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment