Giter Club home page Giter Club logo

Comments (12)

s-hertel avatar s-hertel commented on June 6, 2024 1

@dcz010 I am guessing the issue in 2.7.7 was fixed by #49897 (in 2.7.9). I also wasn't able to reproduce on 2.10.8.

from ansible.

ansibot avatar ansibot commented on June 6, 2024

Files identified in the description:

None

If these files are incorrect, please update the component name section of the description or use the component bot command.

from ansible.

ansibot avatar ansibot commented on June 6, 2024

@dcz010 ansible-core 2.10 is not supported and no longer receives bug fixes. Please test against one of the supported versions of ansible-core, preferably the most recent one, to see whether the bug has been fixed.

click here for bot help

from ansible.

mkrizek avatar mkrizek commented on June 6, 2024

I was not able to reproduce the issue.

inventory:

[localhosts]                                                                                 
b ansible_connection=local                                                                   
c ansible_connection=local
a ansible_connection=local

playbook:

- hosts: localhosts
  gather_facts: false
  order: sorted                                                                                                                                                                        
  serial: 1
  tasks:
    - debug:

output:


PLAY [localhosts] ***********************************************************************************************************************************************************************

TASK [debug] ****************************************************************************************************************************************************************************
ok: [a] => {
    "msg": "Hello world!"
}

PLAY [localhosts] ***********************************************************************************************************************************************************************

TASK [debug] ****************************************************************************************************************************************************************************
ok: [b] => {
    "msg": "Hello world!"
}

PLAY [localhosts] ***********************************************************************************************************************************************************************

TASK [debug] ****************************************************************************************************************************************************************************
ok: [c] => {
    "msg": "Hello world!"
}

PLAY RECAP ******************************************************************************************************************************************************************************
a                          : ok=1    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
b                          : ok=1    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
c                          : ok=1    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

Omitting order: sorted produces the order of hosts as they are defined in the inventory.

For us to be able to move this issue forward we need a minimal and complete reproducer.

from ansible.

dcz010 avatar dcz010 commented on June 6, 2024

Hi @mkrizek
Thanks for the testing and yeah i know that the issue not happens every time.
It just happens sometimes maybe after 6-9 runs of many.
Could you just test it many times?
I would say that in 90-95% it is working like expected.

from ansible.

dcz010 avatar dcz010 commented on June 6, 2024

Here starts it with the ngx-01 and not with normally ha-01:

[ops-drupal-webserver-run-package-updates] $ ansible-playbook site.yml -l haproxy_drupal,nginx_drupal -t apt_update -f 1

PLAY [all] *********************************************************************

TASK [Gathering Facts] *********************************************************

TASK [Gathering Facts] *********************************************************
ok: [ngx-01]

TASK [apt_update : Install required packages] **********************************

TASK [apt_update : Install required packages] **********************************
ok: [ngx-01]

TASK [apt_update : Allow release info change] **********************************

TASK [apt_update : Allow release info change] **********************************
ok: [ngx-01]

TASK [apt_update : Update repositories cache] **********************************

TASK [apt_update : Update repositories cache] **********************************
ok: [ngx-01]

And normally like:

[ops-drupal-webserver-run-package-updates] $ ansible-playbook site.yml -l haproxy_drupal,nginx_drupal -t apt_update -f 1

PLAY [all] *********************************************************************

TASK [Gathering Facts] *********************************************************

TASK [Gathering Facts] *********************************************************
ok: [ha-01]

TASK [apt_update : Install required packages] **********************************

TASK [apt_update : Install required packages] **********************************
ok: [ha-01]

TASK [apt_update : Update repositories cache] **********************************

TASK [apt_update : Update repositories cache] **********************************
ok: [ha-01]

TASK [apt_update : Create list of available updates] ***************************

TASK [apt_update : Create list of available updates] ***************************
ok: [ha-01]

from ansible.

mkrizek avatar mkrizek commented on June 6, 2024

