摘要:
[root@ansible02:/root] > ip a 1: lo: mtu 65536 qdisc noqueue state UNKNOWN qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forev... 阅读全文
摘要:
[root@web01 ~]# nmcli device status DEVICE TYPE STATE CONNECTION eth0 ethernet connected eth0 lo loopback unmanaged -- [root@web01 ~]# nmcli connectio 阅读全文
摘要:
[root@web01 ~]# systemctl status sshd.service ● sshd.service - OpenSSH server daemon Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; ve 阅读全文
摘要:
ad hoc 临时的,在ansible里需要快速执行,并不用保存命令的执行方式 简单命令 playbook 复杂命令 阅读全文
摘要:
定义主机组用户和密码 [webservers] ansible[01:04] ansible_ssh_user='root' ansible_ssh_pass='AAbb0101' [root@ftp:/root] > ansible webserve... 阅读全文
摘要:
分组 列出主机清单 自定义指定新的主机清单文件: 阅读全文
摘要:
[root@ftp:/root] > ansible ansible01 -u root -k -m yum -a 'name=vsftpd state=latest' SSH password: ansible01 | CHANGED => { "ansible_facts": { "pkg_mgr": "yum" }, "changed": tru... 阅读全文
摘要:
[root@ftp:/root] > ansible ansible01 -u root -k -m shell -a 'hostname' SSH password: ansible01 | CHANGED | rc=0 >> ansible01 [root@ftp:/root] > ansible ansible01 -u root -k -m shell -a 'uptime... 阅读全文
摘要:
[root@ftp:/root] > ansible ansible01 -m ping ansible01 | UNREACHABLE! => { "changed": false, "msg": "Failed to connect to the host via ssh: Warning: Permanently added 'ansible01,192.168.31.1... 阅读全文
摘要:
[root@kvm-server ~]# systemctl status libvirtd.service ● libvirtd.service - Virtualization daemon Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled) Act... 阅读全文