-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
4 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,8 +39,6 @@ ssh-copy-id -i /root/.ssh/id_rsa.pub [email protected] | |
ansible all -m ping | ||
ansible webservers -m ping | ||
|
||
##重启webservers组所有SSH服务. | ||
ansible webservers -m service -a "name=sshd state=restarted" | ||
|
||
##command: 执行远程主机SHELL命令: | ||
ansible webservers -m command -a "free -m" | ||
|
@@ -88,6 +86,8 @@ ansible all -m cron -a 'name="custom job" minute=*/3 hour=* day=* month=* weekda | |
ansible webservers -m service -a "name=crond state=stopped" | ||
ansible webservers -m service -a "name=crond state=restarted" | ||
ansible webservers -m service -a "name=crond state=reloaded" | ||
##重启webservers组所有SSH服务. | ||
ansible webservers -m service -a "name=sshd state=restarted" | ||
|
||
##user服务模块 | ||
##远程主机系统用户管理 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters