Debian Codegraph @

ansible_collections/theforeman/foreman/tests/test_playbooks/user.yml

raw symbols SCIP
1 ---
2 - hosts: localhost
3 collections:
4 - theforeman.foreman
5 tags:
6 - setup
7 gather_facts: false
8 vars_files:
9 - vars/server.yml
10 tasks:
11 - include_tasks: tasks/location.yml
12 vars:
13 location_state: "present"
14 - include_tasks: tasks/organization.yml
15 vars:
16 organization_state: "present"
17
18 - hosts: tests
19 collections:
20 - theforeman.foreman
21 tags:
22 - test
23 gather_facts: false
24 vars_files:
25 - vars/server.yml
26 tasks:
27
28 # create user
29 - include_tasks: tasks/user.yml
30 vars:
31 user_state: present
32 user_password: s3cret
33 expected_change: true
34
35 # verify idempotence
36 - include_tasks: tasks/user.yml
37 vars:
38 user_state: present
39 expected_change: false
40
41 # change user
42 - include_tasks: tasks/user.yml
43 vars:
44 user_state: present
45 user_locale: "{{ omit }}"
46 user_mail: "{{ omit }}"
47 user_description: A great manager
48 expected_change: true
49
50 # try to auth as new user
51 - include_tasks: tasks/user.yml
52 vars:
53 foreman_username: test
54 foreman_password: s3cret
55 user_state: present
56 user_mail: "{{ omit }}"
57 user_auth_source: "{{ omit }}"
58 expected_change: true
59
60 # change password
61 - include_tasks: tasks/user.yml
62 vars:
63 user_state: present
64 user_password: newp@ass
65 user_mail: "{{ omit }}"
66 expected_change: true
67
68 # try to auth as new user with new password
69 - include_tasks: tasks/user.yml
70 vars:
71 foreman_username: test
72 foreman_password: newp@ass
73 user_state: present
74 user_mail: [email protected]
75 user_auth_source: "{{ omit }}"
76 expected_change: true
77
78 # remove user
79 - include_tasks: tasks/user.yml
80 vars:
81 user_state: absent
82 expected_change: true
83
84 # verify idempotence for absence
85 - include_tasks: tasks/user.yml
86 vars:
87 user_state: absent
88 expected_change: false
89
90 - hosts: localhost
91 collections:
92 - theforeman.foreman
93 tags:
94 - teardown
95 gather_facts: false
96 vars_files:
97 - vars/server.yml
98 tasks:
99 - include_tasks: tasks/location.yml
100 vars:
101 location_state: "absent"
102 - include_tasks: tasks/organization.yml
103 vars:
104 organization_state: "absent"
105 ...