Ошибки при взаимодействии Foreman–Ansible
Проблема
Ошибки при взаимодействии Foreman–Ansible.
Диагностика
- Проверить, что при выполнении роли Ansible через Foreman появляются ошибки вида:
Failed to initialize: Foreman::Exception - ERF42-4263 [Foreman::Exception]: ERF42-9419 [Foreman::Exception]: The smart proxy task 38d2a066-ab50-4402-a161-5ed1a84b6361 failed. Failed to initialize: Foreman::Exception - ERF42-9242 [Foreman::Exception]: ERF42-7221 [Foreman::Exception]: The smart proxy task 5b606491-a1c6-4097-88d1-b393f634d3c2 failed.
Возможная причина: Кириллические символы в роли Ansible. Перейти к решению.
- Проверить, что используется версия Astra Linux Special Edition уровня защищенности "Воронеж" или выше.
- Проверить, что при выполнении роли Ansible появляется ошибка вида:
TASK [test : ansible user] ***************************************************** ok: [master.astra.lan] => ansible_user: root TASK [test : ansible become user] ********************************************** ok: [master.astra.lan] => ansible_become_user: root TASK [test : ansible become method] ******************************************** ok: [master.astra.lan] => ansible_become_method: sudo TASK [test : pdp-id] *********************************************************** changed: [master.astra.lan] TASK [test : debug pdp-id] ***************************************************** ok: [master.astra.lan] => pdpid.stdout: |2- .=0(_0), :0(), =0x0() =() TASK [test : apt update] ******************************************************* fatal: [master.astra.lan]: FAILED! => changed=false cmd: apt-get install --no-install-recommends python-apt -y -q msg: 'E: Sub-process /usr/bin/dpkg returned an error code (1)' rc: 100 stderr: |- E: Sub-process /usr/bin/dpkg returned an error code (1) stderr_lines: - 'E: Sub-process /usr/bin/dpkg returned an error code (1)' stdout: |- Reading package lists... Building dependency tree... Reading state information... The following packages were automatically installed and are no longer required: dnsmasq libdc1394-22 libhdf5-103 libhdf5-fortran-102 libhdf5-hl-fortran-100 libhdf5-opensmpi-103 libhdf5-openmpi-fortran-102 libhdf5-opensmpi-hl-100 libhdf5-openmpi-hl-fortran-100 liblibvenedia64 libopencv-calib3d3.2 libopencv-contrib3.2 libopencv-core3.2 libopencv-features2d3.2 libopencv-flann3.2 libopencv-highgui3.2 libopencv-imgcodecs3.2 libopencv-imgproc3.2 libopencv-ml3.2 libopencv-objdetect3.2 libopencv-photo3.2 libopencv-shape3.2 libopencv-stitching3.2 libopencv-superres3.2 libopencv-video3.2 libopencv-videoio3.2 libopencv-videostab3.2 libopencv-viz3.2 libopts25 libplacebo72 libplymouthd libSDL-image2.2 libsnmp30 libvulkan1 libupe-1.0-1 libupbackend-fdo-1.0-1 libxcb-util0 Use "apt autoremove" to remove them The following additional packages will be installed: python-apt-common Suggested packages: python-apt-dbg python-apt-doc The following NEW packages will be installed: python-apt python-apt-common 0 upgraded, 2 newly installed, 0 to remove and 1 not upgraded. Need to get 0 B/218 kB of archives. After this operation, 1308 kB of additional disk space will be used. dpkg-deb (subprocess): failed to create directory: Permission denied dpkg-deb: error: tar subprocess returned error exit status 2 dpkg: error processing archive /var/cache/apt/archives/python-apt-common_1.8.4.3+c1202309111239+astral+b1_all.deb (--unpack): dpkg-deb --control subprocess returned error exit status 2 dpkg-deb (subprocess): failed to create directory: Permission denied dpkg-deb: error: tar subprocess returned error exit status 2 dpkg: error processing archive /var/cache/apt/archives/python-apt_1.8.4.3+ci202309111239+astral+b1_and6d.deb (--unpack): dpkg-deb --control subprocess returned error exit status 2 Errors were encountered while processing: /var/cache/apt/archives/python-apt-common_1.8.4.3+ci202309111239+astral+b1_all.deb /var/cache/apt/archives/python-apt_1.8.4.3+ci202309111239+astral+b1_and6d.deb stdout_lines: <omitted> to retry, use: --limit @/tmp/foreman-playbook-d2a34e06-bS9e-46e1-8290-dad6986998a3.retry
Возможная причина: Недостаточно прав при выполнении роли Ansible. Перейти к решению.