Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sol1 Ansible Roles
sol1-icinga2_plugins
Commits
65359a3c
Commit
65359a3c
authored
Sep 09, 2020
by
Matthew Smith
Browse files
Add http update method
parent
3fa0c115
Changes
3
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
65359a3c
...
...
@@ -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: []
```
defaults/main.yml
View file @
65359a3c
...
...
@@ -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
...
...
tasks/main.yml
View file @
65359a3c
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment