1.ansible将文件复制到远程主机 ansible hostgroup -m copy -a "src=/data/ansible/roles/change_prod_marketing_conf/application-prod.properties dest=/data/home/services/xxx/conf/" 2.启动远程主机 ansible hostgroup -m shell -a "source /etc/profile && /data/home/services/xxx/bin/restart.sh"
ansible使用
原创
©著作权归作者所有:来自51CTO博客作者小白的希望的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
jenkins使用ansible去同时发布多个机器
jenkins使用ansible去同时发布多个机器
jar ci JAVA jenkins -
CentOS 7.6安装使用Ansible(五):Ansible Vault使用及Ansible优化
七、ansible-vault常用子命令:1、create:默认使用vim编辑器创建一个加密文件# ansible-vault create test备注:执行上述命令后,会提示输入密码,确认密码,然后默认调用vim编辑器,输入内容后,内容会被保存到test文件中,并且在退出编辑时自动将test文件加密,使用cat等命令查看其文件内容,显示的是密文2、encrypt:加密文件# ansible-v
ansible-vault ansible优化 开启pipelining模式 配置facts缓存 ansible加密yaml文件 -
使用ansible安装hadoop ansible hadoop
前置条件:环境准备请查看ansible环境准备 初学ansible-playbook,很多模块编写质量不高,后续逐渐完善。 本次搭建主要目的是为了通过hadoop的安装来学习锻炼ansible的yml编写能力,非
使用ansible安装hadoop 运维 hadoop xml 节点操作