인프런 커뮤니티 질문&답변

송현준님의 프로필 이미지
송현준

작성한 질문수

구성 관리 자동화 도구 - 앤서블(Ansible)

자동으로 Known_hosts에 등록하기

Auto_known_host.yml 에서 오류 발생합니다.

작성

·

265

1

- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요!
- 먼저 유사한 질문이 있었는지 검색해보세요.
- 서로 예의를 지키며 존중하는 문화를 만들어가요.
- 잠깐! 인프런 서비스 영 관련 문의는 1:1 문의하기를 이용해주세요.
깃허브에 올려주신 파일 받아서 1.2 폴더 내부에 있는 파일들 전부 복사해서 Hashicorp에 넣어주고 배치파일 CR LF로 수정하고 저장한 다음 배치파일 실행해준 뒤 vagrant up 했는데 위와 같은 오류가 발생하네요.
문법 오류라고 출력되길래 위 사진에 출력된거처럼 고치라고 적혀있어서 고쳐봤는데도 안됩니다... ㅠ

답변 2

1

송현준님의 프로필 이미지
송현준
질문자

제가 뭘 잘못만졌었나보네요. 다시 github에서 다운받고 새로 압축풀어서 하니까 됐습니다. 답변 정말 감사드립니다.

조훈(Hoon Jo)님의 프로필 이미지
조훈(Hoon Jo)
지식공유자

넵 해결되셨다니 다행이네요 :) 

0

조훈(Hoon Jo)님의 프로필 이미지
조훈(Hoon Jo)
지식공유자

안녕하세요 

방금 전에 받아서 돌려봤는데요..아래와 같이 이상이 없는거 같습니다. 

따라서 위의 에러가..어디서 기인한건지 확인하기 약간 어려운데...음...

