Add support for service-add-smb.

This patch adds variable `smb`, that can be used when adding a new
service, and creates a SMB service (cifs) with an optional
`netbiosname`.
This commit is contained in:
Rafael Guterres Jeffman
2020-06-02 18:41:43 -03:00
parent 561cd4fb98
commit 2e7df27fe3
2 changed files with 79 additions and 4 deletions

View File

@@ -541,6 +541,40 @@
register: result
failed_when: result.changed
- name: Ensure SMB service is present.
ipaservice:
ipaadmin_password: MyPassword123
name: "{{ host1_fqdn }}"
smb: yes
netbiosname: SAMBASVC
register: result
failed_when: not result.changed
- name: Ensure SMB service is again.
ipaservice:
ipaadmin_password: MyPassword123
name: "{{ host1_fqdn }}"
smb: yes
netbiosname: SAMBASVC
register: result
failed_when: result.changed
- name: Ensure SMB service is absent.
ipaservice:
ipaadmin_password: MyPassword123
name: "cifs/{{ host1_fqdn }}"
state: absent
register: result
failed_when: not result.changed
- name: Ensure SMB service is absent, again.
ipaservice:
ipaadmin_password: MyPassword123
name: "cifs/{{ host1_fqdn }}"
state: absent
register: result
failed_when: result.changed
# cleanup
- name: Ensure services are absent.
@@ -551,6 +585,7 @@
- HTTP/www.ansible.com
- HTTP/svc.ihavenodns.info
- HTTP/no.idontexist.local
- "cifs/{{ host1_fqdn }}"
state: absent
- name: Ensure host "{{ svc_fqdn }}" is absent