Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
刘航
/
watchmen
Go to a project
Project
Repository
Issues
2
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit c64b4006
authored
Oct 25, 2018
by
see.liuh@gmail.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
增加playbook:root_changepass_ssh.yml
1 parent
42320fcb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletions
ansible_playbooks/README.md
ansible_playbooks/root_changepass_ssh.yml
ansible_playbooks/README.md
View file @
c64b400
...
@@ -4,4 +4,8 @@
...
@@ -4,4 +4,8 @@
## license_deploy_tx1
## license_deploy_tx1
文件夹内有单独的说明文件README.md
\ No newline at end of file
\ No newline at end of file
文件夹内有单独的说明文件README.md
## root_changepass_ssh.yml
批量修改root账户密码为vion,并开启用root账户登陆ssh
\ No newline at end of file
\ No newline at end of file
ansible_playbooks/root_changepass_ssh.yml
0 → 100644
View file @
c64b400
# cat change_user_pass.yml
---
-
hosts
:
starnet
sudo
:
yes
gather_facts
:
false
tasks
:
-
name
:
change user passwd
user
:
name={{ item.name }} password={{ item.chpass | password_hash('sha512') }} update_password=always
with_items
:
-
{
name
:
'
root'
,
chpass
:
'
vion'
}
-
name
:
change ssh config
command
:
sed -i 's/^PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config
-
name
:
service restart
command
:
service ssh restart
Write
Preview
Markdown
is supported
Attach a file
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 post a comment