请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

jenkins执行pipeline任务失败,ansible yum安装webstatic源ssl超时

图片描述
报错:
TASK [wordpress : Setup webtatic yum source for php-fpm] ***********************
fatal: [test.example.com]: FAILED! => {“changed”: false, “msg”: “Failure downloading https://mirror.webtatic.com/yum/el7/webtatic-release.rpm, Request failed: <urlopen error (’_ssl.c:602: The handshake operation timed out’,)>”}

main.yml内容:

  • name: Update yum dependency
    shell: ‘yum update -y warn=False’

  • name: Disable system firewall
    service: name=firewalld state=stopped

  • name: Disable SELINUX
    selinux: state=disabled

  • name: Setup epel yum source for nignx and mariadb(mysql)
    yum: pkg=epel-release state=latest

  • name: Setup webtatic yum source for php-fpm
    yum: name=https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

  • name: Ensure nginx is at the latest version
    yum: pkg=nginx state=latest

  • name: Write the nginx config gile
    template: src=roles/wordpress/templates/nginx.conf.j2 dest=/etc/nginx/nginx.conf

  • name: Create nginx root folder
    file: ‘path={{ root }} state=directory owner={{ user }} group={{ user }} mode=0755’

  • name: Copy info.php to remote
    copy: ‘remote_src=no src=roles/wordpress/files/info.php dest=/data/www/info.php mode=0755’

  • name: Restart nginx service
    service: name=nginx state=restarted

  • name: Setup php-fpm
    command: ‘yum -y install php70w php70w-fpm php70w-common php70w-mysql php70w-gd php70w-xml php70w-mbstring php70w-mcrypt warn=False’

  • name: Copy php-fpm config file to remote
    copy: ‘remote_src=no src=roles/wordpress/files/www.conf dest=/etc/php-fpm.d/www.conf mode=0755 owner={{ user }} group={{ user }} force=yes’

  • name: Restart php-fpm sevice
    service: name=php-fpm state=restarted

  • name: Run the health check locally
    shell: "sh roles/wordpress/files/health_check.sh {{ server_name }} {{ port }}"
    delegate_to: localhost
    register: health_status

  • debug: msg="{{ health_status.stdout }}"

  • name: Setup mariadb(mysql)
    command: “yum -y install mariadb mariadb-server warn=False”

  • name: Backup current www folder
    shell: ‘mv {{ root }} {{ backup_to }}’

  • name: Close git ssl verification
    shell: ‘git config --global http.sslVerify false’

  • name: Clone wordpress repo to remote
    git: "repo=https://{{ gitlab_user | urlencode }}:{{ gitlab_pass | urlencode }}@gitlab.example.com/root/Wordpress-project.git dest=/data/www version={{ branch }}"
    when: project == ‘wordpress’

  • name: Change www folder permission
    file: “path=/data/www mode=0755 owner={{ user }} group={{ user }}”

麻烦老师帮忙看下,谢谢~

正在回答 回答被采纳积分+3

1回答

一路向北 2021-10-02 12:24:27
手动执行下yum install 具体安装包,查看下webstatic源是否有问题 从报错看 应该是你的部署机器网络到webstatic不通
0 回复 有任何疑惑可以回复我~
  • 提问者 慕后端7294772 #1
    嗯嗯 我手动命令行执行也是访问超时。但是那个镜像源地址ping的通,我从浏览器下载到本地改了下ansible的脚本用copy和yum模块安装好了,谢谢老师
    回复 有任何疑惑可以回复我~ 2021-10-02 15:51:52
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信