Ansible: μž‘μ—… μ‹€ν–‰μžλŠ” \ u2018 λ¬Έμžμ— λ¬Έμ œκ°€μžˆλŠ” .format ()을 μ‚¬μš©ν•©λ‹ˆλ‹€.

에 λ§Œλ“  2016λ…„ 12μ›” 30일  Β·  2μ½”λ©˜νŠΈ  Β·  좜처: ansible/ansible

문제 μœ ν˜•

  • 버그 μ‹ κ³ 
ꡬ성 μš”μ†Œ 이름

ansible / plugins / action / __ init__.py

ANSIBLE 버전
ansible 2.2.0.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
ꡬ성

μ—†μŒ

OS / ν™˜κ²½

x86_64 GNU / λ¦¬λˆ…μŠ€

μš”μ•½

Linux μƒμžμ—μ„œ λŒμ•„ μ˜€λŠ” 였λ₯˜μ— python 2.xμ—μ„œ κ΅¬ν˜„ λ¬Έμ œκ°€μžˆλŠ” κ²ƒμœΌλ‘œ λ³΄μ΄λŠ” u2018 λ¬Έμžκ°€ ν¬ν•¨λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€.

μ°Έμ‘°- '{0}'. format (u'itu2018s μœ λ‹ˆ μ½”λ“œ κ΅¬ν˜„ ν…ŒμŠ€νŠΈ ')
μ—­ 좔적 (κ°€μž₯ 졜근 톡화 λ§ˆμ§€λ§‰)
파일 "", 1 ν–‰, in
UnicodeEncodeError : 'ascii'코덱은 μœ„μΉ˜ 7μ—μ„œ 문자 u'u2018 '을 인코딩 ν•  수 μ—†μŠ΅λ‹ˆλ‹€. μ„œ μˆ˜κ°€ λ²”μœ„μ— μ—†μŠ΅λ‹ˆλ‹€ (128).

ν•˜μ§€λ§Œ 파이썬 3.xμ—μ„œλŠ” 잘 μ‹€ν–‰λ©λ‹ˆλ‹€.

μž¬ν˜„ 단계

Linux μƒμžμ—μ„œ μ˜€λŠ” λ©”μ‹œμ§€ u2018은 μ—¬λŸ¬ 번 μ‚¬μš©λ©λ‹ˆλ‹€.
치λͺ…적 : [crlg.be-cloud.be] : μ‹€νŒ¨ν–ˆμŠ΅λ‹ˆλ‹€! => {
"μ‹€νŒ¨": μ°Έ,
"msg": "κΆŒν•œμ΄μ—†λŠ” μ‚¬μš©μžκ°€ 될 λ•Œ Ansible이 λ§Œλ“€μ–΄μ•Όν•˜λŠ” μž„μ‹œ νŒŒμΌμ— λŒ€ν•œ κΆŒν•œμ„ μ„€μ •ν•˜μ§€ λͺ»ν–ˆμŠ΅λ‹ˆλ‹€. (rc : 1, 였λ₯˜ : chown : '/tmp/ansible-tmp-1483137683.83-3208985635661/'의 μ†Œμœ κΆŒ λ³€κ²½ : μž‘μ—…μ΄ μ•„λ‹™λ‹ˆλ‹€. allowednchown : '/tmp/ansible-tmp-1483137683.83-3208985635661/git.py'의 μ†Œμœ κΆŒ λ³€κ²½ : μž‘μ—…μ΄ ν—ˆμš©λ˜μ§€ μ•ŠμŒ)이 문제λ₯Ό ν•΄κ²°ν•˜λŠ” 방법에 λŒ€ν•œ μžμ„Έν•œ λ‚΄μš©μ€ https://docs.ansible.com/ansible/become.html을 μ°Έμ‘° un -
}

μ˜ˆμƒ κ²°κ³Ό

λ©”μ‹œμ§€κ°€ ν‘œμ‹œλ˜μ–΄μ•Όν•©λ‹ˆλ‹€.

μ‹€μ œ κ²°κ³Ό
An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/ansible/executor/task_executor.py", line 119, in run
    res = self._execute()
  File "/usr/lib/python2.7/dist-packages/ansible/executor/task_executor.py", line 490, in _execute
    result = self._handler.run(task_vars=variables)
  File "/usr/lib/python2.7/dist-packages/ansible/plugins/action/normal.py", line 33, in run
    results = merge_hash(results, self._execute_module(tmp=tmp, task_vars=task_vars))
  File "/usr/lib/python2.7/dist-packages/ansible/plugins/action/__init__.py", line 618, in _execute_module
    self._fixup_perms2(remote_files, remote_user)
  File "/usr/lib/python2.7/dist-packages/ansible/plugins/action/__init__.py", line 395, in _fixup_perms2
    ' see https://docs.ansible.com/ansible/become.html#becoming-an-unprivileged-user'.format(res['rc'], res['stderr']))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2018' in position 29: ordinal not in range(128)

fatal: [crlg.be-cloud.be]: FAILED! => {
    "failed": true, 
    "msg": "Unexpected failure during module execution.", 
    "stdout": ""
}

λŒ€μ‹  "xxxx % s xxxx"% (res [ 'rc'], res [ 'stderr'])λ₯Ό μ‚¬μš©ν•˜μ—¬ 문제λ₯Ό ν•΄κ²°ν–ˆμŠ΅λ‹ˆλ‹€.

affects_2.2 bug python3

λͺ¨λ“  2 λŒ“κΈ€

λ‚˜λŠ” 이것이 devel에 λŒ€ν•œμ΄ μ»€λ°‹μ—μ„œ μˆ˜μ •λ˜μ—ˆλ‹€κ³  μƒκ°ν•©λ‹ˆλ‹€ : bb5d8fb476c6e42f1e89b47c00e45f8b088ae40b 및 μ—¬κΈ° stable-2.2 λΈŒλžœμΉ˜μ— 체리λ₯Ό μ„ νƒν–ˆμŠ΅λ‹ˆλ‹€ : 27be8a10222fbf7a7a4b51c642170e11f2823d39

λ‹€μŒ 2.2 λ¦΄λ¦¬μŠ€μ— 포함될 κ²ƒμž…λ‹ˆλ‹€. μ§€κΈˆ ν…ŒμŠ€νŠΈν•˜μ—¬ stable-2.2 브랜치λ₯Ό 체크 μ•„μ›ƒν•˜κ³  체크 μ•„μ›ƒμ—μ„œ μ‹€ν–‰ ν•΄ λ³Ό 수 μžˆλŠ”μ§€ ν™•μΈν•˜κ³  μ‹ΆμœΌλ©΄ μ—¬κΈ°μ—μ„œ ansible-2.2.1.0-0.2.rc2.tar.gzλ₯Ό λ‹€μš΄λ‘œλ“œ ν•˜μ‹­μ‹œμ˜€ : //releases.ansible.com/ansible/ 을 μ‚¬μš©ν•΄λ³΄μ‹­μ‹œμ˜€.

이 쀑 ν•˜λ‚˜μ— μ—¬μ „νžˆ λ¬Έμ œκ°€ μžˆλ‹€κ³ λ³΄κ³ ν•˜μ§€ μ•ŠλŠ” ν•œ λ©°μΉ  후에이 문제λ₯Ό μ’…λ£Œν•˜κ² μŠ΅λ‹ˆλ‹€. 감사!

needs_info

λ‚˜λŠ” λ‚΄ μ„€μΉ˜λ₯Ό νŒ¨μΉ˜ν–ˆκ³  이것은 λ‚˜λ₯Ό μœ„ν•΄ μž‘λ™ν•©λ‹ˆλ‹€.

감사 !!

이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