inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

Jenkins를 이용한 CI/CD Pipeline 구축

Ansible playbook으로 Kubernetes Script 실행하기

ansible 에서 playbook 실행 시 아래와 같은 에러가 발생합니다.

689

김상운

작성한 질문수 27

0

처음 발견한 오류는 python 경로를 찾지 못했다 해서 구글링 끝에 아래와같이

ansible_python_interpreter=[로컬파이썬 설치경로]

로 설정할 경우 위의 에러가 발생합니다. 이유가 무엇일까여..?

 

아래는 상세 에러 메시지 입니다.

fatal: [192.168.35.93]: FAILED! => {"changed": false, "module_stderr": "Exception calling \"Create\" with \"1\" argument(s): \"At line:4 char:21\r\n+ def ansiballzmain():\r\n+ ~\r\nAn expression was expected after '('.\r\nAt line:8 char:19\r\n+ os.getcwd()\r\n+ ~\r\nAn expression was expected after '('.\r\nAt line:20 char:27\r\n+ except (AttributeError, OSError):\r\n+ ~\r\nMissing argument in parameter list.\r\nAt line:22 char:29\r\n+ excludes = set(('', '.', scriptdir))\r\n+ ~\r\nMissing expression after ','.\r\nAt line:22 char:30\r\n+ excludes = set(('', '.', scriptdir))\r\n+ ~~~~~~~~~\r\nUnexpected token 'scriptdir' in expression or statement.\r\nAt line:22 char:29\r\n+ excludes = set(('', '.', scriptdir))\r\n+ ~\r\nMissing closing ')' in expression.\r\nAt line:22 char:39\r\n+ excludes = set(('', '.', scriptdir))\r\n+ ~\r\nUnexpected token ')' in expression or statement.\r\nAt line:22 char:40\r\n+ excludes = set(('', '.', scriptdir))\r\n+ ~\r\nUnexpected token ')' in expression or statement.\r\nAt line:29 char:7\r\n+ if sys.version_info < (3,):\r\n+ ~\r\nMissing '(' after 'if' in if statement.\r\nAt line:29 char:30\r\n+ if sys.version_info < (3,):\r\n+ ~\r\nMissing expression after ','.\r\nNot all parse errors were reported. Correct the reported errors and try again.\"\r\nAt line:10 char:1\r\n+ $exec_wrapper = [ScriptBlock]::Create($split_parts[0])\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n + CategoryInfo : NotSpecified: (:) [], MethodInvocationException\r\n + FullyQualifiedErrorId : ParseException\r\n \r\nThe expression after '&' in a pipeline element produced an object that was not valid. It must result in a command name,\r\n a script block, or a CommandInfo object.\r\nAt line:11 char:2\r\n+ &$exec_wrapper\r\n+ ~~~~~~~~~~~~~\r\n + CategoryInfo : InvalidOperation: (:) [], RuntimeException\r\n + FullyQualifiedErrorId : BadExpression\r\n ", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

PLAY RECAP ***************************************************************************************************************************************************

192.168.35.93 : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

sonarqube cicd ansible kubernetes jenkins

답변 0

내장형 톰캣일경우

0

27

2

git 에 강의내용에 필요한 파일들 존재하지 않음

0

93

2

젠킨스에 등록된..

0

102

2

yml 파일 db 접속정보 수정 후 배포 시 미반영

0

115

2

jdk 버전 17

0

85

2

섹션2 강의자료

0

107

2

DOCKER 이미지 PULL

0

268

1

36강 edowon0623/cicd-project-ansible이 호환이 안되는것 같아요

0

65

1

질문이 있습니다!!

0

72

1

exec /usr/local/tomcat/bin/catalina.sh: invalid argument 오류 해별법(공유)

1

208

4

m2 mac: ansible-server에서 container 실행 안됨

0

162

2

Jenkins와 k8s 연동과 관련한 질문입니다.

0

99

2

Ansible 과 연동에서 이미지 및 컨테이너 생성과 관련한 질문 드립니다.

0

177

2

맥북 실리콘칩 invalid argument 에러 해결 (수동 설치)

0

261

3

Docker Container에서 Tomcat 설치

0

225

2

ec2 여러대에서 각각 직접 설치 이유

0

155

1

P@ssw0rd 설정시기

0

152

2

ansible 원리

0

136

2

ansible 존재여부

0

120

2

젠킨스 빌드 성공후 shutdown

0

252

2

Docker Hub에 Push 무한 로딩

0

130

2

컨테이너에 ssh로 접속 비밀번호 불일치

0

122

1

maven project 오류

0

120

2

엔서블을 이용하여 톰캣 이미지 배포 후, 되돌리는 방법

0

151

2