Could you just test it many times?

I just ran the playbook I provided in a shell for loop 100 times, each time the output was as expected.

For us to be able to move this issue forward we need a minimal and complete reproducer.

This still stands as you have not provided complete reproducer. The output itself is not sufficient for us to do anything about this issue unfortunately.

from ansible.

dcz010 avatar dcz010 commented on June 6, 2024

Mhm well ok.
But now i saw that the jenkins host running that playbook is using an older version of ansible than the other machine where is tested from:

ansible 2.7.7
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/xxx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0]
ansible 2.10.8
  config file = /home/xxx/bitbucket/pm-ops-ansible/ansible.cfg
  configured module search path = ['/home/xxx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110]

from ansible.

mkrizek avatar mkrizek commented on June 6, 2024

Both of those versions are unsupported and several years old, please see #83208 (comment).

from ansible.

dcz010 avatar dcz010 commented on June 6, 2024

It seems like the problem is something with the factsCache:

total 284
drwxr-xr-x 2 jenkins jenkins  4096 May  1 14:12 .
drwxr-xr-x 8 jenkins jenkins  4096 May  1 14:14 ..
-rw-r--r-- 1 jenkins jenkins 54645 May  1 14:10 pr-fe-dru-ha-01
-rw-r--r-- 1 jenkins jenkins 54183 May  1 14:12 pr-fe-dru-ha-02
-rw-r--r-- 1 jenkins jenkins 53200 May  1 14:00 pr-fe-dru-ngx-01
-rw-r--r-- 1 jenkins jenkins 53803 May  1 14:01 pr-fe-dru-ngx-02
-rw-r--r-- 1 jenkins jenkins 53802 May  1 14:06 pr-fe-dru-ngx-03

Here you can also see the order with the creation time of the folder.

Is there an option to ignore that cache?

from ansible.

dcz010 avatar dcz010 commented on June 6, 2024

But now i could reproduce it and i let the playbook with debug info run:

ansible-playbook 2.7.7
  config file = /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  executable location = /usr/bin/ansible-playbook
  python version = 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0]
