diff --git a/test/integration/targets/add_host/tasks/main.yml b/test/integration/targets/add_host/tasks/main.yml index d1583eff31e..d81e6dd2d26 100644 --- a/test/integration/targets/add_host/tasks/main.yml +++ b/test/integration/targets/add_host/tasks/main.yml @@ -174,3 +174,13 @@ - add_host_loop_res.results[1] is changed - add_host_loop_res.results[2] is not changed - add_host_loop_res is changed + +- name: Add host with host:port in name + add_host: + name: '127.0.1.1:2222' + register: hostport + +- assert: + that: + - hostport.add_host.host_name == '127.0.1.1' + - hostport.add_host.host_vars.ansible_ssh_port == 2222 diff --git a/test/integration/targets/facts_linux_network/aliases b/test/integration/targets/facts_linux_network/aliases index 703c532e909..a2d06bbd03a 100644 --- a/test/integration/targets/facts_linux_network/aliases +++ b/test/integration/targets/facts_linux_network/aliases @@ -3,4 +3,5 @@ shippable/posix/group2 skip/freebsd skip/osx skip/macos -context/controller +context/target +destructive diff --git a/test/integration/targets/facts_linux_network/tasks/main.yml b/test/integration/targets/facts_linux_network/tasks/main.yml index af4dde96aa2..6efaf502269 100644 --- a/test/integration/targets/facts_linux_network/tasks/main.yml +++ b/test/integration/targets/facts_linux_network/tasks/main.yml @@ -16,3 +16,36 @@ - name: Remove IP from interface command: ip address delete 100.42.42.1/32 dev {{ ansible_facts.default_ipv4.interface }} ignore_errors: yes + +- block: + - name: Add bridge device + command: ip link add name br1337 type bridge stp_state 1 + + - name: Add virtual interface + command: ip link add name veth1337 type veth + + - name: Add virtual interface to bridge + command: ip link set veth1337 master br1337 + + - name: Gather network facts + setup: + gather_subset: network + + - debug: + var: ansible_facts.br1337 + + - assert: + that: + - ansible_facts.br1337.type == 'bridge' + - ansible_facts.br1337.id != '' + - ansible_facts.br1337.stp is true + - ansible_facts.br1337.interfaces|first == 'veth1337' + + always: + - name: Remove virtual interface + command: ip link delete veth1337 type veth + ignore_errors: yes + + - name: Remove bridge device + command: ip link delete br1337 type bridge + ignore_errors: yes diff --git a/test/integration/targets/handlers/test_listening_handlers.yml b/test/integration/targets/handlers/test_listening_handlers.yml index 67bdad9aa21..f4c3cae4b29 100644 --- a/test/integration/targets/handlers/test_listening_handlers.yml +++ b/test/integration/targets/handlers/test_listening_handlers.yml @@ -7,12 +7,23 @@ command: echo foo notify: - notify_listen + + - name: notify another handler + debug: + changed_when: true + notify: another_listen + + - name: nofity another handler 2 + debug: + changed_when: true + notify: another_listen post_tasks: - name: assert all defined handlers ran without error assert: that: - "notify_listen_ran_1 is defined" - "notify_listen_ran_2 is defined" + - "another_listen_ran is true" handlers: - name: first listening handler has a name set_fact: @@ -22,3 +33,7 @@ - set_fact: notify_listen_ran_2: True listen: notify_listen + + - set_fact: + another_listen_ran: '{{ False if another_listen_ran is defined else True }}' + listen: another_listen diff --git a/test/integration/targets/templating/aliases b/test/integration/targets/templating/aliases new file mode 100644 index 00000000000..13e01f0c947 --- /dev/null +++ b/test/integration/targets/templating/aliases @@ -0,0 +1,2 @@ +shippable/posix/group1 +context/controller diff --git a/test/integration/targets/templating/tasks/main.yml b/test/integration/targets/templating/tasks/main.yml new file mode 100644 index 00000000000..a374eac3031 --- /dev/null +++ b/test/integration/targets/templating/tasks/main.yml @@ -0,0 +1,8 @@ +- command: echo {% raw %}{{ foo }}{% endraw %} + register: result + +- assert: + that: + - result.stdout_lines|first == expected + vars: + expected: !unsafe '{{ foo }}'