Commit e5cf89ae authored by nanahira's avatar nanahira

Revert "disable sleep"

This reverts commit 99b8f266.
parent 99b8f266
Pipeline #932 failed with stage
in 3 minutes and 47 seconds
---
# tasks file for init
- name: utility tasks
include_tasks: 'utility.yml'
- name: sshd_config
include_tasks: 'sshd_config.yml'
- name: main tasks
include_tasks: '{{item}}.yml'
with_items:
- utility
- sshd_config
- name: detect swap
shell: 'swapon'
register: swap_result
......
......@@ -38,18 +38,3 @@
- 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
......@@ -54,18 +54,6 @@
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
......
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