moovs/docker-with-ansible

Is it possible to use bash envs instead of using ansible variables

Opened this issue · 0 comments

Here you used Ansible variables instead of using $USER, why? Is not it possible to use old $USER?

I know we can do this:

- name: Add current user to "docker" group
  shell: chmod -aG docker $USER
  tags: 
    - docker
    - chmod-current-user-group

But I am wondered if this is possible:

- name: Add remote "ubuntu" user to "docker" group
  user:
    name: "$USER"
    group: "docker"
    append: yes
  tags:
    - docker
    - add-current-user-to-docker-group