首页 > 解决方案 > 错误:运行/home/circleci/project/ansible/inventory.yml --list 出现问题([Errno 8] Exec 格式错误)

问题描述

我使用 CircleCI 自动部署我的项目。我尝试在本地运行 ansible 没有问题,但我似乎无法在 circleci 机器上运行相同的命令。

代码circleci配置:

- add_ssh_keys:
          fingerprints:
            - "my:fin:ger:pri:nt"
- run:
          name: deploy application by ansible
          command: |
            cd ansible
            ansible-playbook -i inventory.yml -e 'record_host_keys=True' -u ec2-user playbook.yml
          environment:
            ANSIBLE_HOST_KEY_CHECKING: False

库存.yml 代码:

all:
  hosts:
    "My EC2-IP"

我在这里想念什么?

标签: ansiblecontinuous-integrationdevopscontinuous-deploymentcircleci

解决方案


推荐阅读