Using /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/ansible.cfg as config file
Reading vault password file: /home/xxx/.vault_pass
setting up inventory plugins
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/app did not meet host_list requirements, check plugin documentation if this is unexpected
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/app did not meet script requirements, check plugin documentation if this is unexpected
Parsed /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/app inventory source with ini plugin
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/dev did not meet host_list requirements, check plugin documentation if this is unexpected
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/dev did not meet script requirements, check plugin documentation if this is unexpected
Parsed /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/dev inventory source with ini plugin
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/dns did not meet host_list requirements, check plugin documentation if this is unexpected
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/dns did not meet script requirements, check plugin documentation if this is unexpected
Parsed /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/dns inventory source with ini plugin
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/ftp did not meet host_list requirements, check plugin documentation if this is unexpected
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/ftp did not meet script requirements, check plugin documentation if this is unexpected
Parsed /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/ftp inventory source with ini plugin
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/haproxy did not meet host_list requirements, check plugin documentation if this is unexpected
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/haproxy did not meet script requirements, check plugin documentation if this is unexpected
Parsed /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/haproxy inventory source with ini plugin
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/index did not meet host_list requirements, check plugin documentation if this is unexpected
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/index did not meet script requirements, check plugin documentation if this is unexpected
Parsed /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/index inventory source with ini plugin
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/mariadb did not meet host_list requirements, check plugin documentation if this is unexpected
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/mariadb did not meet script requirements, check plugin documentation if this is unexpected
Parsed /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/mariadb inventory source with ini plugin
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/monitoring did not meet host_list requirements, check plugin documentation if this is unexpected
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/monitoring did not meet script requirements, check plugin documentation if this is unexpected
Parsed /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/monitoring inventory source with ini plugin
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/mysql did not meet host_list requirements, check plugin documentation if this is unexpected
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/mysql did not meet script requirements, check plugin documentation if this is unexpected
Parsed /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/mysql inventory source with ini plugin
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/opengate did not meet host_list requirements, check plugin documentation if this is unexpected
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/opengate did not meet script requirements, check plugin documentation if this is unexpected
Parsed /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/opengate inventory source with ini plugin
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/redis did not meet host_list requirements, check plugin documentation if this is unexpected
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/redis did not meet script requirements, check plugin documentation if this is unexpected
Parsed /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/redis inventory source with ini plugin
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/render did not meet host_list requirements, check plugin documentation if this is unexpected
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/render did not meet script requirements, check plugin documentation if this is unexpected
Parsed /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/render inventory source with ini plugin
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/service did not meet host_list requirements, check plugin documentation if this is unexpected
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/service did not meet script requirements, check plugin documentation if this is unexpected
Parsed /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/service inventory source with ini plugin
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/st did not meet host_list requirements, check plugin documentation if this is unexpected
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/st did not meet script requirements, check plugin documentation if this is unexpected
Parsed /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/st inventory source with ini plugin
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/vpn did not meet host_list requirements, check plugin documentation if this is unexpected
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/vpn did not meet script requirements, check plugin documentation if this is unexpected
Parsed /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/vpn inventory source with ini plugin
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/web did not meet host_list requirements, check plugin documentation if this is unexpected
/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/web did not meet script requirements, check plugin documentation if this is unexpected
Parsed /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/web inventory source with ini plugin
statically imported: /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/roles/common/tasks/apparmor.yml
statically imported: /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/roles/common/tasks/timezone.yml
statically imported: /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/roles/common/tasks/ntp.yml
statically imported: /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/roles/common/tasks/chrony.yml
statically imported: /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/roles/common/tasks/custom_configs.yml
statically imported: /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/roles/common/tasks/custom_dirs.yml
statically imported: /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/roles/common/tasks/debian_packages.yml
statically imported: /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/roles/common/tasks/svc_group.yml
statically imported: /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/roles/common/tasks/svc_user.yml
statically imported: /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/roles/common/tasks/sysctl.yml
statically imported: /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/roles/apt_update/tasks/apt_update_prerequisites.yml
statically imported: /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/roles/apt_update/tasks/apt_update_list_updates.yml
statically imported: /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/roles/apt_update/tasks/apt_update_remove_snapshots.yml
statically imported: /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/roles/apt_update/tasks/apt_update_create_snapshot.yml
statically imported: /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/roles/apt_update/tasks/apt_update_preaction.yml
statically imported: /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/roles/apt_update/tasks/apt_update_upgrade.yml
statically imported: /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/roles/apt_update/tasks/apt_update_postaction.yml
Loading callback plugin full_skip of type stdout, v2.0 from /usr/lib/python3/dist-packages/ansible/plugins/callback/full_skip.py

PLAYBOOK: site.yml *************************************************************************************************************************************************************************************************
1 plays in site.yml

