mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-03-26 21:33:05 +00:00
New hbacsvc (HBAC Service) management module
There is a new hbacsvc (HBAC Service) management module placed in the plugins folder: plugins/modules/ipahbacsvc.py The hbacsvc module allows to ensure presence and absence of HBAC Services. Here is the documentation for the module: README-hbacsvc.md New example playbooks have been added: playbooks/hbacsvc/ensure-hbacsvc-absent.yml playbooks/hbacsvc/ensure-hbacsvc-present.yml New tests added for pwpolicy: tests/hbacsvc/test_hbacsvc.yml
This commit is contained in:
58
tests/hbacsvc/test_hbacsvc.yml
Normal file
58
tests/hbacsvc/test_hbacsvc.yml
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
- name: Tests
|
||||
hosts: ipaserver
|
||||
become: true
|
||||
gather_facts: false
|
||||
|
||||
tasks:
|
||||
- name: Ensure HBAC Service for http is absent
|
||||
ipahbacsvc:
|
||||
ipaadmin_password: MyPassword123
|
||||
name: http,tftp
|
||||
state: absent
|
||||
|
||||
- name: Ensure HBAC Service for http is present
|
||||
ipahbacsvc:
|
||||
ipaadmin_password: MyPassword123
|
||||
name: http
|
||||
register: result
|
||||
failed_when: not result.changed
|
||||
|
||||
- name: Ensure HBAC Service for http is present again
|
||||
ipahbacsvc:
|
||||
ipaadmin_password: MyPassword123
|
||||
name: http
|
||||
register: result
|
||||
failed_when: result.changed
|
||||
|
||||
- name: Ensure HBAC Service for tftp is present
|
||||
ipahbacsvc:
|
||||
ipaadmin_password: MyPassword123
|
||||
name: tftp
|
||||
description: TFTP service
|
||||
register: result
|
||||
failed_when: not result.changed
|
||||
|
||||
- name: Ensure HBAC Service for tftp is present again
|
||||
ipahbacsvc:
|
||||
ipaadmin_password: MyPassword123
|
||||
name: tftp
|
||||
description: TFTP service
|
||||
register: result
|
||||
failed_when: result.changed
|
||||
|
||||
- name: Ensure HBAC Services for http and tftp are absent
|
||||
ipahbacsvc:
|
||||
ipaadmin_password: MyPassword123
|
||||
name: http,tftp
|
||||
state: absent
|
||||
register: result
|
||||
failed_when: not result.changed
|
||||
|
||||
- name: Ensure HBAC Services for http and tftp are absent again
|
||||
ipahbacsvc:
|
||||
ipaadmin_password: MyPassword123
|
||||
name: http,tftp
|
||||
state: absent
|
||||
register: result
|
||||
failed_when: result.changed
|
||||
Reference in New Issue
Block a user