
ansible
取壳羊
何处碧桃榭 满溪流水稥
展开
-
Playbook 安装nginx
nginx.yaml --- - hosts: webservers vars: hello: Ansible tasks: - name: Add repo yum_repository: name: nginx description: nginx repo baseurl: http://nginx....原创 2019-12-10 18:23:55 · 285 阅读 · 0 评论 -
Ansible常用模块 shell sudo copy file yum user git service setup
#https://docs.ansible.com/ansible/latest/user_guide/intro_adhoc.html #shell 执行shell命令 ansible webservers -m shell -a "ls /tmp" #sodo #user用户登录之后 sodo root 提权 #注意配置user 具有sudo权限vim /etc/s...原创 2019-12-10 14:08:43 · 688 阅读 · 0 评论 -
ansible SSH密码认证和密钥对认证
SSH密码 vim /etc/ansible/hosts [webservers] 192.168.10.251 ansible_ssh_user=root ansible_ssh_pass=123.com 192.168.10.252 ansible_ssh_user=root ansible_ssh_pass=123.com 192.168.10.253 ansible_ssh_user=r...原创 2019-12-10 12:51:15 · 621 阅读 · 0 评论 -
ansible 安装
服务端要求 Python 2.6+ RedHat Debian CentOS OSX 等 不支持Windows 被管理端要求 OpenSSH Python 2.6+ #安装 yum install -y ansible -y #pip install -y ansible #https://github.com/ansible...原创 2019-12-10 09:40:49 · 132 阅读 · 0 评论