现在我们的apache域名也配置好了,但是,网站文件并没有拷贝过去(就是html,css,图片等),当然,你得先把文件都搞到跑ansible的这台机器,怎么搞上去我们就不写了…
增加新文件在task文件夹下:
apache_copy_sourcecode.yml
内容如下:
1 2 3 4 5 6 |
--- - name: copy the code to server copy: src=/home/zhiming/files/ dest=/home/zhiming/files/ |
这个就会将我们files下的所有文件拷贝过去
在task下的main文件中增加引入:
1 |
- include: apache_copy_sourcecode.yml |
然后开跑….
ansible-playbook main.yml
Latest posts by Zhiming Zhang (see all)
- aws eks node 自动化扩展工具 Karpenter - 8月 10, 2022
- ReplicationController and ReplicaSet in Kubernetes - 12月 20, 2021
- public key fingerprint - 5月 27, 2021