- name: VNC | vncserver command
shell: sudo -u {{item}} vncserver </tmp/file >/tmp/vncpasswd.1 2>/tmp/vncpasswd.2
with_items:
vnc_users - name: vncserver command
shell: vncserver </tmp/file >/tmp/vncpasswd.1 2>/tmp/vncpasswd.2
remote_user: "{{ item }}"
sudo: False
with_items:
vnc_users--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2161b393-3003-4a63-813e-48cd1c038b3d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
- name: vncserver command
shell: sudo -u {{ item.name }} -i vncserver </tmp/file >/tmp/vncpasswd.1 2>/tmp/vncpasswd.2
with_items:
vnc_users-i [command]
The -i (simulate initial login) option runs the shell specified in the passwd(5)
entry of the target user as a login shell. This means that login-specific resource
files such as .profile or .login will be read by the shell. If a command is
specified, it is passed to the shell for execution. Otherwise, an interactive shell
is executed. sudo attempts to change to that user's home directory before running
the shell. It also initializes the environment, leaving DISPLAY and TERM unchanged,
setting HOME, MAIL, SHELL, USER, LOGNAME, and PATH, as well as the contents of
/etc/environment on Linux and AIX systems. All other environment variables are
removed.