我有一个项目roles/requirements.yml
和collections/requirements.yml
。这 - 我认为 - 根据 AWX / Tower 指南。
在项目更新roles/requirements.yml
时成功获取,但collections/requirements.yml
失败并显示典型的 Ansible 错误消息,不幸的是,这并不能帮助我理解出了什么问题。
PLAY [Update source tree if necessary] *****************************************
TASK [delete project directory before update] **********************************
changed: [localhost]
TASK [update project using git] ************************************************
changed: [localhost]
TASK [Set the git repository version] ******************************************
ok: [localhost]
TASK [Repository Version] ******************************************************
ok: [localhost] => {
"msg": "Repository Version 812a488b0a09f7fda6a784a8247abaf6892e1f13"
}
PLAY [Install content with ansible-galaxy command if necessary] ****************
TASK [detect roles/requirements.(yml/yaml)] ************************************
ok: [localhost] => (item={'ext': '.yml'})
ok: [localhost] => (item={'ext': '.yaml'})
TASK [fetch galaxy roles from requirements.(yml/yaml)] *************************
changed: [localhost] => (item={'changed': False, 'stat': {'exists': True, 'path': '/var/lib/awx/projects/_6__c2/roles/requirements.yml', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 0, 'gid': 0, 'size': 390, 'inode': 131356, 'dev': 64771, 'nlink': 1, 'atime': 1613038457.4215767, 'mtime': 1613038456.678576, 'ctime': 1613038456.678576, 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False, 'blocks': 8, 'block_size': 4096, 'device_type': 0, 'readable': True, 'writeable': True, 'executable': False, 'pw_name': 'root', 'gr_name': 'root', 'checksum': '29ae537db56b12b54f2eecb8668f4185b7b1e91d', 'mimetype': 'text/plain', 'charset': 'us-ascii', 'version': None, 'attributes': [], 'attr_flags': ''}, 'invocation': {'module_args': {'path': '/var/lib/awx/projects/_6__c2/roles/requirements.yml', 'follow': False, 'get_md5'…
skipping: [localhost] => (item={'changed': False, 'stat': {'exists': False}, 'invocation': {'module_args': {'path': '/var/lib/awx/projects/_6__c2/roles/requirements.yaml', 'follow': False, 'get_md5': False, 'get_checksum': True, 'get_mime': True, 'get_attributes': True, 'checksum_algorithm': 'sha1'}}, 'failed': False, 'item': {'ext': '.yaml'}, 'ansible_loop_var': 'item'})
TASK [detect collections/requirements.(yml/yaml)] ******************************
ok: [localhost] => (item={'ext': '.yml'})
ok: [localhost] => (item={'ext': '.yaml'})
TASK [fetch galaxy collections from collections/requirements.(yml/yaml)] *******
failed: [localhost] (item={'changed': False, 'stat': {'exists': True, 'path': '/var/lib/awx/projects/_6__c2/collections/requirements.yml', 'mode': '0644', 'isdir': False, 'ischr': False, 'isblk': False, 'isreg': True, 'isfifo': False, 'islnk': False, 'issock': False, 'uid': 0, 'gid': 0, 'size': 183, 'inode': 131286, 'dev': 64771, 'nlink': 1, 'atime': 1613038457.4195766, 'mtime': 1613038456.673576, 'ctime': 1613038456.673576, 'wusr': True, 'rusr': True, 'xusr': False, 'wgrp': False, 'rgrp': True, 'xgrp': False, 'woth': False, 'roth': True, 'xoth': False, 'isuid': False, 'isgid': False, 'blocks': 8, 'block_size': 4096, 'device_type': 0, 'readable': True, 'writeable': True, 'executable': False, 'pw_name': 'root', 'gr_name': 'root', 'checksum': '7b8e2a2b64c7d5e64917b548dc40347158f8bb1b', 'mimetype': 'text/plain', 'charset': 'us-ascii', 'version': None, 'attributes': [], 'attr_flags': ''}, 'invocation': {'module_args': {'path': '/var/lib/awx/projects/_6__c2/collections/requirements.yml', 'follow': False, '…
skipping: [localhost] => (item={'changed': False, 'stat': {'exists': False}, 'invocation': {'module_args': {'path': '/var/lib/awx/projects/_6__c2/collections/requirements.yaml', 'follow': False, 'get_md5': False, 'get_checksum': True, 'get_mime': True, 'get_attributes': True, 'checksum_algorithm': 'sha1'}}, 'failed': False, 'item': {'ext': '.yaml'}, 'ansible_loop_var': 'item'})
当然,我在本地测试了需求。有用。只是不在 AWX 中。
除了状态为失败的一项任务外,我真的看不出失败的错误消息和获取角色时的成功日志记录之间有任何区别。
这里有什么问题?