ansible 2.3.0.0 条件判断 ---# ansible2.3.0.0_conditionals_examples.yaml# ansible 2.3.0.0 conditionals test## # https://gist.github.com/marcusphi/6791404# $ cat local.hosts # local ansible_host=127.0.0.1 # This has been tested with ansible 2.3.0.0 with these commands:# ansible-playbook -i local.hosts ansible2.3.0.0_conditionals_examples.yaml # NB: The type of the variable is crucial!# 字符串也可以作为『布尔值(bool)』进行判断,但是
ansible synchronize 同步文件夹 使用 ansible synchronize_module 可以控制机和目标机之间同步目录 cat /root/ansible_copy/hosts [backup] 10.1.1.1 serverid=1001 ansible_ssh_user=backup_user ansible_ssh_port=22 通过 mode 控制同步方向 mode=push 默认值。 从『控制机』到『目标机』 mode=pull 从『目标机』到『控制
使用 FIO 测试磁盘 IOPS 性能 磁盘IOPS测试 linux 使用 FIO 测试 FIO是测试IOPS的非常好的工具,用来对硬件进行压力测试和验证,支持13种不同的I/O引擎
闰年的最佳效率演算法 閏年的最佳效率演算法 所謂閏年,維基百科做了如是介紹: 閏年是比普通年分多出一段時間的年分,在各種曆法中都有出現,目的是為了
使用 mysql 统计平均用户在线时长 在表中,记录了用户 login/logout 的时间点(unix时间)。现在需要确定当日用户的在线时长总和,与平均在线时长。 简单的说,就是要
AWS EFS 使用笔记 # 安装 nfs utils 组件 # On an Amazon Linux, Red Hat Enterprise Linux, or SuSE Linux instance: sudo yum install -y nfs-utils # On an Ubuntu instance: #sudo apt-get install nfs-common iptables 与 sg 设置 mount 的时候注意防火墙 或 security group 的设置 EFS 使用了防火墙,需要