#!/bin/sh
ssh deploy@mopp2.hncsmtr.com
source /home/deploy/.py3-a2.5-env/bin/activate
source /home/deploy/.py3-a2.5-env/ansible/hacking/env-setup -q
ansible-playbook -i /home/deploy/test_playbooks/inventory/testenv /home/deploy/test_playbooks/deploy.yml
构建报错:
Running as SYSTEM
Building in workspace /root/.jenkins/workspace/test
[test] $ /bin/bash /tmp/jenkins67391790563222075.sh
Pseudo-terminal will not be allocated because stdin is not a terminal.
/tmp/jenkins67391790563222075.sh:行5: /home/deploy/.py3-a2.5-env/bin/activate: 没有那个文件或目录
/tmp/jenkins67391790563222075.sh:行6: /home/deploy/.py3-a2.5-env/ansible/hacking/env-setup: 没有那个文件或目录
/tmp/jenkins67391790563222075.sh:行7: ansible-playbook: 未找到命令
Finished: SUCCESS