summaryrefslogtreecommitdiffstats
path: root/roles/ands_idm/tasks/setup_ipa.yml
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-10-11 06:25:21 +0200
committerSuren A. Chilingaryan <csa@suren.me>2019-10-11 06:25:21 +0200
commitb23e9400c36acf9856606165489e8828c2cf8dd5 (patch)
tree581468996aa8202b9121c8031ee50bf60984a816 /roles/ands_idm/tasks/setup_ipa.yml
parentb17d3d74eb5a9e7640d94f98f6b27ce4891b3c26 (diff)
downloaditm-b23e9400c36acf9856606165489e8828c2cf8dd5.tar.gz
itm-b23e9400c36acf9856606165489e8828c2cf8dd5.tar.bz2
itm-b23e9400c36acf9856606165489e8828c2cf8dd5.tar.xz
itm-b23e9400c36acf9856606165489e8828c2cf8dd5.zip
ipa-client and fine tunning
Diffstat (limited to 'roles/ands_idm/tasks/setup_ipa.yml')
-rw-r--r--roles/ands_idm/tasks/setup_ipa.yml20
1 files changed, 20 insertions, 0 deletions
diff --git a/roles/ands_idm/tasks/setup_ipa.yml b/roles/ands_idm/tasks/setup_ipa.yml
new file mode 100644
index 0000000..06fe6da
--- /dev/null
+++ b/roles/ands_idm/tasks/setup_ipa.yml
@@ -0,0 +1,20 @@
+- name: Install ipa-client
+ package: name=ipa-client state=present
+
+- name: "Check if ipa is already configured"
+ shell: "grep {{ ands_domain }} /etc/krb5.conf"
+ register: ipa_check
+ changed_when: ipa_check is failed
+ failed_when: false
+
+- name: "Read FQDN"
+ command: "cat /etc/hostname"
+ register: hostname
+ changed_when: false
+
+- name: "Configure ipa"
+ command: "/usr/sbin/ipa-client-install -p admin -w {{ config.ands_idm_admin_password | quote }} --hostname={{ hostname.stdout }} --domain={{ ands_domain }} --server={{ ands_idm_server }} --enable-dns-updates --mkhomedir --request-cert --unattended"
+ when:
+ - ipa_check.rc != 0
+
+