PDF
Download PDF
Download page Недостаточно прав при выполнении роли Ansible.
Недостаточно прав при выполнении роли Ansible
Статья является возможным решением инцидента Ошибки при взаимодействии Foreman–Ansible
Окружение
Astra Linux Special Edition 1.7 Update 7 (№ 2025-0319SE17)
Диагностика
- Проверить, что используется версия 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.retryCODE
Решение
Ответ доступен с подключенной услугой «Техническая поддержка».
Внимание! Для авторизации используйте учетные данные Личного кабинета
Если учетная запись от новой версии личного кабинета отсутствует, просим писать на почту lk@astralinux.ru
- Проверить, что используется версия 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. Перейти к решению.