Incidental docker chip away (#77830)

* Add new templating target, test splitter

* Add test for host:port parsing in parse_address via add_host

* Test already notified listening handler

* Add test for gathering bridge network facts

* Add veth to bridge

* ci_complete ci_coverage
pull/77851/head
Matt Martz 2 years ago committed by GitHub
parent 76ead1e768
commit ef3ea4cdc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

@ -3,4 +3,5 @@ shippable/posix/group2
skip/freebsd
skip/osx
skip/macos
context/controller
context/target
destructive

@ -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

@ -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

@ -0,0 +1,2 @@
shippable/posix/group1
context/controller

@ -0,0 +1,8 @@
- command: echo {% raw %}{{ foo }}{% endraw %}
register: result
- assert:
that:
- result.stdout_lines|first == expected
vars:
expected: !unsafe '{{ foo }}'
Loading…
Cancel
Save