首页 > TAG信息列表 > Asible

Asible 批量跑出服务器的特权用户

1、定义剧本(我这里只输出序列号) [root@libin3]# cat libin.yml - hosts: task gather_facts: no tasks: - name: fetch shell: | awk -F ":" '{ print $1,$7 }' /etc/passwd | grep -v "/sbin/nologin" | grep -v "root"

Asible 批量跑出服务器相关信息

1、定义剧本(我这里只输出序列号) [root@libin3]# cat libin.yml - hosts: task gather_facts: no tasks: - name: fetch shell: | dmidecode -t 1 | grep "Serial Number" | awk -F ":" '{print $2}' register: serial -