personium / ansible

Ansible files to set up a Personium unit.
Apache License 2.0
12 stars 15 forks source link

Symlink for /personium/nginx failed #135

Closed tochi-y closed 4 years ago

tochi-y commented 4 years ago

Environment

Error

TASK [Create /opt/disk1/nginx symlink] **********************************************************************************************
fatal: [127.0.0.1]: FAILED! => {"changed": false, "gid": 0, "group": "root", "mode": "0755", "msg": "refusing to convert from directory to symlink for /personium/nginx", "owner": "root", "path": "/personium/nginx", "secontext": "u`nconfined_u:object_r:default_t:s0", "size": 17, "state": "directory", "uid": 0}
tochi-y commented 4 years ago

Cause

In Ansible 2.9.10, the following line creates a home directory even with createhome=no parameter.

https://github.com/personium/ansible/blob/60413a0b73e2d870cdb0d57a09f4a34afbb6ff9d/1-server_unit/tasks/web/init_nginx_env_os.yml#L7

So the symlink creation failed since there is already a directory named /personium/nginx.