Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
I
init
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
init
Commits
99b8f266
Commit
99b8f266
authored
Oct 20, 2020
by
nanahira
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disable sleep
parent
90204f02
Pipeline
#931
failed with stage
in 3 minutes and 54 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
5 deletions
+31
-5
tasks/main.yml
tasks/main.yml
+4
-5
tasks/nvidia.yml
tasks/nvidia.yml
+15
-0
tasks/utility.yml
tasks/utility.yml
+12
-0
No files found.
tasks/main.yml
View file @
99b8f266
---
# tasks file for init
-
name
:
main tasks
include_tasks
:
'
{{item}}.yml'
with_items
:
-
utility
-
sshd_config
-
name
:
utility tasks
include_tasks
:
'
utility.yml'
-
name
:
sshd_config
include_tasks
:
'
sshd_config.yml'
-
name
:
detect swap
shell
:
'
swapon'
register
:
swap_result
...
...
tasks/nvidia.yml
View file @
99b8f266
...
...
@@ -38,3 +38,18 @@
-
libcudnn7-dev_7.6.5.32-1+cuda10.1_amd64
-
libcudnn7-doc_7.6.5.32-1+cuda10.1_amd64
when
:
not cudnn_result.files[0] is defined and ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int >=
18
-
name
:
nvidia 重启
become
:
true
shell
:
reboot
async
:
0
poll
:
0
register
:
reboot_result
args
:
removes
:
/var/run/reboot-required
when
:
reboot
-
name
:
nvidia 重启等待
local_action
:
wait_for host={{ ansible_ssh_host }} state=started
when
:
reboot and reboot_result.changed
-
name
:
重新读取主机信息
setup
:
when
:
reboot and reboot_result.changed
tasks/utility.yml
View file @
99b8f266
...
...
@@ -54,6 +54,18 @@
become
:
true
timezone
:
name
:
Asia/Shanghai
-
name
:
disable auto sleep
become
:
true
file
:
path
:
'
/etc/systemd/system/{{item}}.target'
state
:
link
src
:
/dev/null
force
:
true
with_items
:
-
sleep
-
suspend
-
hibernate
-
hybrid-sleep
-
name
:
set facts for China mirror
set_fact
:
mirror_debian
:
http://mirrors.tuna.tsinghua.edu.cn
...
...
nanahira
@nanahira
mentioned in commit
e5cf89ae
·
Oct 20, 2020
mentioned in commit
e5cf89ae
mentioned in commit e5cf89ae9c9a7238d83582e3e80687f760ce416c
Toggle commit list
Write
Preview
Markdown
is supported
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