약간 불편하시겠지만 모든 VM을 지우고, 다시 1.2에서 vagrant up을 진행해 봐주실수 있을까요?

    ansible-server: TASK [Configure vimrc] *********************************************************

    ansible-server: changed: [localhost] => (item=set number)

    ansible-server: changed: [localhost] => (item=execute pathogen#infect())

    ansible-server: changed: [localhost] => (item=syntax on)

    ansible-server: 

    ansible-server: TASK [Configure Bashrc] ********************************************************

    ansible-server: changed: [localhost] => (item=alias vi='vim')

    ansible-server: changed: [localhost] => (item=alias ans='ansible')

    ansible-server: changed: [localhost] => (item=alias anp='ansible-playbook')

    ansible-server: 

    ansible-server: PLAY RECAP *********************************************************************

    ansible-server: localhost                  : ok=8    changed=8    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

==> ansible-server: Running provisioner: shell...

    ansible-server: Running: /var/folders/57/629sgzyn5wng9wyrwry2325m0000gn/T/vagrant-shell20210720-56426-1v6gt7i.sh

==> ansible-server: Running provisioner: file...

    ansible-server: Auto_known_host.yml => Auto_known_host.yml

==> ansible-server: Running provisioner: shell...

    ansible-server: Running: inline script

    ansible-server: 

    ansible-server: PLAY [nodes] *******************************************************************

    ansible-server: 

    ansible-server: TASK [command] *****************************************************************

    ansible-server: changed: [192.168.1.101]

    ansible-server: 

    ansible-server: TASK [lineinfile] **************************************************************

    ansible-server: changed: [192.168.1.101] => (item=192.168.1.101 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHSjKzJ2JaecJgHjFzx3lZ7/42hVhQjcBqXxlCgNkpp8D9UWC4rozjN3l8s6IYNKCt1NCZs4bCXrMTfz+UQq9R0=)

    ansible-server: 

    ansible-server: PLAY [nodes] *******************************************************************

    ansible-server: 

    ansible-server: TASK [command] *****************************************************************

    ansible-server: changed: [192.168.1.102]

    ansible-server: 

    ansible-server: TASK [lineinfile] **************************************************************

    ansible-server: changed: [192.168.1.102] => (item=192.168.1.102 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBBpnXnsArqDn/+mbmvFd5CRdC3Vg8OexsTdj+7Q4ZFAeWpYyBErTVxBiisTBRNirJk5A468nfDHohUubBKRTJkI=)

    ansible-server: 

    ansible-server: PLAY [nodes] *******************************************************************

    ansible-server: 

    ansible-server: TASK [command] *****************************************************************

    ansible-server: changed: [192.168.1.103]

    ansible-server: 

    ansible-server: TASK [lineinfile] **************************************************************

    ansible-server: changed: [192.168.1.103] => (item=192.168.1.103 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBH4/8UeWnznj4jvW/P/evI2BP+jns92SEKsK4Xsh4SC/1UyFr5Djj5hau2NWL1Dnp9UqLL3+SY9XavPQXLJczu8=)

    ansible-server: 

    ansible-server: PLAY [nodes] *******************************************************************

    ansible-server: 

    ansible-server: TASK [command] *****************************************************************

    ansible-server: changed: [192.168.1.104]

    ansible-server: 

    ansible-server: TASK [lineinfile] **************************************************************

    ansible-server: changed: [192.168.1.104] => (item=192.168.1.104 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHRvlG2Zjj8P0JDWRBPZF4GOXp1SkPab0ITpYVsdzubya7qNgzFbNW8YqiLCCp2nS3nMJjr0KKQRGZhuiszdqd8=)

    ansible-server: 

    ansible-server: PLAY [nodes] *******************************************************************

    ansible-server: 

    ansible-server: TASK [command] *****************************************************************

    ansible-server: changed: [192.168.1.201]

    ansible-server: 

    ansible-server: TASK [lineinfile] **************************************************************

    ansible-server: changed: [192.168.1.201] => (item=192.168.1.201 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBL+I7dangm9xFgie+Xuf0Fjx2dLdYUxYV8A8lYNTcabDIsHzramPJ628/TM4u9SnliD2LLi5ISkFNFymiUcwdwA=)

    ansible-server: 

    ansible-server: PLAY [nodes] *******************************************************************

    ansible-server: 

    ansible-server: TASK [command] *****************************************************************

    ansible-server: changed: [192.168.1.202]

    ansible-server: 

    ansible-server: TASK [lineinfile] **************************************************************

    ansible-server: changed: [192.168.1.202] => (item=192.168.1.202 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBOmuQZeajfaQJU+GlxU5wSgINTQyvEymrl1HdHCdiR29ULUtAWG3e3GLgeGa6wjmxbokm5lyKhxVWnZEBMRE8TM=)

    ansible-server: 

    ansible-server: PLAY [nodes] *******************************************************************

    ansible-server: 

    ansible-server: TASK [command] *****************************************************************

    ansible-server: changed: [192.168.1.203]

    ansible-server: 

    ansible-server: TASK [lineinfile] **************************************************************

    ansible-server: changed: [192.168.1.203] => (item=192.168.1.203 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPPXXkSIX5+kmyI8CB2y3N/jFQQy2U7l58tRg1sSYJMQKrBOlO+4PI/d0+dDiSuIxYGQ8dJ2trEHsaqKfLTBneg=)

    ansible-server: 

    ansible-server: PLAY [nodes] *******************************************************************

    ansible-server: 

    ansible-server: TASK [command] *****************************************************************

    ansible-server: changed: [192.168.1.204]

    ansible-server: 

    ansible-server: TASK [lineinfile] **************************************************************

    ansible-server: changed: [192.168.1.204] => (item=192.168.1.204 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFhvBSFA3nhLn03cffQHIZ0K72zHIFGhMStjfPLnlLrqQYKnAxH9AHVdbr1HpIc4w5/zRc7O5FG/+95Jl6CEU8A=)

    ansible-server: 

    ansible-server: PLAY RECAP *********************************************************************

    ansible-server: 192.168.1.101              : ok=2    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

    ansible-server: 192.168.1.102              : ok=2    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

    ansible-server: 192.168.1.103              : ok=2    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

    ansible-server: 192.168.1.104              : ok=2    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

    ansible-server: 192.168.1.201              : ok=2    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

    ansible-server: 192.168.1.202              : ok=2    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

    ansible-server: 192.168.1.203              : ok=2    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

    ansible-server: 192.168.1.204              : ok=2    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0  

조훈(Hoon Jo)님의 프로필 이미지
조훈(Hoon Jo)
지식공유자

굳이 옮기지 말고 1.2 디렉터리에서 그냥 돌리셔도 됩니다...그리고 cr lf는 1.1 bat 수정을 위한거니까 VM을 다 지운 상태라면 1.2에서 그냥 vagrant up 해보시면 될 것 같습니다. 

송현준님의 프로필 이미지
송현준

작성한 질문수

질문하기