PLAY [all] *********************************************************************************************************************************************************************************************************
META: ran handlers
Found a vault_id (default) in the vaulttext
We have a secret associated with vault id (default), will try to use to decrypt /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/group_vars/all/vault.yml
Trying to use vault secret=(FileVaultSecret(filename='/home/xxx/.vault_pass')) id=default to decrypt /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/group_vars/all/vault.yml
Trying secret FileVaultSecret(filename='/home/xxx/.vault_pass') for vault_id=default
Decrypt of "b'/usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/inventories/default/group_vars/all/vault.yml'" successful with secret=FileVaultSecret(filename='/home/xxx/.vault_pass') and vault_id=default
Using module_utils file /usr/lib/python3/dist-packages/ansible/module_utils/basic.py
Using module_utils file /usr/lib/python3/dist-packages/ansible/module_utils/_text.py
Using module_utils file /usr/lib/python3/dist-packages/ansible/module_utils/urls.py
Using module_utils file /usr/lib/python3/dist-packages/ansible/module_utils/common/__init__.py
Using module_utils file /usr/lib/python3/dist-packages/ansible/module_utils/common/_collections_compat.py
Using module_utils file /usr/lib/python3/dist-packages/ansible/module_utils/pycompat24.py
Using module_utils file /usr/lib/python3/dist-packages/ansible/module_utils/common/process.py
Using module_utils file /usr/lib/python3/dist-packages/ansible/module_utils/parsing/__init__.py
Using module_utils file /usr/lib/python3/dist-packages/ansible/module_utils/common/file.py
Using module_utils file /usr/lib/python3/dist-packages/ansible/module_utils/six/__init__.py
Using module_utils file /usr/lib/python3/dist-packages/ansible/module_utils/parsing/convert_bool.py
Using module file /usr/lib/python3/dist-packages/ansible/modules/packaging/os/apt.py
<xxx.xxx.xxx.xxx> ESTABLISH SSH CONNECTION FOR USER: packer
<xxx.xxx.xxx.xxx> SSH: ansible.cfg set ssh_args: (-o)(ForwardAgent=yes)
<xxx.xxx.xxx.xxx> SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile="/home/xxx/.ssh/packer_id_rsa")
<xxx.xxx.xxx.xxx> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<xxx.xxx.xxx.xxx> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=packer)
<xxx.xxx.xxx.xxx> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=30)
<xxx.xxx.xxx.xxx> SSH: EXEC ssh -vvv -o ForwardAgent=yes -o 'IdentityFile="/home/xxx/.ssh/packer_id_rsa"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=packer -o ConnectTimeout=30 xxx.xxx.xxx.xxx '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-wivbosyjojymnactoetfovjjdfcsiuov; /usr/bin/python'"'"'"'"'"'"'"'"' && sleep 0'"'"''
Escalation succeeded
<xxx.xxx.xxx.xxx> (0, b'\n{"invocation": {"module_args": {"dpkg_options": "force-confdef,force-confold", "autoremove": false, "force": false, "force_apt_get": false, "install_recommends": false, "package": ["aptitude"], "autoclean": false, "name": ["aptitude"], "purge": false, "allow_unauthenticated": false, "state": "present", "upgrade": null, "update_cache": true, "default_release": null, "only_upgrade": false, "deb": null, "cache_valid_time": 0}}, "changed": false, "cache_update_time": 1715767908, "cache_updated": false}\n', b'OpenSSH_8.9p1 Debian-3, OpenSSL 1.1.1n  15 Mar 2022\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files\r\ndebug1: /etc/ssh/ssh_config line 21: Applying options for *\r\ndebug2: resolve_canonicalize: hostname xxx.xxx.xxx.xxx is address\r\ndebug3: expanded UserKnownHostsFile \'~/.ssh/known_hosts\' -> \'/root/.ssh/known_hosts\'\r\ndebug3: expanded UserKnownHostsFile \'~/.ssh/known_hosts2\' -> \'/root/.ssh/known_hosts2\'\r\ndebug3: ssh_connect_direct: entering\r\ndebug1: Connecting to xxx.xxx.xxx.xxx [xxx.xxx.xxx.xxx] port 22.\r\ndebug3: set_sock_tos: set socket 3 IP_TOS 0x10\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: fd 3 clearing O_NONBLOCK\r\ndebug1: Connection established.\r\ndebug3: timeout: 30000 ms remain after connect\r\ndebug1: identity file /home/xxx/.ssh/packer_id_rsa type -1\r\ndebug1: identity file /home/xxx/.ssh/packer_id_rsa-cert type -1\r\ndebug1: Local version string SSH-2.0-OpenSSH_8.9p1 Debian-3\r\ndebug1: Remote protocol version 2.0, remote software version OpenSSH_7.9p1 Debian-10+deb10u4\r\ndebug1: compat_banner: match: OpenSSH_7.9p1 Debian-10+deb10u4 pat OpenSSH* compat 0x04000000\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug1: Authenticating to xxx.xxx.xxx.xxx:22 as \'packer\'\r\ndebug3: record_hostkey: found key type ED25519 in file /root/.ssh/known_hosts:16\r\ndebug3: record_hostkey: found key type ECDSA in file /root/.ssh/known_hosts:17\r\ndebug3: load_hostkeys_file: loaded 2 keys from xxx.xxx.xxx.xxx\r\ndebug1: load_hostkeys: fopen /root/.ssh/known_hosts2: No such file or directory\r\ndebug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory\r\ndebug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory\r\ndebug3: order_hostkeyalgs: have matching best-preference key type [email protected], using HostkeyAlgorithms verbatim\r\ndebug3: send packet: type 20\r\ndebug1: SSH2_MSG_KEXINIT sent\r\ndebug3: receive packet: type 20\r\ndebug1: SSH2_MSG_KEXINIT received\r\ndebug2: local client KEXINIT proposal\r\ndebug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,[email protected],diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,ext-info-c\r\ndebug2: host key algorithms: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],rsa-sha2-512,rsa-sha2-256\r\ndebug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]\r\ndebug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]\r\ndebug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: compression ctos: none,[email protected],zlib\r\ndebug2: compression stoc: none,[email protected],zlib\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug2: peer server KEXINIT proposal\r\ndebug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,[email protected]\r\ndebug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519\r\ndebug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]\r\ndebug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]\r\ndebug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1\r\ndebug2: compression ctos: none,[email protected]\r\ndebug2: compression stoc: none,[email protected]\r\ndebug2: languages ctos: \r\ndebug2: languages stoc: \r\ndebug2: first_kex_follows 0 \r\ndebug2: reserved 0 \r\ndebug1: kex: algorithm: curve25519-sha256\r\ndebug1: kex: host key algorithm: ssh-ed25519\r\ndebug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none\r\ndebug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none\r\ndebug3: send packet: type 30\r\ndebug1: expecting SSH2_MSG_KEX_ECDH_REPLY\r\ndebug3: receive packet: type 31\r\ndebug1: SSH2_MSG_KEX_ECDH_REPLY received\r\ndebug1: Server host key: ssh-ed25519 SHA256:6FhoXQG55MhaSNnKDz96zRhKYZCCj+xUcyyHI6EO+14\r\ndebug3: record_hostkey: found key type ED25519 in file /root/.ssh/known_hosts:16\r\ndebug3: record_hostkey: found key type ECDSA in file /root/.ssh/known_hosts:17\r\ndebug3: load_hostkeys_file: loaded 2 keys from xxx.xxx.xxx.xxx\r\ndebug1: load_hostkeys: fopen /root/.ssh/known_hosts2: No such file or directory\r\ndebug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory\r\ndebug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory\r\ndebug1: Host \'xxx.xxx.xxx.xxx\' is known and matches the ED25519 host key.\r\ndebug1: Found key in /root/.ssh/known_hosts:16\r\ndebug3: send packet: type 21\r\ndebug2: ssh_set_newkeys: mode 1\r\ndebug1: rekey out after 134217728 blocks\r\ndebug1: SSH2_MSG_NEWKEYS sent\r\ndebug1: expecting SSH2_MSG_NEWKEYS\r\ndebug3: receive packet: type 21\r\ndebug1: SSH2_MSG_NEWKEYS received\r\ndebug2: ssh_set_newkeys: mode 0\r\ndebug1: rekey in after 134217728 blocks\r\ndebug1: Will attempt key: /home/xxx/.ssh/packer_id_rsa  explicit\r\ndebug2: pubkey_prepare: done\r\ndebug3: send packet: type 5\r\ndebug3: receive packet: type 7\r\ndebug1: SSH2_MSG_EXT_INFO received\r\ndebug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>\r\ndebug3: receive packet: type 6\r\ndebug2: service_accept: ssh-userauth\r\ndebug1: SSH2_MSG_SERVICE_ACCEPT received\r\ndebug3: send packet: type 50\r\ndebug3: receive packet: type 51\r\ndebug1: Authentications that can continue: publickey,password,keyboard-interactive\r\ndebug3: start over, passed a different list publickey,password,keyboard-interactive\r\ndebug3: preferred gssapi-with-mic,gssapi-keyex,hostbased,publickey\r\ndebug3: authmethod_lookup publickey\r\ndebug3: remaining preferred: ,gssapi-keyex,hostbased,publickey\r\ndebug3: authmethod_is_enabled publickey\r\ndebug1: Next authentication method: publickey\r\ndebug1: Trying private key: /home/xxx/.ssh/packer_id_rsa\r\ndebug3: sign_and_send_pubkey: using publickey with RSA SHA256:Lkn/K9Gyok2FMczoUKcwccNEVAbWqpYK0OY+FxA2mUQ\r\ndebug3: sign_and_send_pubkey: signing using rsa-sha2-512 SHA256:Lkn/K9Gyok2FMczoUKcwccNEVAbWqpYK0OY+FxA2mUQ\r\ndebug3: send packet: type 50\r\ndebug2: we sent a publickey packet, wait for reply\r\ndebug3: receive packet: type 52\r\nAuthenticated to xxx.xxx.xxx.xxx ([xxx.xxx.xxx.xxx]:22) using "publickey".\r\ndebug2: fd 4 setting O_NONBLOCK\r\ndebug1: channel 0: new [client-session]\r\ndebug3: ssh_session2_open: channel_new: 0\r\ndebug2: channel 0: send open\r\ndebug3: send packet: type 90\r\ndebug1: Requesting [email protected]\r\ndebug3: send packet: type 80\r\ndebug1: Entering interactive session.\r\ndebug1: pledge: filesystem\r\ndebug3: receive packet: type 80\r\ndebug1: client_input_global_request: rtype [email protected] want_reply 0\r\ndebug3: client_input_hostkeys: received RSA key SHA256:6GK8azGteVYGPzwyEuZVKRtqVD1dYpXdXSdKqdYnLag\r\ndebug3: client_input_hostkeys: received ECDSA key SHA256:GfIKgyYJIJTOoix9aIA3g2bIoTX3Pq3bJUnX1dJtS4k\r\ndebug3: client_input_hostkeys: received ED25519 key SHA256:6FhoXQG55MhaSNnKDz96zRhKYZCCj+xUcyyHI6EO+14\r\ndebug1: client_input_hostkeys: searching /root/.ssh/known_hosts for xxx.xxx.xxx.xxx / (none)\r\ndebug3: hostkeys_foreach: reading file "/root/.ssh/known_hosts"\r\ndebug3: hostkeys_find: found ssh-ed25519 key at /root/.ssh/known_hosts:16\r\ndebug3: hostkeys_find: found ecdsa-sha2-nistp256 key at /root/.ssh/known_hosts:17\r\ndebug1: client_input_hostkeys: searching /root/.ssh/known_hosts2 for xxx.xxx.xxx.xxx / (none)\r\ndebug1: client_input_hostkeys: hostkeys file /root/.ssh/known_hosts2 does not exist\r\ndebug3: client_input_hostkeys: 3 server keys: 1 new, 1 retained, 1 incomplete match. 0 to remove\r\ndebug3: client_input_hostkeys: asking server to prove ownership for 1 keys\r\ndebug3: send packet: type 80\r\ndebug3: receive packet: type 4\r\ndebug1: Remote: /home/packer/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding\r\ndebug3: receive packet: type 91\r\ndebug2: channel_input_open_confirmation: channel 0: callback start\r\ndebug2: fd 3 setting TCP_NODELAY\r\ndebug3: set_sock_tos: set socket 3 IP_TOS 0x08\r\ndebug2: client_session2_setup: id 0\r\ndebug1: Sending environment.\r\ndebug3: Ignored env SHELL\r\ndebug3: Ignored env SUDO_GID\r\ndebug3: Ignored env HISTTIMEFORMAT\r\ndebug3: Ignored env SUDO_COMMAND\r\ndebug3: Ignored env SUDO_USER\r\ndebug3: Ignored env PWD\r\ndebug3: Ignored env LOGNAME\r\ndebug3: Ignored env HOME\r\ndebug1: channel 0: setting env LANG = "en_US.UTF-8"\r\ndebug2: channel 0: request env confirm 0\r\ndebug3: send packet: type 98\r\ndebug3: Ignored env LS_COLORS\r\ndebug3: Ignored env LESSCLOSE\r\ndebug3: Ignored env TERM\r\ndebug3: Ignored env LESSOPEN\r\ndebug3: Ignored env USER\r\ndebug3: Ignored env SHLVL\r\ndebug3: Ignored env PATH\r\ndebug3: Ignored env SUDO_UID\r\ndebug3: Ignored env MAIL\r\ndebug3: Ignored env OLDPWD\r\ndebug3: Ignored env _\r\ndebug1: Sending command: /bin/sh -c \'sudo -H -S -n -u root /bin/sh -c \'"\'"\'echo BECOME-SUCCESS-wivbosyjojymnactoetfovjjdfcsiuov; /usr/bin/python\'"\'"\' && sleep 0\'\r\ndebug2: channel 0: request exec confirm 1\r\ndebug3: send packet: type 98\r\ndebug2: channel_input_open_confirmation: channel 0: callback done\r\ndebug2: channel 0: open confirm rwindow 0 rmax 32768\r\ndebug3: receive packet: type 81\r\ndebug1: client_global_hostkeys_private_confirm: server used untrusted RSA signature algorithm ssh-rsa for key 0, disregarding\r\ndebug3: hostkeys_foreach: reading file "/root/.ssh/known_hosts"\r\ndebug3: host_delete: ED25519 key already at /root/.ssh/known_hosts:16\r\ndebug3: host_delete: ECDSA key already at /root/.ssh/known_hosts:17\r\ndebug1: update_known_hosts: known hosts file /root/.ssh/known_hosts2 does not exist\r\ndebug2: channel 0: rcvd adjust 2097152\r\ndebug3: receive packet: type 99\r\ndebug2: channel_input_status_confirm: type 99 id 0\r\ndebug2: exec request accepted on channel 0\r\ndebug2: channel 0: read failed rfd 4 maxlen 32768: Broken pipe\r\ndebug2: channel 0: read failed\r\ndebug2: chan_shutdown_read: channel 0: (i0 o0 sock -1 wfd 4 efd 6 [write])\r\ndebug2: channel 0: input open -> drain\r\ndebug2: channel 0: ibuf empty\r\ndebug2: channel 0: send eof\r\ndebug3: send packet: type 96\r\ndebug2: channel 0: input drain -> closed\r\ndebug2: channel 0: rcvd adjust 69632\r\ndebug3: receive packet: type 98\r\ndebug1: client_input_channel_req: channel 0 rtype exit-status reply 0\r\ndebug3: receive packet: type 96\r\ndebug2: channel 0: rcvd eof\r\ndebug2: channel 0: output open -> drain\r\ndebug2: channel 0: obuf empty\r\ndebug2: chan_shutdown_write: channel 0: (i3 o1 sock -1 wfd 5 efd 6 [write])\r\ndebug2: channel 0: output drain -> closed\r\ndebug3: receive packet: type 97\r\ndebug2: channel 0: rcvd close\r\ndebug3: channel 0: will not send data after close\r\ndebug2: channel 0: almost dead\r\ndebug2: channel 0: gc: notify user\r\ndebug2: channel 0: gc: user detached\r\ndebug2: channel 0: send close\r\ndebug3: send packet: type 97\r\ndebug2: channel 0: is dead\r\ndebug2: channel 0: garbage collecting\r\ndebug1: channel 0: free: client-session, nchannels 1\r\ndebug3: channel 0: status: The following connections are open:\r\n  #0 client-session (t4 r0 i3/0 o3/0 e[write]/0 fd -1/-1/6 sock -1 cc -1 io 0x00/0x00)\r\n\r\ndebug3: send packet: type 1\r\nTransferred: sent 108052, received 3240 bytes, in 1.8 seconds\r\nBytes per second: sent 59958.1, received 1797.9\r\ndebug1: Exit status 0\r\n')

