Host management improvements

This commit is contained in:
2020-07-07 16:19:36 -04:00
parent 67cc6ad8a5
commit 6f0e9788d3
4 changed files with 19 additions and 22 deletions

View File

@@ -1,23 +1,29 @@
# Note: need to specify extra_vars, providing ansible_ssh_user, and ansible_ssh_pass
- name: Set up IPA Client
hosts: tag_ipa_client
become: yes
collections:
- freeipa.ansible_freeipa
pre_tasks:
- name: Set hostname
hostname:
name: "{{inventory_hostname}}"
- name: Attach subscriptions
command: '/usr/bin/subscription-manager attach'
register: result
changed_when:
- '"All installed products are covered by valid entitlements. No need to update subscriptions at this time." not in result.stdout'
when: ansible_distribution == "RedHat"
roles:
- role: debian-freeipa-client
when: ansible_facts['os_family'] == "Debian"
when: ansible_os_family == "Debian"
- role: ipaclient
state: present
when: ansible_facts['os_family'] == "RedHat"
when: ansible_os_family == "RedHat"
- name: Set up Basic Lab Packages
hosts: all