ansible返回错误!发生意外的参数类型:<type'bool'>

时间:2019-12-04 19:54:41

标签: ansible

我有以下问题:

- name: Run with inline v2 compose
  hosts: localhost
  gather_facts: no
  tasks:
    - docker_compose:
        project_name: backend-with-mock-server
        definition:
          version: '2'
          services:
            couchdb:
              image: "ibmcom/couchdb3:preview"
              ports:
                - "5984:5984"
            redis:
              image: 'bitnami/redis:latest'
              ports:
                - '6379:6379'
              environment:
                - REDIS_MASTER_PORT_NUMBER=6379
                - REDIS_PASSWORD=test
            uds-mock-server:
              build: "{{ travis.base_build_path }}/mock-server"
              ports: 
                - "4000:4000"
              depends_on:
                - couchdb
              volumes:
                - /app/node_modules
                - .:/app
              environment: 
                - DB_URL=http://test:test@couchdb:5984
                - NODE_ENV=dev
                - IS_DOCKER_COMPOSE_ENABLED=true
                - UDS_MOCK_SERVER_DOMAIN=mock-server
                - LOG_LEVEL=error
                - UDS_OBJECT_COUNTS=5
            de-backend:
              build: "{{travis.base_build_path }}/backend"
                  # context: {{ travis.base_build_path }}/backend
                  # dockerfile: Dockerfile
              command: bash -c 'while [[ "$$(curl -v --connect-timeout 2 -s -o /dev/null -w ''%{http_code}'' http://mock-server:4000/readiness)" != "200" ]]; do echo .. ["$$(curl --connect-timeout 2 -s -o /dev/null -w ''%{http_code}'' https://mock-server:4000/readiness)"] ; sleep 5; done; echo backend is up; npm start'
              ports: 
                - "3000:3000"
              depends_on:
                - couchdb
                - redis
                - uds-mock-server
              volumes:
                - /app/node_modules
                - .:/app
              environment: 
                - DB_URL=http://test:test@couchdb:5984
                - REDIS_HOST=redis
                - REDIS_PORT=6379
                - REDIS_PASS=test
                - NODE_ENV=development
                - RESULTS_DATASTORE_TYPE=couchdb
                - RESULTS_COUCH_USERNAME=test
                - RESULTS_COUCH_PASSWORD=test
                - UDS_API=http://uds-mock-server:4000/xxx
                - RESULTS_COUCH_URL=http://couchdb:5984
                - SEARCH_RECORDS_DATASTORE_TYPE=couchdb
                - SEARCH_RECORDS_COUCH_USERNAME=test
                - SEARCH_RECORDS_COUCH_PASSWORD=test
                - SEARCH_RECORDS_COUCH_DB_NAME=xxxx
                - SEARCH_RECORDS_COUCH_URL=http://couchdb:5984
                - DATABASE_WATCHER_ENABLED=true
              user: root
      register: output

因此,基本上,这是一个不可行的docker compose容器,我正在尝试在docker_compose中运行几个容器。我还添加了user:root来授予root访问权限,因为当我在docker上运行相同的内容时,没有user:root会导致权限被拒绝
在服务器上运行它时,我得到:

ERROR! unexpected parameter type in action: <type 'bool'>
The error appears to be in 'some path': line 46, column 3, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: Run with inline v2 compose
  ^ here

我想念什么吗?

0 个答案:

没有答案