Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error Install with env user at task: initialization to profile system-wide #137

Open
ricsdeol opened this issue Jun 11, 2019 · 0 comments
Open

Comments

@ricsdeol
Copy link

ricsdeol commented Jun 11, 2019

Hi, first good job with playbook.
So I'm try use this playbook withe env: true but this errors happened:

TASK [zzet.rbenv : add rbenv initialization to profile system-wide] **********************************************************************************
fatal: [rails_server]: FAILED! => {"changed": false, "checksum": "80e9fe35728856b6e7444cb0fbcc844a8424674c", "gid": 1000, "group": "deployer", "mode": "0664", "msg": "chown failed: [Errno 1] Operation not permitted: '/etc/profile.d/rbenv.sh'", "owner": "deployer", "path": "/etc/profile.d/rbenv.sh", "size": 132, "state": "file", "uid": 1000}

I was in doubt why tasks below it's necessary at user environment:

- name: add rbenv initialization to profile system-wide
  template:
    src: rbenv_user.sh.j2
    dest: /etc/profile.d/rbenv.sh
    owner: root
    group: root
    mode: 0755
  become: yes
  when:
    - (ansible_os_family != 'OpenBSD' and ansible_os_family != 'Darwin') and rbenv_user_profile

My confi roles is:

- name: Install Rails
  hosts: webserver
  gather_facts: true
  become: yes
  become_user: deployer
  vars_files:
    - vars/production.yml

  roles:
    - common
    - role: zzet.rbenv
      rbenv_users:
        - deployer
    - wkhtmltox
    - ruby_config
    - nginx_passenger
    - redis
    - memcached
    - { role: Datadog.datadog, become_user: root }

I removed this lines at ~/.ansible/roles/zzet.rbenv/tasks/user_install.yml and works.

Thank You
Bye

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

No branches or pull requests

1 participant