--
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 view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAOLfK3VTp8dU%3DzBhL%3Dy%3DSuF1ZcQ5wh3gVPEK3xNMc24yvG4kKg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CALF5A-JHVF9_tTRWA71zGOe552VuEpDaJrY55PuOfxK8BH0Pyg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAOLfK3VF0MJE1zF-3OOrhDkSxfQGsj9ORbiu%2BTGVj6mJgB%3DX9w%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CALF5A-LM62C_pQYhkhjT6g20fiXqZJH1qJzos0Odyjk4mCxXSw%40mail.gmail.com.
Here are the two tasks:-name: get editor realpath
shell: realpath /usr/bin/editor
register: editor_realpath
changed_when: False
tags:
- vim
-
name: set editor to vim
command: update-alternatives --set editor /usr/bin/vim.nox
when: editor_realpath.stdout != '/usr/bin/vim.nox'
tags:- vimI guess I'd like the "set editor to vim" task to be "OK" if it is already set to vim, but it is showing up as "skipped".
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAOLfK3WVPOjT2nV5vs1X9bOq5oPcowYtR2MdDbUk%3Dj%3D1xXW2kQ%40mail.gmail.com.
On Tue, Sep 26, 2023 at 6:17 PM 'Matt Zagrabelny' via Ansible Project <ansible...@googlegroups.com> wrote:Here are the two tasks:-name: get editor realpath
shell: realpath /usr/bin/editorUse `command` here instead of `shell`
register: editor_realpath
changed_when: False
tags:
- vim
-
name: set editor to vim
command: update-alternatives --set editor /usr/bin/vim.nox
when: editor_realpath.stdout != '/usr/bin/vim.nox'
tags:- vimI guess I'd like the "set editor to vim" task to be "OK" if it is already set to vim, but it is showing up as "skipped".Not sure how to do that