From cd82d23762d81db017365ceb0f8500bcfa4bbca1 Mon Sep 17 00:00:00 2001 From: Delibes Bechir BKWEDOU-NGAMENI Date: Tue, 26 Mar 2024 11:13:08 +0100 Subject: [PATCH 1/4] feat: add schedule for run workflow each three months --- .github/workflows/molecule.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index 4dd6cc8..afb3198 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -6,6 +6,8 @@ on: # yamllint disable-line rule:truthy tags_ignore: - '*' pull_request: + schedule: + - cron: '0 0 1 */3 *' jobs: setup: From 6698b5fa97296fedba2812b99e3fdf316bd28f59 Mon Sep 17 00:00:00 2001 From: Delibes Bechir BKWEDOU-NGAMENI Date: Tue, 26 Mar 2024 11:14:23 +0100 Subject: [PATCH 2/4] feat: allow settings update_password policy options when creating users --- tasks/create_users.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/create_users.yml b/tasks/create_users.yml index 836dfd4..e242bfb 100644 --- a/tasks/create_users.yml +++ b/tasks/create_users.yml @@ -15,3 +15,4 @@ uid: "{{ item.value.uid | default(omit) }}" group: "{{ item.value.group | default(omit) }}" groups: "{{ item.value.groups | default(omit) }}" + update_password: "{{ item.value.update_password | default(omit) }}" From 4902a1e6d10ea84d73e64b537cbf74a94862fd36 Mon Sep 17 00:00:00 2001 From: Delibes Bechir BKWEDOU-NGAMENI Date: Tue, 26 Mar 2024 11:14:47 +0100 Subject: [PATCH 3/4] docs: add update_password option in example --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 64158db..c00f4e0 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,7 @@ See [tasks/install.yml](tasks/install.yml). id_rsa: public: 'ssh-rsa ' private: "{{ lookup('community.hashi_vault.hashi_vault', 'secret/ssh:private_key') }}" + update_password: "on_create" # default is always ``` ## :closed_lock_with_key: [Hardening](HARDENING.md) From 1727bf57bf3dc83827443ea0ee8a672792ac468f Mon Sep 17 00:00:00 2001 From: Delibes Bechir BKWEDOU-NGAMENI Date: Tue, 26 Mar 2024 11:15:12 +0100 Subject: [PATCH 4/4] feat: load ansible callback for display scenario exec time --- molecule/default/molecule.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 3f2cc09..82697d1 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -1,8 +1,9 @@ --- dependency: name: shell - command: python3 -m pip install pytest-testinfra - + command: | + pip install requests pytest-testinfra && + ansible-galaxy collection install community.crypto community.general driver: name: docker @@ -27,6 +28,9 @@ provisioner: name: ansible env: ANSIBLE_FORCE_COLOR: "true" + ANSIBLE_LOAD_CALLBACK_PLUGINS: "true" + ANSIBLE_CALLBACKS_ENABLED: "ansible.posix.profile_tasks" + ANSIBLE_STDOUT_CALLBACK: "ansible.posix.debug" options: v: true