Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kubespray
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Kubespray
Commits
1938c962
Commit
1938c962
authored
8 years ago
by
Smaine Kahlouch
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #420 from bogdando/collect_info
Adjust collect-info playbook
parents
5dc8f522
47b42426
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
roles/kubernetes/preinstall/tasks/main.yml
+6
-0
6 additions, 0 deletions
roles/kubernetes/preinstall/tasks/main.yml
scripts/collect-info.yaml
+9
-10
9 additions, 10 deletions
scripts/collect-info.yaml
with
15 additions
and
10 deletions
roles/kubernetes/preinstall/tasks/main.yml
+
6
−
0
View file @
1938c962
---
-
name
:
'
GIT
|
Install
script
for
collecting
git
info'
template
:
src
:
"
{{
role_path
}}/gen-gitinfos.sh"
dest
:
"
{{
bin_dir
}}/gen-gitinfos.sh"
mode
:
a+rwx
-
include
:
gitinfos.yml
when
:
run_gitinfos
...
...
This diff is collapsed.
Click to expand it.
scripts/collect-info.yaml
+
9
−
10
View file @
1938c962
...
...
@@ -7,11 +7,9 @@
debug
:
false
commands
:
-
name
:
git_info
cmd
:
cat {kargo,.}/.git/logs/HEAD
cmd
:
find . -type d -name .git -execdir sh -c 'gen-gitinfos.sh global|head -12' \;
-
name
:
timedate_info
cmd
:
timedatectl status
-
name
:
boots_info
cmd
:
journalctl --list-boots --utc --no-pager
-
name
:
space_info
cmd
:
df -h
-
name
:
kernel_info
...
...
@@ -28,10 +26,10 @@
cmd
:
ps auxf | grep -v ]$
-
name
:
systemctl_info
cmd
:
systemctl status
-
name
:
systemctl_failed_info
cmd
:
systemctl --state=failed --no-pager
-
name
:
k8s_info
cmd
:
kubectl get all --all-namespaces -o wide
-
name
:
k8s_dump_info
cmd
:
kubectl get all --all-namespaces -o yaml
-
name
:
errors_info
cmd
:
journalctl -p err --utc --no-pager
...
...
@@ -43,10 +41,6 @@
-
/var/log/kern.log
-
inventory/inventory.ini
-
cluster.yml
-
kargo/kargo_default_ubuntu.yaml
-
kargo/kargo_default_debian.yaml
-
kargo/kargo_default_common.yaml
-
kargo/inventory/inventory.cfg
tasks
:
-
name
:
Storing commands output
...
...
@@ -68,4 +62,9 @@
with_items
:
"
{{logs}}"
-
name
:
Pack results and logs
local_action
:
shell GZIP=-9 tar cvzf logs.tar.gz -C /tmp collect-info
local_action
:
shell GZIP=-9 tar --remove-files -cvzf logs.tar.gz -C /tmp collect-info
run_once
:
true
-
name
:
Clean up collected command outputs
file
:
path={{ item.name }} state=absent
with_items
:
"
{{commands}}"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment