From fbc7c00e95fa4bec5568d1e7a098a06418f00c85 Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Sat, 21 Jan 2017 22:24:48 +0200
Subject: [PATCH] - Workaround for OpenBSD where the default password (invalid)
 for users without a password is too short and therefore any usermod actions
 fail (see http://marc.info/?l=openbsd-tech&m=146661674018597&w=2).

---
 tests/playbook.yml | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tests/playbook.yml b/tests/playbook.yml
index c548e29..a72b3de 100644
--- a/tests/playbook.yml
+++ b/tests/playbook.yml
@@ -19,6 +19,15 @@
 
 - hosts: all
   pre_tasks:
+      - name: Set invalid, long enough passwords (workaround for OpenBSD restriction)
+        when: ansible_os_family == 'OpenBSD'
+        with_items: '{{ deploy_key_users }}'
+        user:
+            name: '{{ item }}'
+            password: '*************'
+            state: present
+            update_password: always
+
       - name: Create SSH keypair
         local_action: command ssh-keygen -t rsa -N '' -f files/id_rsa
         run_once: True
-- 
GitLab