Accessing lxc containers via non-root user / vagrant
by Hartmut Goebel
Hi,
I'm using debops and lxc on vagrant-manages boxes. The "vagrant ansible
integration" plugin (vai) enables accessing the machines and by passing
some variables for the containers I can access the containers.
Anyhow, lxc_ssh requires to execute lxc-attach as root.
Thus I"m seeking either
1) How to make lxc_ssh support ‘become’?
2) Add the ssh-key of user "vagrant" to the authorized keys in the machine?
The key is in .vagrant/machines/{{hostname}}/virtualbox/private_key
Debian 11.5
debops stable-2.3 head (d05c00e2f43790ff6)
ansible-6.5.0 with ansible_core-2.13.5
--
Regards
Hartmut Goebel
| Hartmut Goebel |h.goebel(a)crazy-compilers.com |
|www.crazy-compilers.com | compilers which you thought are impossible |
1 year, 11 months
apt update fails - The repository does not have a Release file
by Hartmut Goebel
Hi,
when trying to bootstrap a Debian 11.5 box, task “apt : Update APT
cache“ fails with:
E:The repository ''https://security.debian.org/debian-security
bullseye Release'' does not have a Release file
Debian 11.5
debops stable-2.3 head (d05c00e2f43790ff6)
ansible-6.5.0 with ansible_core-2.13.5
Any ideas how to solve this?
*Original content of **sources.list*
vagrant@bc1:/etc/apt$ cat sources.list.dpkg-divert
deb https://deb.debian.org/debian bullseye main
deb-src https://deb.debian.org/debian bullseye main
deb https://security.debian.org/debian-security bullseye-security main
deb-src https://security.debian.org/debian-security bullseye-security main
deb https://deb.debian.org/debian bullseye-updates main
deb-src https://deb.debian.org/debian bullseye-updates main
deb https://deb.debian.org/debian bullseye-backports main
deb-src https://deb.debian.org/debian bullseye-backports main
*Updated content of **sources.list ***
vagrant@bc1:/etc/apt$ cat sources.list
# This file is managed remotely, all changes will be lost
deb http://mirror1.infomaniak.com/debian/ bullseye main
deb http://mirror1.infomaniak.com/debian/ bullseye-updates main
deb http://mirror1.infomaniak.com/debian/ bullseye-backports main
# Original APT package sources gathered by Ansible
deb https://deb.debian.org/debian bullseye main
deb https://deb.debian.org/debian bullseye-updates main
deb https://deb.debian.org/debian bullseye-backports main
deb https://security.debian.org/debian-security bullseye main
deb https://security.debian.org/debian-security bullseye-updates main
deb https://security.debian.org/debian-security bullseye-backports main
# Official Debian repositories
deb http://deb.debian.org/debian bullseye main
deb http://deb.debian.org/debian bullseye-updates main
deb http://deb.debian.org/debian bullseye-backports main
# Debian Security repository
deb http://security.debian.org/ bullseye-security main
*Details output of playbook run*
$ ./.venv/bin/debops bootstrap -u root
Running Ansible playbooks:
.venv/src/debops/ansible/playbooks/bootstrap.yml
PLAY [Bootstrap Python support on a host]
**************************************
…
PLAY [Bootstrap APT configuration on a host]
***********************************
TASK [Gathering Facts]
*********************************************************
…
TASK [apt : Ensure that APT default configuration is absent]
*******************
…
TASK [apt : Generate APT configuration files]
**********************************
changed: [bc1] => (item=etc/apt/apt.conf.d/25no-recommends.conf)
TASK [apt : Check current APT diversions]
**************************************
…
TASK [apt : Divert original /etc/apt/sources.list]
*****************************
…
TASK [apt : Configure APT distribution sources]
********************************
changed: [bc1]
FAILED - RETRYING: [bc1]: Update APT cache (3 retries left).
FAILED - RETRYING: [bc1]: Update APT cache (2 retries left).
FAILED - RETRYING: [bc1]: Update APT cache (1 retries left).
TASK [apt : Update APT cache]
**************************************************
fatal: [bc1]: FAILED! => changed=false
attempts: 3
msg: 'Failed to update apt cache: E:The repository
''https://security.debian.org/debian-security bullseye Release'' does
not have a Release file., W:Updating from such a repository can''t be
done securely, and is therefore disabled by default., W:See
apt-secure(8) manpage for repository creation and user configuration
details., E:The repository ''https://security.debian.org/debian-security
bullseye-updates Release'' does not have a Release file., W:Updating
from such a repository can''t be done securely, and is therefore
disabled by default., W:See apt-secure(8) manpage for repository
creation and user configuration details., E:The repository
''https://security.debian.org/debian-security bullseye-backports
Release'' does not have a Release file., W:Updating from such a
repository can''t be done securely, and is therefore disabled by
default., W:See apt-secure(8) manpage for repository creation and user
configuration details., W:Target Packages (main/binary-amd64/Packages)
is configured multiple
times in /etc/apt/sources.list:8 and /etc/apt/sources.list:16,
W:Target Packages (main/binary-all/Packages) is configured multiple
times in /etc/apt/sources.list:8 and /etc/apt/sources.list:16, W:Target
Translations (main/i18n/Translation-en) is configured multiple times in
/etc/apt/sources.list:8 and /etc/apt/sources.list:16, W:Target Packages
(main/binary-amd64/Packages) is configured multiple times in
/etc/apt/sources.list:9 and /etc/apt/sources.list:17, W:Target Packages
(main/binary-all/Packages) is configured multiple times in
/etc/apt/sources.list:9 and /etc/apt/sources.list:17, W:Target
Translations (main/i18n/Translation-en) is configured multiple times in
/etc/apt/sources.list:9 and /etc/apt/sources.list:17, W:Target Packages
(main/binary-amd64/Packages) is configured multiple times in
/etc/apt/sources.list:10 and /etc/apt/sources.list:18, W:Target Packages
(main/binary-all/Packages) is configured multiple times in
/etc/apt/sources.list:10 and /etc/apt/sources.list:18, W:Target
Translations (main/i18n/Translation-en) is configured multiple
times in /etc/apt/sources.list:10 and /etc/apt/sources.list:18'
--
Regards
Hartmut Goebel
| Hartmut Goebel |h.goebel(a)crazy-compilers.com |
|www.crazy-compilers.com | compilers which you thought are impossible |
1 year, 11 months