LINUX.ORG.RU

Создать LXC в Proxmox через Ansible

 , ,


0

1

Доброго времени суток всем!
Не могу создать LXC в Proxmox через плейбук Ansible.
Плейбук:

-name: Create LXC
  proxmox:
    node: PVE-03
    api_user: root@pam
    api_password: password
    api_host: 192.168.254.23
    password: 11111
    hostname: ans
    ostemplate: data:vztmpl/debian-9.0-standard_9.5-1_amd64.ta
Выхлоп:
The full traceback is:
WARNING: The below traceback may *not* be related to the actual failure.
  File "/tmp/ansible_proxmox_payload_oiGj7T/__main__.py", line 482, in main
    proxmox = ProxmoxAPI(api_host, user=api_user, password=api_password, verify_ssl=validate_certs)
  File "/usr/lib/python2.7/dist-packages/proxmoxer/core.py", line 106, in __init__
    self._backend = importlib.import_module('.backends.%s' % backend, 'proxmoxer').Backend(host, **kwargs)
  File "/usr/lib/python2.7/dist-packages/proxmoxer/backends/https.py", line 125, in __init__
    self.auth = ProxmoxHTTPAuth(self.base_url, user, password, verify_ssl)
  File "/usr/lib/python2.7/dist-packages/proxmoxer/backends/https.py", line 46, in __init__
    raise AuthenticationError("Couldn't authenticate user: {0} to {1}".format(username, base_url + "/access/ticket"))

fatal: [192.168.254.23]: FAILED! => {
    "changed": false, 
    "invocation": {
        "module_args": {
            "api_host": "192.168.254.23", 
            "api_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", 
            "api_user": "********@pam", 
            "cores": 1, 
            "cpus": 1, 
            "cpuunits": 1000, 
            "disk": "3", 
            "force": false, 
            "hostname": "ans", 
            "ip_address": null, 
            "memory": 512, 
            "mounts": null, 
            "nameserver": null, 
            "netif": null, 
            "node": "PVE-03", 
            "onboot": false, 
            "ostemplate": "data:vztmpl/debian-9.0-standard_9.5-1_amd64.tar.gz", 
            "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", 
            "pool": null, 
            "pubkey": null, 
            "searchdomain": null, 
            "state": "present", 
            "storage": "local", 
            "swap": 0, 
            "timeout": 30, 
            "unprivileged": false, 
            "validate_certs": false, 
            "vmid": null
        }
    }, 
    "msg": "authorization on proxmox cluster failed with exception: Couldn't authenticate user: ********@pam to https://192.168.254.23:8006/api2/json/access/ticket"
}
Ansible обновил до 2.7, на ноде Proxmox установлен python-proxmoxer 1.0.3.

Выхлоп syslog:

Jan 09 16:31:35 2653-PVE-03 sshd[4172]: Accepted password for root from 192.168.254.10 port 37184 ssh2
Jan 09 16:31:35 2653-PVE-03 sshd[4172]: pam_unix(sshd:session): session opened for user root by (uid=0)
Jan 09 16:31:35 2653-PVE-03 systemd[1]: Created slice User Slice of root.
Jan 09 16:31:35 2653-PVE-03 systemd[1]: Starting User Manager for UID 0...
Jan 09 16:31:35 2653-PVE-03 systemd[4174]: PAM unable to dlopen(pam_unix.so): /lib/security/pam_unix.so: cannot open shared object file: No such file or directory
Jan 09 16:31:35 2653-PVE-03 systemd[4174]: PAM adding faulty module: pam_unix.so
Jan 09 16:31:35 2653-PVE-03 systemd-logind[795]: New session 320 of user root.
Jan 09 16:31:35 2653-PVE-03 systemd[1]: Started Session 320 of user root.
Jan 09 16:31:35 2653-PVE-03 systemd[4174]: user@0.service: Failed at step PAM spawning /lib/systemd/systemd: Operation not permitted
Jan 09 16:31:35 2653-PVE-03 systemd[1]: Started User Manager for UID 0.
Jan 09 16:31:35 2653-PVE-03 ansible-proxmox[4218]: Invoked with force=False cpus=1 ostemplate=None unprivileged=False disk=3 searchdomain=None api_user= hostname=None storage=local state=started swap=0 memory=512 pubkey=None node=None cpuunits=1000 api_password=NOT_LOGGING_PARAMETER password=NOT_LOGGING_PARAMETER ip_address=None pool=None api_host=192.168.254.23 netif=None vmid=114 timeout=30 mounts=None cores=1 nameserver=None validate_certs=False onboot=False
Jan 09 16:31:36 2653-PVE-03 IPCC.xs[11319]: PAM unable to dlopen(pam_unix.so): /lib/security/pam_unix.so: невозможно открыть разделяемый объектный файл: Нет такого файла или каталога
Jan 09 16:31:36 2653-PVE-03 IPCC.xs[11319]: PAM adding faulty module: pam_unix.so
Jan 09 16:31:36 2653-PVE-03 pvedaemon[11319]: authentication failure; rhost=192.168.254.23 user=root@pam msg=Сбой при проверке подлинности



Последнее исправление: speed_vm (всего исправлений: 2)

Начнём с очевидного: юзер ********@pam существует ?
Не перепутал его с @pve, например ?

Deleted
()
Ответ на: комментарий от Deleted

Существует. Это root@pam. Под ним через web захожу.

speed_vm
() автор топика

apt full-upgrade на Proxmox спасло отца русской демократии.

speed_vm
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.