mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-14 13:32:10 +00:00
ipabackup: Use module to get IPA_BACKUP_DIR from ipaplatform
Up to now a python snippet was used to get IPA_BACKUP_DIR from ipaplatform but this was not working when ansible_facts was false due to not getting ansible_python_interpreter set. The module version is also working if gather_facts is turned off.
This commit is contained in:
@@ -1,12 +1,8 @@
|
||||
---
|
||||
- name: Get IPA_BACKUP_DIR dir from ipaplatform
|
||||
command: "{{ ansible_python_interpreter | default('/usr/bin/python') }}"
|
||||
args:
|
||||
stdin: |
|
||||
from ipaplatform.paths import paths
|
||||
print(paths.IPA_BACKUP_DIR)
|
||||
register: result_ipaplatform_backup_dir
|
||||
- name: Get IPA_BACKUP_DIR from ipaplatform
|
||||
ipabackup_get_backup_dir:
|
||||
register: result_ipabackup_get_backup_dir
|
||||
|
||||
- name: Set IPA backup dir
|
||||
set_fact:
|
||||
ipabackup_dir: "{{ result_ipaplatform_backup_dir.stdout_lines | first }}"
|
||||
ipabackup_dir: "{{ result_ipabackup_get_backup_dir.backup_dir }}"
|
||||
|
||||
Reference in New Issue
Block a user