摘要: 使用背景:ssh登陆不能在命令行中指定密码,也不能以shell中随处可见的,sshpass 的出现,解决了这一问题。 它允许你用 -p 参数指定明文密码,然后直接登录远程服务器。 它支持密码从命令行,文件,环境变量中读取, 所以,通过sshpass实现以非交互的形式为ssh提供密码。 安装:在Cen 阅读全文
posted @ 2019-07-24 17:53 kissrule 阅读(443) 评论(0) 推荐(0) 编辑
摘要: sos-ci git:(master) cat -n watch-tempest-logs.sh 1 #!/bin/bash 2 3 if [ "$#" -lt 1 ]; then 4 echo "IP address of tempest machine required" 5 exit 1 6 阅读全文
posted @ 2019-07-24 17:46 kissrule 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 从第3行到第6行,看出此脚本的执行目录是在上一层目录。 sos-ci git:(master) cat -n start-ci.sh 1 #!/bin/bash 2 3 mkdir sos-data 4 5 cd sos-ci 6 ./set-env-to-vars.sh 7 8 COUNTER=0 阅读全文
posted @ 2019-07-24 17:40 kissrule 阅读(289) 评论(0) 推荐(0) 编辑
摘要: ➜ sos-ci git:(master) cat -n run-on-vm-change-user.sh 1 #!/bin/bash 2 3 if [ "$EUID" -ne 0 ] 4 then echo "Please run as root" 5 exit 1 6 else 7 if [ " 阅读全文
posted @ 2019-07-24 17:24 kissrule 阅读(176) 评论(0) 推荐(0) 编辑
摘要: cat -n run-docker-container.sh 1 #!/bin/bash 2 3 docker ps -a | grep sos-ci-container 4 if [ $? == 0 ]; then //如果存在 5 docker rm -f sos-ci-container // 阅读全文
posted @ 2019-07-24 16:43 kissrule 阅读(211) 评论(0) 推荐(0) 编辑
摘要: sos-ci git:(master) cat -n create-template.sh 1 #!/bin/bash 2 3 ansible-playbook --extra-vars "ansible_sudo_pass=LOCALHOST_PASS" sos-ci/ansible/create 阅读全文
posted @ 2019-07-24 16:05 kissrule 阅读(150) 评论(0) 推荐(0) 编辑
摘要: sos-ci git:(master) cat -n create-sos-vm.sh 1 #!/bin/bash 2 3 ansible-playbook --extra-vars "ansible_sudo_pass=LOCALHOST_PASS" sos-ci/ansible/create-s 阅读全文
posted @ 2019-07-24 16:03 kissrule 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 1 #!/bin/bash 2 # 3 # Description: 4 # This script is for setup the jenkins dashboard. 5 # 6 # 7 # GLOBAL VARIABLES 8 # 9 if [ "$EUID" -ne 0 ] // 10 t 阅读全文
posted @ 2019-07-24 11:45 kissrule 阅读(177) 评论(0) 推荐(0) 编辑