ansible部署tomcat

copy不过去在6的机器上安装jdk.rpm
ansible webservers -m shell -a ‘rpm -ivh jdk-8u20-linux-x64.rpm’
ansible webservers -m shell -a ‘java -version’
ansible webservers -m file -a ‘path=/opt/tomcat state=directory’
ansible webservers -m unarchive -a ‘src=apache-tomcat-8.5.35.tar.gz dest=/opt/tomcat/’
ansible webservers -m shell -a ‘nohup /opt/tomcat/apache-tomcat-8.5.35/bin/startup.sh &’
ansible webservers -m shell -a ‘ss -lnt|grep 8080’
docker inspect web1 查看ip地址

发布了13 篇原创文章 · 获赞 17 · 访问量 850

猜你喜欢

转载自blog.csdn.net/dongxuej/article/details/103778754