xxxxxxxxxx
tasks:
- name: This task will be skipped in check mode
ansible.builtin.git:
repo: ssh://git@github.com/mylogin/hello.git
dest: /home/mylogin/hello
when: not ansible_check_mode
- name: This task will ignore errors in check mode
ansible.builtin.git:
repo: ssh://git@github.com/mylogin/hello.git
dest: /home/mylogin/hello
ignore_errors: "{{ ansible_check_mode }}"
xxxxxxxxxx
- file:
state: link
src: '{{ filename }}'
dest: latest
when: not ansible_check_mode
xxxxxxxxxx
- file:
state: link
src: '{{ filename }}'
dest: latest
ignore_errors: '{{ ansible_check_mode }}'