При добавлении репозитория может возникнуть ошибка такого вида:
1 2 3 4 5 6 7 8 9 |
{ "_ansible_parsed": false, "_ansible_no_log": false, "module_stderr": "Shared connection to sus-test-02.equifax.local closed.\r\n", "changed": false, "module_stdout": "\r\nTraceback (most recent call last):\r\n File \"/home/domain.local/user/.ansible/tmp/ansible-tmp-1554129148.1-245102178777113/AnsiballZ_apt_repository.py\", line 113, in <module>\r\n _ansiballz_main()\r\n File \"/home/EQUIFAX.local/sus/.ansible/tmp/ansible-tmp-1554129148.1-245102178777113/AnsiballZ_apt_repository.py\", line 105, in _ansiballz_main\r\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n File \"/home/EQUIFAX.local/sus/.ansible/tmp/ansible-tmp-1554129148.1-245102178777113/AnsiballZ_apt_repository.py\", line 48, in invoke_module\r\n imp.load_module('__main__', mod, module, MOD_DESC)\r\n File \"/tmp/ansible_apt_repository_payload_thxOuP/__main__.py\", line 550, in <module>\r\n File \"/tmp/ansible_apt_repository_payload_thxOuP/__main__.py\", line 542, in main\r\n File \"/usr/lib/python2.7/dist-packages/apt/cache.py\", line 466, in update\r\n raise FetchFailedException()\r\napt.cache.FetchFailedException\r\n", "rc": 1, "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error" } |
Решается добавлением update_cache: no пример:
1 2 3 4 |
- name: PHP | Add repo apt_repository: repo: deb https://packages.sury.org/php/ stretch main update_cache: no |
После не забудьте обновить apt:
1 2 3 4 |
- name: PHP | Update and upgrade apt apt: upgrade: yes update_cache: yes |