TASK [apt_update : Install required packages] **********************************************************************************************************************************************************************
task path: /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/roles/apt_update/tasks/apt_update_prerequisites.yml:2

TASK [apt_update : Install required packages] **********************************************************************************************************************************************************************
task path: /usr/lib/jenkins/workspace/apt/ops-drupal-webserver-run-package-updates/roles/apt_update/tasks/apt_update_prerequisites.yml:2
ok: [ngx-01] => {
    "cache_update_time": 1715767908,
    "cache_updated": false,
    "changed": false,
    "invocation": {
        "module_args": {
            "allow_unauthenticated": false,
            "autoclean": false,
            "autoremove": false,
            "cache_valid_time": 0,
            "deb": null,
            "default_release": null,
            "dpkg_options": "force-confdef,force-confold",
            "force": false,
            "force_apt_get": false,
            "install_recommends": false,
            "name": [
                "aptitude"
            ],
            "only_upgrade": false,
            "package": [
                "aptitude"
            ],
            "purge": false,
            "state": "present",
            "update_cache": true,
            "upgrade": null
        }
    }
}
Using module_utils file /usr/lib/python3/dist-packages/ansible/module_utils/basic.py
Using module_utils file /usr/lib/python3/dist-packages/ansible/module_utils/_text.py
Using module_utils file /usr/lib/python3/dist-packages/ansible/module_utils/six/__init__.py
Using module_utils file /usr/lib/python3/dist-packages/ansible/module_utils/common/__init__.py
Using module_utils file /usr/lib/python3/dist-packages/ansible/module_utils/common/_collections_compat.py
Using module_utils file /usr/lib/python3/dist-packages/ansible/module_utils/pycompat24.py
Using module_utils file /usr/lib/python3/dist-packages/ansible/module_utils/common/process.py
Using module_utils file /usr/lib/python3/dist-packages/ansible/module_utils/parsing/__init__.py
Using module_utils file /usr/lib/python3/dist-packages/ansible/module_utils/common/file.py
Using module_utils file /usr/lib/python3/dist-packages/ansible/module_utils/parsing/convert_bool.py
Using module file /usr/lib/python3/dist-packages/ansible/modules/files/lineinfile.py
<xxx.xxx.xxx.xxx> ESTABLISH SSH CONNECTION FOR USER: packer
<xxx.xxx.xxx.xxx> SSH: ansible.cfg set ssh_args: (-o)(ForwardAgent=yes)
<xxx.xxx.xxx.xxx> SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile="/home/xxx/.ssh/packer_id_rsa")
<xxx.xxx.xxx.xxx> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<xxx.xxx.xxx.xxx> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=packer)
<xxx.xxx.xxx.xxx> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=30)
<xxx.xxx.xxx.xxx> SSH: EXEC ssh -vvv -o ForwardAgent=yes -o 'IdentityFile="/home/xxx/.ssh/packer_id_rsa"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=packer -o ConnectTimeout=30 xxx.xxx.xxx.xxx '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-yhpunqxwgjthdznfnojhcmtgjjzxvvqe; /usr/bin/python'"'"'"'"'"'"'"'"' && sleep 0'"'"''
Escalation succeeded

Is there anything not normal?

from ansible.

dcz010 avatar dcz010 commented on June 6, 2024

But i will then update the old machine with an new ansible version and try again.
Thanks for the help.

from ansible.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.