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
c790dc1f
Commit
c790dc1f
authored
Sep 25, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve reboot param
parent
ea5e2ea3
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
20 deletions
+27
-20
tasks/apt-clean.yml
tasks/apt-clean.yml
+8
-0
tasks/apt.yml
tasks/apt.yml
+2
-0
tasks/kernel/xanmod.yml
tasks/kernel/xanmod.yml
+5
-0
tasks/sshd_config.yml
tasks/sshd_config.yml
+1
-1
tasks/upgrade.yml
tasks/upgrade.yml
+8
-11
tasks/utility.yml
tasks/utility.yml
+2
-8
vars/main.yml
vars/main.yml
+1
-0
No files found.
tasks/apt-clean.yml
0 → 100644
View file @
c790dc1f
-
name
:
clean some Debian packages
become
:
true
apt
:
name
:
ufw,iptables-persistent,needrestart,docker,docker-engine,docker.io,docker-io,docker-ee
state
:
absent
autoremove
:
yes
purge
:
yes
when
:
ansible_os_family == 'Debian'
tasks/apt.yml
View file @
c790dc1f
-
name
:
clean packages again
include_tasks
:
apt-clean.yml
-
name
:
install aptitude first
-
name
:
install aptitude first
become
:
true
become
:
true
apt
:
apt
:
...
...
tasks/kernel/xanmod.yml
View file @
c790dc1f
...
@@ -17,6 +17,11 @@
...
@@ -17,6 +17,11 @@
name
:
linux-xanmod
name
:
linux-xanmod
state
:
latest
state
:
latest
update_cache
:
true
update_cache
:
true
register
:
xanmod_result
-
name
:
register reboot
set_fact
:
manual_reboot
:
true
when
:
xanmod_result.changed
-
name
:
install intel microcode
-
name
:
install intel microcode
become
:
true
become
:
true
apt
:
apt
:
...
...
tasks/sshd_config.yml
View file @
c790dc1f
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
regexp
:
'
^#?PasswordAuthentication
(true|yes).*$'
regexp
:
'
^#?PasswordAuthentication
(true|yes).*$'
line
:
'
PasswordAuthentication
no'
line
:
'
PasswordAuthentication
no'
backrefs
:
true
backrefs
:
true
when
:
"
(ansible_user_id
==
'root'
or
ansible_user_id
==
'nanahira'
or
ansible_user_id
==
'mycard'
or
ansible_user_id
==
'zh99998')
and
not
allow_password"
# Only self-managed servers
when
:
"
not
allow_password"
notify
:
restart_sshd
notify
:
restart_sshd
-
name
:
permit root login
-
name
:
permit root login
lineinfile
:
lineinfile
:
...
...
tasks/upgrade.yml
View file @
c790dc1f
...
@@ -38,18 +38,15 @@
...
@@ -38,18 +38,15 @@
-
name
:
redhat configures before reboot
-
name
:
redhat configures before reboot
include_tasks
:
redhat_configures.yml
include_tasks
:
redhat_configures.yml
when
:
ansible_os_family == 'RedHat'
when
:
ansible_os_family == 'RedHat'
-
name
:
系统源 重启
-
name
:
check reboot needed
stat
:
path
:
/var/run/reboot-required
register
:
reboot_required_result
-
name
:
reboot
become
:
true
become
:
true
shell
:
reboot
reboot
:
async
:
0
reboot_timeout
:
600
poll
:
0
when
:
reboot and (reboot_required_result.stat.exists or manual_reboot)
register
:
reboot_result
args
:
removes
:
/var/run/reboot-required
when
:
reboot
-
name
:
系统源 重启等待
local_action
:
wait_for host={{ ansible_ssh_host }} state=started
when
:
reboot and reboot_result.changed
-
name
:
重新读取主机信息
-
name
:
重新读取主机信息
setup
:
setup
:
when
:
reboot and reboot_result.changed
when
:
reboot and reboot_result.changed
tasks/utility.yml
View file @
c790dc1f
...
@@ -102,14 +102,8 @@
...
@@ -102,14 +102,8 @@
-
name
:
nvidia source
-
name
:
nvidia source
include_tasks
:
nvidia-source.yml
include_tasks
:
nvidia-source.yml
when
:
nvidia_driver_version and ansible_os_family == 'Debian'
when
:
nvidia_driver_version and ansible_os_family == 'Debian'
-
name
:
clean some Debian packages
-
name
:
clean packages
become
:
true
include_tasks
:
apt-clean.yml
apt
:
name
:
ufw,iptables-persistent,needrestart,docker,docker-engine,docker.io,docker-io,docker-ee
state
:
absent
autoremove
:
yes
purge
:
yes
when
:
ansible_os_family == 'Debian'
-
name
:
Debian laptop disable lid
-
name
:
Debian laptop disable lid
become
:
true
become
:
true
blockinfile
:
blockinfile
:
...
...
vars/main.yml
View file @
c790dc1f
---
---
# vars file for init
# vars file for init
manual_reboot
:
false
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