Hi,
My ansible version is:
ansible 2.1.0 (devel a584ab3
) last updated 2016/02/02 12:07:20 (GMT +300)
I have a defined role with a tasks file which includes creation of a symbolic link to a directory with owner and group attributes set to a specific user. When I execute the playbook, the symlink is created but I cannot access it with root user. The issue does not appear when I create it with an ad-hoc command. What is wrong with my setup?
role’s vars:
ansible_user: root
service_name: tomcat
install_dir: /tmp
major_version: 8
full_version: "{{ major_version }}.0.30"
the task in the role’s tasks file:
- name: Create symlink tomcat home dir
file:
path: "{{ install_dir }}/tomcat"
src: "{{ install_dir }}/apache-tomcat-{{ full_version }}"
state: link
owner: tomcat
group: tomcat
root@system# cd /tmp/tomcat
-bash: cd: /tmp/tomcat: Permission denied