摘要: 环境说明 服务 ip 端口 备注 nexus 192.168.80.129 (内网) 8081 内网地址无法访问外网 centos7.9 192.168.80.133 安装docker服务 nginx 192.168.80.128 (内网) 192.168.174.126 (外网) 88 19000 阅读全文
posted @ 2024-04-19 09:01 小吉猫 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 字符串定义 在 Python 中处理文本数据是使用 str 对象,也称为 字符串。 字符串是由 Unicode 码位构成的不可变 序列。 字符串创建方式 单引号:'Hello, World!' 双引号:"Hello, World!"(允许字符串中包含单引号,如 "Don't") 三引号:可以使用三个 阅读全文
posted @ 2024-04-18 10:42 小吉猫 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 列表定义 列表(List)是一种有序的集合,可以包含任意类型的对象:数字、字符串甚至其他列表等。列表是可变的,这意味着我们可以添加、删除或更改列表中的元素。 列表 list 构建 list 构建方法 使用一对方括号来表示空列表: [] 使用方括号,其中的项以逗号分隔: [a], [a, b, c] 阅读全文
posted @ 2024-04-17 09:25 小吉猫 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 元组定义 元组是不可变序列,通常用于储存异构数据的多项集(例如由 enumerate() 内置函数所产生的二元组)。 元组也被用于需要同构数据的不可变序列的情况(例如允许存储到 set 或 dict 的实例)。 元组是 Python 中的一种数据结构,类似于列表,但是元组是不可变的,意味着一旦创建, 阅读全文
posted @ 2024-04-16 09:24 小吉猫 阅读(2) 评论(0) 推荐(0) 编辑
摘要: secrets 说明 secrets 模块用于生成高度加密的随机数,适于管理密码、账户验证、安全凭据及机密数据。 生成随机数 secrets 模块是操作系统提供的最安全地随机性来源。 choice(sequence) 从非空序列中返回一个安全的随机元素。 import secrets # 假设我们有 阅读全文
posted @ 2024-04-15 10:20 小吉猫 阅读(1) 评论(0) 推荐(0) 编辑
摘要: hosts [centos-root] 192.168.174.129 ansible_ssh_port=22 192.168.174.130 ansible_ssh_port=22 192.168.174.131 ansible_ssh_port=22 Ansible Vault 文件 创建 An 阅读全文
posted @ 2024-04-14 11:00 小吉猫 阅读(3) 评论(0) 推荐(0) 编辑
摘要: hosts [centos-root] 192.168.174.129 ansible_ssh_port=22 192.168.174.130 ansible_ssh_port=22 192.168.174.131 ansible_ssh_port=22 Ansible Vault 文件 创建 An 阅读全文
posted @ 2024-04-12 18:24 小吉猫 阅读(2) 评论(0) 推荐(0) 编辑
摘要: hosts [centos-root] 192.168.174.129 ansible_ssh_port=22 192.168.174.130 ansible_ssh_port=22 192.168.174.131 ansible_ssh_port=22 Ansible Vault 文件 创建 An 阅读全文
posted @ 2024-04-12 14:44 小吉猫 阅读(3) 评论(0) 推荐(0) 编辑
摘要: hosts [centos-root] 192.168.174.129 ansible_ssh_port=22 ansible_ssh_user=root ansible_ssh_pass=host1 192.168.174.130 ansible_ssh_port=22 ansible_ssh_u 阅读全文
posted @ 2024-04-11 23:17 小吉猫 阅读(3) 评论(0) 推荐(0) 编辑
摘要: random 说明 生成伪随机数。不应将此模块的伪随机生成器用于安全目的。 有关安全性或加密用途,应使用 secrets 模块。 设置随机数种子 seed(a=None, version=2) 初始化随机数生成器。如果使用相同的种子,将会生成相同的随机数序列。 import random rando 阅读全文
posted @ 2024-04-10 13:47 小吉猫 阅读(5) 评论(0) 推荐(0) 编辑