Ansible随记:修订间差异

来自三线的随记
(创建页面,内容为“For linux <br /> === hosts === [k8s] k8s-node-1 ansible_ssh_host=172.16.139.102 k8s-node-2 ansible_ssh_host=172.16.139.103 k8s-node-3 ansible_ssh_host=172.16.1…”)
 
无编辑摘要
第3行: 第3行:
<br />
<br />


=== hosts ===
===hosts===
  [k8s]
  [k8s]
  k8s-node-1 ansible_ssh_host=172.16.139.102
  k8s-node-1 ansible_ssh_host=172.16.139.102
第14行: 第14行:
<br />
<br />


=== module ===
===module===


==== selinux ====
====selinux====
ansible k8s -m selinux -m selinux -a state=disabled
ansible k8s -m selinux -m selinux -a state=disabled


第22行: 第22行:
<br />
<br />


==== shell ====
====shell====
ansible k8s -m shell -a getenforce
ansible k8s -m shell -a getenforce


第28行: 第28行:
<br />
<br />


==== ping ====
====ping====
(用于判断远程客户端是否在线)
(用于判断远程客户端是否在线)


第34行: 第34行:
<br />
<br />


==== command ====
====command====
(ansible default module)
(ansible default module)




 
==== others ====
<br />
ansible k8s -m shell -a "rpm --import file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7"<br />
[[分类:Linux]]
[[分类:Linux]]

2020年3月29日 (日) 16:05的版本

For linux


hosts

[k8s]
k8s-node-1 ansible_ssh_host=172.16.139.102
k8s-node-2 ansible_ssh_host=172.16.139.103
k8s-node-3 ansible_ssh_host=172.16.139.104

[test]
192.168.1.250 ansible_ssh_port=1234
192.168.1.251 ansible_ssh_user=xxx ansible_ssh_pass=yyy


module

selinux

ansible k8s -m selinux -m selinux -a state=disabled

https://my.oschina.net/ozakilsc/blog/693023

shell

ansible k8s -m shell -a getenforce

ansible k8s -m shell -a hostname

ping

(用于判断远程客户端是否在线)

ansible k8s -m ping

command

(ansible default module)


others

ansible k8s -m shell -a "rpm --import file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7"