Debian Codegraph @

test/integration/targets/hostname/tasks/check_mode.yml

raw
1 # These are less useful (check_mode only) but run even in containers
2 - block:
3 - name: Get current hostname
4 command: hostname
5 register: original
6
7 - name: Change hostname (check_mode)
8 hostname:
9 name: crocodile.ansible.test.doesthiswork.net.example.com
10 check_mode: true
11 register: hn
12
13 - name: Get current hostname again
14 command: hostname
15 register: after_hn
16
17 - assert:
18 that:
19 - hn is changed
20 - original.stdout == after_hn.stdout