Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

unlinking failed: [Errno 13] Permission denied: '/usr/lib/systemd/system/elasticsearch.service' #463

Closed
dascritch opened this issue Jun 28, 2018 · 5 comments
Assignees

Comments

@dascritch
Copy link

dascritch commented Jun 28, 2018

Running the script is crashing by this way :

TASK [elastic.elasticsearch : Remove if it is a normal file] *******************************************************************************************************************************************************************************************************************
fatal: [search-preprod.gpdis.com]: FAILED! => {"changed": false, "gid": 0, "group": "root", "mode": "0644", "msg": "unlinking failed: [Errno 13] Permission denied: '/usr/lib/systemd/system/elasticsearch.service' ", "owner": "root", "path": "/usr/lib/systemd/system/elasticsearch.service", "size": 1663, "state": "file", "uid": 0}

I've included in our corporate playbook the roles via galaxy, we added a test server to build a future service. Server is under Debian 9.4 , its host_vars is :

---
name: Test
hosts: localhost
es_instance_name: "preprod"
es_api_basic_auth_username: "test"
es_api_basic_auth_password: "yes_i_know_this_is_just_for_test"
es_log_dir: "/var/log/elasticsearch"
roles:
  - role: elasticsearch

the /usr/bin/systemd is actually :

-rw-r--r-- 1 root root 1663 Jun 12 01:44 elasticsearch.service
-rw-r--r-- 1 root root 2119 Jun 28 10:39 preprod_elasticsearch.service
@Crazybus
Copy link
Contributor

@dascritch Thanks for reporting this. There is an open pull request fixing this bug. #461

@Crazybus Crazybus self-assigned this Jun 28, 2018
@dascritch
Copy link
Author

Great ! thank you ! I know where to correct it.

@Crazybus
Copy link
Contributor

FYI this fix is now in master and in the latest release :)

@dascritch
Copy link
Author

Yes ! I saw and it worked ! Thanks a lot !

@condescendent
Copy link

I have a similar issue for these files: for some reason, ansible file module couldn't remove these files.

  • /etc/yum.repos.d/redhat-rhui.repo
    - /etc/yum.repos.d/rhui-load-balancers.conf
    - /etc/yum.repos.d/redhat-rhui-client-config.repo
    - /etc/yum/pluginconf.d/amazon-id.conf
    - /etc/yum/pluginconf.d/rhui-lb.conf

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants