Closed morning-tan closed 1 year ago
- name: Install PyMySQL on pip2
pip:
name: PyMySQL
version: 0.10.1
extra_args: "-U"
executable: pip2
when: ansible_os_family == "RedHat" and ansible_lsb.id != "CentOSStream"
明道制作成功,但AWS重做仍出现下列提示:
TASK [role_common : Install PyMySQL on pip2] *** fatal: [54.160.232.7]: FAILED! => {"msg": "The conditional check 'ansible_lsb.id != \"CentOSStream\"' failed. The error was: error while evaluating conditional (ansible_lsb.id != \"CentOSStream\"): 'dict object' has no attribute 'id'\n\nThe error appears to be in '/tmp/20220414153743-ansible-mingdao/ansible-mingdao/roles/role_common/tasks/RedHat.yml': line 99, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Install PyMySQL on pip2\n ^ here\n"}