You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/hostname/tasks/Debian.yml

21 lines
658 B
YAML

---
- name: Test DebianStrategy by setting hostname
become: 'yes'
hostname:
use: debian
name: "{{ ansible_distribution_release }}-bebop.ansible.example.com"
- name: Test DebianStrategy by getting current hostname
command: hostname
register: get_hostname
- name: Test DebianStrategy by verifying /etc/hostname content
command: grep -v '^#' /etc/hostname
register: grep_hostname
- name: Test DebianStrategy using assertions
assert:
that:
- "'{{ ansible_distribution_release }}-bebop.ansible.example.com' in get_hostname.stdout"
- "'{{ ansible_distribution_release }}-bebop.ansible.example.com' in grep_hostname.stdout"