linux 系统运行的好多zi定义的服务需要开机自动启动,一般有以下思路:
ANSIBLE 文件和目录操作
ansible file 模块参考: refer to https://docs.ansible.com/ansible/latest/modules/file_module.html?highlight=file
ansible shell模块参数:https://docs.ansible.com/ansible/latest/modules/shell_module.html?highlight=shell
ansible 删除多个文件和目录:https://www.cnblogs.com/lihuanhuan/p/10612100.html
ANSIBLE 通过网络下载和上传文件
refer to get_url – Downloads files from HTTP, HTTPS, or FTP to node
https://docs.ansible.com/ansible/latest/modules/get_url_module.html?highlight=get_url
- 1.通过http下载文件,并且不验证证书
1
2
3
4
5- name: download files by https
get_url:
url: https://robin.org.cn/test.zip
dest: /appvol/ansible-test/
validate_certs: no
ANSIBLE快速安装(使用PIP)
1.使用python pip 安装
首先确保你的server安装了pip,并且可以正常使用,可以立即使用如下命令安装
pip install ansible==2.6.4
ansible –version
当前版本信息详见https://pypi.org/project/ansible/2.6.4/#history
所有版本信息详见https://pypi.org/project/ansible/
- 2.使用Linux yum 安装
不再赘诉
ddns of ipv6
如果你家的路由器已经get到了ipv6地址,并且你家的电脑也获取了有效的ipv6地址,在广域网的设备可以访问到。
那恭喜你,再配合我这个ddns,你可以完美地把你家的电脑当服务器使用。具体教程,稍后再补充。
ddns的python实现脚本在这里:
https://github.com/byygyy/ddns_ipv6
MySQL-python 安装
Ansible 删除多个文件或目录
翻译和转载该网页内容 http://www.mydailytutorials.com/ansible-delete-multiple-files-directories-ansible/
背景
ansible 有多种方式删除一个文件或目录,删除一个目录中的所有文件,使用正则表达式删除文件等等。最安全的方式是使用ansible内置的file模块。当然你也可以使用shell 模块去实现。但它不是幂等的,因此重新执行会抛出错误。
docker quick start
Atom入坑必备插件
Atom作为Javascript/CSS/HTML等前端编辑器利器,其强大功能依靠各种插件,以下是笔者在入坑阶段,精挑细选总结出的必不可少的插件,熟悉运用这些插件,一定成吨提高生产效率。安装这些插件只需要在Atom的File ->setting ->install中输入插件名称查到后即可安装: