-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsearch_plus_index.json
executable file
·1 lines (1 loc) · 7.41 KB
/
search_plus_index.json
1
{"./":{"url":"./","title":"Introduction","keywords":"","body":"XCQ DAILY LEARNING NOTES Xiechengqi 最新修订时间: 2019-12-11 17:14:26 console.log(\"plugin-popup....\");document.onclick = function(e){ e.target.tagName === \"IMG\" && window.open(e.target.src,e.target.src)}img{cursor:pointer}"},"Python/flask学习.html":{"url":"Python/flask学习.html","title":"Flask 学习","keywords":"","body":"Flask 学习 安装 依赖:Werkzeug 和 Jinja2 Werkzeug 是一个 WSGI(在 Web 应用和多种服务器之间的标准 Python 接口) 工具集 Jinja2 负责渲染模板 安装最新 Flask 库 $ git clone http://github.com/mitsuhiko/flask.git Initialized empty Git repository in ~/dev/flask/.git/ $ cd flask $ virtualenv venv --distribute New python executable in venv/bin/python Installing distribute............done. $ . venv/bin/activate $ python setup.py develop ... Finished processing dependencies for Flask # 这会拉取依赖并激活 git head 作为 virtualenv 中的当前版本。然后你只需要执行 git pull origin 来升级到最新版本 Xiechengqi 最新修订时间: 2019-12-19 19:03:44 console.log(\"plugin-popup....\");document.onclick = function(e){ e.target.tagName === \"IMG\" && window.open(e.target.src,e.target.src)}img{cursor:pointer}"},"Ansible/Ansible学习.html":{"url":"Ansible/Ansible学习.html","title":"Ansible 学习笔记","keywords":"","body":"Ansible 学习笔记 Tasks:任务,由模板定义的操作列表 Variables:变量 Templates:模板,即使用模板语法的文件 Handlers:处理器 ,当某条件满足时,触发执行的操作 Roles:角色 Playbooks contain plays Plays contain tasks Tasks call modules, tasks run sequentially Handlers are triggered by tasks Control node Any machine with Ansible installed Managed nodes The network devices (and/or servers) you manage with Ansible. Inventory 被管理主机 ( managed nodes ) 的清单,inventory 也被称做“hostfile” 默认路径: /etc/ansible/hosts 指定路径: ansible -i 或 ansible-play -i 设置 ansible.cfg 中 [default 下的 inventory 为指定路径 ansible 支持多个 inventory 文件。先创建一个 inventory/ 文件夹,然后将 ansible.cfg 中的 inventory 设置为文件夹的路径 ansible 还支持动态的 inventory。可以用自定义脚本从 CMDB 系统和 Zabbix 监控系统等拉取所有的主机信息,脚本可以使用任何语言编写,但是脚本使用参数有一定的规范并且对脚本执行的结果也有要求,应用时只需要把 ansible.cfg 文件中 inv=entory 的值改成一个执行脚本路径即可 inventory 内置参数 参数名 参数说明 ansible_ssh_host 定义主机的ssh地址 ansible_ssh_port 定义主机的ssh端口 ansible_ssh_user 定义主机的ssh认证用户 ansible_ssh_pass 定义主机的ssh认证密码 ansible_sudo 定义主机的sudo用户 ansible_sudo_pass 定义主机的sudo密码 ansible_sudo_exe 定义主机的sudo路径 ansible_connection 定义主机连接方式;与主机的连接类型.比如:local,ssh或者paramiko;Ansible 1.2以前默认使用paramiko。1.2以后的版本默认使用‘smart’,‘smart’方式会根据是否支持ControlPersist,来判断ssh方式是否可行 ansible_ssh_private_key_file 定义主机私钥文件 ansible_shell_type 定义主机shell类型 ansible_python_interpreter 定义主机python解释器路径 Modules The units of code Ansible executes. Ansible 自带的模块都是用 Python 编写的,但实际上可以使用任何语言编写模块 Tasks The units of action in Ansible. Playbooks Playbooks 加载顺序 ANSIBLE_CONFIG > ./ansible.cfg > ~/.ansible.cfg > /etc/ansible/ansible.cfg Ansible will read ANSIBLE_CONFIG, ansible.cfg in the current working directory, .ansible.cfg in the home directory or /etc/ansible/ansible.cfg, whichever it finds first ANSIBLE_CONFIG:首先,Ansible 命令会先检查环境变量,及这个环境变量将指向的配置文件 ./ansible.cfg:其次,将会检查当前目录下的 ansible.cfg 配置文件 ~/.ansible.cfg:再次,将会检查当前用户 home 目录下的~/.ansible.cfg 配置文件 /etc/ansible/ansible.cfg:最后,将会检查在安装 Ansible 时自动生产的配置文件 ansible.cfg 常用配置项 [defaults] 配置项 说明 默认值 inventory ansible inventory文件路径 /etc/ansible/hosts library ansible模块文件路径 /usr/share/my_modules/ remote_tmp ansible远程主机脚本临时存放目录 ~/.ansible/tmp local_tmp ansible管理节点脚本临时存放目录 ~/.ansible/tmp forks ansible执行并发数 5 poll_interval ansible异步任务查询间隔 15 sudo_user ansible sudo用户 root ask_sudo_pass 运行ansible是否提示输入sudo密码 True ask_pass 运行ansible是否提示输入密码 True transport ansible远程传输模式 smart remote_port 远程主机SSH端口 22 module_lang ansible模块运行默认语言环境 C gathering facts信息收集开关定义 smart roles_path ansible role存放路径 /etc/ansible/roles timeout ansible SSH连接超时时间 10 remote_user ansible远程认证用户 root log_path ansible日志记录文件 /var/log/ansible.log module_name ansible默认执行模块 command executable ansible命令执行shell /bin/sh hash_behaviour ansible主机变量重复处理方式 replace private_role_vars 默认情况下,角色中的变量将在全局变量范围中可见。 为了防止这种情况,可以启用以下选项,只有tasks的任务和handlers得任务可以看到角色变量 yes vault_password_file 指定vault密码文件路径 无 ansible_managed 定义的一个Jinja2变量,可以插入到Ansible配置模版系统生成的文件中 Ansible managed display_skipped_hosts 开启显示跳过的主机 True error_on_undefined_vars 开启错误,或者没有定义的变量 False action_plugins ansible action插件路径 无 cache_plugins ansible cache插件路径 无 callback_plugins ansible callback插件路径 无 connection_plugins ansible connection插件路径 无 lookup_plugins ansible lookup插件路径 无 inventory_plugins ansible inventory插件路径 无 vars_plugins ansible vars插件路径 无 filter_plugins ansible filter插件路径 无 terminal_plugins ansible terminal插件路径 无 strategy_plugins ansible strategy插件路径 无 fact_caching 定义ansible facts缓存方式 memory fact_caching_connection 定义ansible facts缓存路径 无 privilege_escalation - 权限升级 配置项 说明 默认值 become 是否开启become模式 True become_method 定义become方式 sudo become_user 定义become方式 root become_ask_pass 是否定义become提示密码 False ansible \\ -m \\ -a \\ Xiechengqi 最新修订时间: 2019-12-20 20:25:21 console.log(\"plugin-popup....\");document.onclick = function(e){ e.target.tagName === \"IMG\" && window.open(e.target.src,e.target.src)}img{cursor:pointer}"},"NoClass/待学习、整理知识.html":{"url":"NoClass/待学习、整理知识.html","title":"目录","keywords":"","body":"目录 什么是计算机端口 AWS 详解 ssh 登录原理详解 - 密码学 - 公有私有密钥 - 数字签名 http://www.ruanyifeng.com/blog/2011/08/what_is_a_digital_signature.html http://www.ruanyifeng.com/blog/2011/12/ssh_remote_login.html 字序大端、小端 内存堆栈 Xiechengqi 最新修订时间: 2019-12-19 19:03:44 console.log(\"plugin-popup....\");document.onclick = function(e){ e.target.tagName === \"IMG\" && window.open(e.target.src,e.target.src)}img{cursor:pointer}"}}