Skip to content

inventory_update.sh crashes with "[Errno13] Permission denied" error #7

@druwoldt

Description

@druwoldt

I login as standard user account.
mkdir ~/rhis
cd ~/rhis
git clone https://github.com/parmstro/rhis-builder-inventory
cd ~/rhis/rhis-builder-inventory
vi inventory_basevars.yml
Save file
Run ./inventory_update.sh
I get the following error

TASK [Create rhis-builder-inventory configuration directory for local.org] *****
fatal: [localhost]: FAILED! => {"changed": false, "msg": "There was an issue creating local.org as requested: [Errno 13] Permission denied: b'local.org'", "path": "local.org"}
PLAY RECAP *********************************************************************
localhost : ok=3 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

If I create ~/rhis/rhis-builder-inventory/local.org and run inventory_update.sh again I get the following error

TASK [Sync directory with rsync (excluding jinja templates)] *******************
fatal: [localhost]: FAILED! => {"changed": false, "cmd": "/usr/bin/rsync --delay-updates -F --compress --delete-after --archive --exclude=.j2 --exclude=host_vars --out-format='<>%i %n%L' /rhis/external_inventory/inventory_template/ /rhis/external_inventory/local.org/", "msg": "rsync: [generator] failed to set times on "/rhis/external_inventory/local.org/.": Operation not permitted (1)\nrsync: [generator] recv_generator: mkdir "/rhis/external_inventory/local.org/external_tasks" failed: Permission denied (13)\n** Skipping any contents from this failed directory \nrsync: [generator] recv_generator: mkdir "/rhis/external_inventory/local.org/files" failed: Permission denied (13)\n Skipping any contents from this failed directory \nrsync: [generator] recv_generator: mkdir "/rhis/external_inventory/local.org/group_vars" failed: Permission denied (13)\n Skipping any contents from this failed directory \nrsync: [generator] recv_generator: mkdir "/rhis/external_inventory/local.org/inventory" failed: Permission denied (13)\n Skipping any contents from this failed directory \nrsync: [generator] recv_generator: mkdir "/rhis/external_inventory/local.org/scripts" failed: Permission denied (13)\n Skipping any contents from this failed directory \nrsync: [generator] recv_generator: mkdir "/rhis/external_inventory/local.org/templates" failed: Permission denied (13)\n Skipping any contents from this failed directory \nrsync: [generator] recv_generator: mkdir "/rhis/external_inventory/local.org/vars" failed: Permission denied (13)\n Skipping any contents from this failed directory \nrsync: [generator] recv_generator: mkdir "/rhis/external_inventory/local.org/vault_SAMPLES" failed: Permission denied (13)\n Skipping any contents from this failed directory ***\nrsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.4.1]\n", "rc": 23}
PLAY RECAP *********************************************************************
localhost : ok=12 changed=0 unreachable=0 failed=1 skipped=1 rescued=0 ignored=0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions