2016-06-17 1 views
0

내가 내 작전이 같은 psql 명령을 실행하면 : 그것은 완료하는 데 영원히 소요psql에 대해 명령 모듈이 멈추는 이유는 무엇입니까?

- name: Run psql to pull in initial config data 
    become_method: sudo 
    become: yes 
    become_user: postgres 
    command: psql -U postgres -w eclaim < /opt/eclaim_revamp/sql_scripts/initial_config.sql 

, 요령 것처럼 보이지만, 내가 shell를 사용하는 경우, 그것을 통해 얻을 수 있습니다 :

- name: Run psql to pull in initial data 
    become_method: sudo 
    become: yes 
    become_user: postgres 
    shell: psql -U postgres -w eclaim < /opt/eclaim_revamp/sql_scripts/initial_sql_script.sql 

아무도 왜 저에게 말할 수 있습니까? documentation 가입일

답변

2

: | & "및

[주어진 명령, 쉘을 통해 처리"< ","> ", 등 $ HOME 같은 변수 및 조작 그렇게되지 않는다" " "작동하지 않습니다 (이러한 기능이 필요한 경우 쉘 모듈을 사용하십시오).

+0

관찰 된 동작을 일으키는 이유를 추가하려면 명령이 입력 파일을 통해 제공되지 않아서 Postgres가 입력을 기다리고 있습니다. –

관련 문제