Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keycloak_quarkus: Permissions issue on controller-side install package #125

Closed
aph3rson opened this issue Oct 30, 2023 · 1 comment · Fixed by #184
Closed

keycloak_quarkus: Permissions issue on controller-side install package #125

aph3rson opened this issue Oct 30, 2023 · 1 comment · Fixed by #184
Labels
good first issue Good for newcomers question Further information is requested

Comments

@aph3rson
Copy link

SUMMARY

When installing onto a remote node, the locally-created ZIP file appears to be created as root.
It's unclear why this is the case - Ansible is not running as root on the controller node.

ISSUE TYPE
  • Bug Report
ANSIBLE VERSION
ansible [core 2.15.5]
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.10/dist-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] (/usr/bin/python3)
  jinja version = 3.0.3
  libyaml = True
COLLECTION VERSION
# /home/ubuntu/.ansible/collections/ansible_collections
Collection                     Version
------------------------------ -------
community.general              7.5.0  
freeipa.ansible_freeipa        1.11.1 
middleware_automation.common   1.1.4  
middleware_automation.keycloak 1.3.0  
STEPS TO REPRODUCE
- name: Provision Keycloak
  hosts: keycloak
  # We gather facts after our VM comes up
  gather_facts: false
  tasks:
    - name: Wait for SSH connectivity
      ansible.builtin.wait_for_connection:
    - name: Gathering Facts
      ansible.builtin.setup:
    - name: Install QEMU Guest Agent
      become: true
      ansible.builtin.yum:
        name:
          - qemu-guest-agent
    - name: Install Keycloak
      vars:
        keycloak_quarkus_admin_pass: "{{ lookup('ansible.builtin.password', hostvars.localhost.keycloak_dir.path + '/keycloak_admin_password') }}"
      ansible.builtin.include_role:
        name: middleware_automation.keycloak.keycloak_quarkus
EXPECTED RESULTS

I expected the installation to continue.

ACTUAL RESULTS

The installation fails, with a permissions issue on the locally-copied ZIP file.
The file itself is owned by root:root.

TASK [middleware_automation.keycloak.keycloak_quarkus : Copy archive to target nodes] ***
fatal: [keycloak]: FAILED! => {"msg": "an error occurred while trying to read the file '/home/ubuntu/keycloak-22.0.3.zip': [Errno 13] Permission denied: b'/home/ubuntu/keycloak-22.0.3.zip'. [Errno 13] Permission denied: b'/home/ubuntu/keycloak-22.0.3.zip'"}
@guidograzioli guidograzioli added the good first issue Good for newcomers label Nov 20, 2023
@guidograzioli
Copy link
Member

Hello and thanks for reporting; I tried to reproduce the problem several times, but the download was always owned by the user running the playbook on the controller host. Did you try to delete the file and re-run? Can you provide the output of the playbook up the error while passing -vvv to ansible-playbook?

@guidograzioli guidograzioli added the question Further information is requested label Dec 5, 2023
avskor added a commit to avskor/keycloak that referenced this issue Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants