I have this TASK which fails with
TASK [etcd : create directories] *****************************************************************************************************
failed: [dvzsn-rd5428.ref.dbinfra.portal.cn-mv.de] (item=/opt/custom/etcd/install/test_ansible) => {"ansible_loop_var": "item", "changed": false, "gid": 50000, "group": "etcd", "item": "/opt/custom/etcd/install/test_ansible", "mode": "0755", "msg": "chown failed: failed to look up user etdcd", "owner": "etcd", "path": "/opt/custom/etcd/install/test_ansible", "secontext": "unconfined_u:object_r:usr_t:s0", "size": 6, "state": "directory", "uid": 50000}
- name: create directories
ansible.builtin.file:
path: "{{ item }}"
owner: etdcd
group: etdcd
mode: 0700
state: directory
become: true
become_user: etcd
loop:
- "{{ etcd_install }}"
- "{{ etcd_conf_dir }}"
however the user
and group
do actually exist locally
etcd@dvzsn-rd5428:/opt/custom/etcd> grep etcd /etc/{passwd,group}
/etc/passwd:etcd:x:50000:50000:etcd User:/home/etcd:/bin/bash
/etc/group:etcd:x:50000:
/etc/group:etcdadm:x:45096:etcd,user1,user2, ...
what is the mistake I am apparently making here?
I suspect selinux being involved.