summaryrefslogtreecommitdiffstats
path: root/test/integration/targets
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets')
-rw-r--r--test/integration/targets/user/tasks/main.yml5
-rw-r--r--test/integration/targets/user/tasks/test_expires_min_max.yml18
2 files changed, 23 insertions, 0 deletions
diff --git a/test/integration/targets/user/tasks/main.yml b/test/integration/targets/user/tasks/main.yml
index 5e1d2d220d..3807831f03 100644
--- a/test/integration/targets/user/tasks/main.yml
+++ b/test/integration/targets/user/tasks/main.yml
@@ -21,6 +21,11 @@
meta: end_host
when: ansible_distribution == 'Alpine'
+- name: ensure output directory exists
+ file:
+ dest: "{{ output_dir }}"
+ state: directory
+
- import_tasks: test_create_user.yml
- import_tasks: test_create_system_user.yml
- import_tasks: test_create_user_uid.yml
diff --git a/test/integration/targets/user/tasks/test_expires_min_max.yml b/test/integration/targets/user/tasks/test_expires_min_max.yml
index 80e607b6fc..0b8037918d 100644
--- a/test/integration/targets/user/tasks/test_expires_min_max.yml
+++ b/test/integration/targets/user/tasks/test_expires_min_max.yml
@@ -53,3 +53,21 @@
that:
- ansible_facts.getent_shadow['ansibulluser'][2] == '5'
- ansible_facts.getent_shadow['ansibulluser'][3] == '10'
+
+ - name: Set min and max at the same time
+ user:
+ name: ansibulluser
+ # also checks that assigning 0 works
+ password_expire_min: 0
+ password_expire_max: 0
+
+ - name: Get shadow data for ansibulluser
+ getent:
+ database: shadow
+ key: ansibulluser
+
+ - name: Ensure password expiration was set properly
+ assert:
+ that:
+ - ansible_facts.getent_shadow['ansibulluser'][2] == '0'
+ - ansible_facts.getent_shadow['ansibulluser'][3] == '0'