Skip to content

The role infra.aap_utilities.aap_remove failed at the task remove added users #254

Open
@ducke

Description

Summary

The role infra.aap_utilities.aap_remove failed at the task remove added users

Issue Type

  • Bug Report

Ansible, Collection, Docker/Podman details

ansible --version
ansible [core 2.16.3]
  config file = /home/xxx/ansible.cfg
  configured module search path = ['/home/xxx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.12/site-packages/ansible
  ansible collection location = /home/xxx/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.12.3 (main, Jun 19 2024, 10:06:03) [GCC 8.5.0 20210514 (Red Hat 8.5.0-22)] (/usr/bin/python3.12)
  jinja version = 3.1.2
  libyaml = True
ansible-galaxy collection list

# /home/xxx/.ansible/collections/ansible_collections
Collection          Version
------------------- -------
ansible.posix       1.5.4
community.crypto    2.16.0
community.general   8.0.2
infra.aap_utilities 2.5.2
  • ansible installation method: OS package

OS / ENVIRONMENT

Desired Behavior

The role delete all users without error

Actual Behavior

image

After manual deleting the awx user with

sudo userdel -r -f awx

works the role as expected.

failed: [XXX] (item=awx) => {"ansible_loop_var": "item", "changed": false, "item": "awx", "msg": "userdel: user awx is currently used by process 972\n", "name": "awx", "rc": 8}
failed: [XXX] (item=awx) => {"ansible_loop_var": "item", "changed": false, "item": "awx", "msg": "userdel: user awx is currently used by process 974\n", "name": "awx", "rc": 8}
failed: [XXX] (item=awx) => {"ansible_loop_var": "item", "changed": false, "item": "awx", "msg": "userdel: user awx is currently used by process 81430\n", "name": "awx", "rc": 8}

The process was systemd.

STEPS TO REPRODUCE

---
- name: Playbook to configure ansible automation platform installation
  hosts: all
  tasks:
    - name: Include aap_setup_install role
      ansible.builtin.include_role:
        name: infra.aap_utilities.aap_setup_install
      when: inventory_hostname in groups["install_host"]

    - name: Include aap_setup_install role
      ansible.builtin.include_role:
        name: infra.aap_utilities.aap_setup_install

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingnew

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions