Debian Codegraph @

test/integration/targets/ssh_agent/auto.yml

raw
1 - hosts: testhost
2 tasks:
3 - set_fact:
4 key_types:
5 - ed25519
6 - rsa
7 - ecdsa
8
9 - set_fact:
10 key_types: "{{ key_types + ['dsa'] }}"
11 when:
12 - ansible_distribution == "RedHat"
13 - ansible_distribution_major_version | int == 9
14
15 - include_tasks: test_key.yml
16 loop: "{{ key_types }}"
17 loop_control:
18 extended: true
19
20 - ssh_agent:
21 action: remove
22 pubkey: "{{ sshkey.public_key }}"
23
24 - ssh_agent:
25 action: list
26 register: keys
27
28 - assert:
29 that:
30 - keys.nkeys == key_types | length - 1
31
32 - name: remove all keys
33 ssh_agent:
34 action: remove_all
35 register: r
36
37 - assert:
38 that:
39 - r is success
40 - r.nkeys_removed == key_types | length - 1
41
42 - ssh_agent:
43 action: list
44 register: keys
45
46 - assert:
47 that:
48 - keys.nkeys == 0