diff --git a/bootstrap.yml b/bootstrap.yml index fa051f0..15974e3 100644 --- a/bootstrap.yml +++ b/bootstrap.yml @@ -2,10 +2,14 @@ - name: Set up IPA Client hosts: lab_ipa_client become: yes + collections: + - freeipa.ansible_freeipa + roles: - role: debian-freeipa-client when: ansible_facts['os_family'] == "Debian" - - role: alvaroaleman.freeipa-client + - role: ipaclient + state: present when: ansible_facts['os_family'] == "RedHat" - name: Set up Basic Lab Packages diff --git a/podhost.yml b/podhost.yml new file mode 100644 index 0000000..b95a94d --- /dev/null +++ b/podhost.yml @@ -0,0 +1,15 @@ +- name: K8S installed and ready + hosts: k8s + become: yes + + tasks: + - name: EPEL Repo enabled + yum: + name: epel-release + state: present + + - name: Setting sebool container_manage_cgroup + seboolean: + name: container_manage_cgroup + state: yes + persistent: yes \ No newline at end of file diff --git a/roles/toal-common/handlers/main.yml b/roles/toal-common/handlers/main.yml index b1f0c29..1b9e239 100644 --- a/roles/toal-common/handlers/main.yml +++ b/roles/toal-common/handlers/main.yml @@ -5,4 +5,10 @@ service: name: ovirt-guest-agent state: restarted + when: ansible_virtualization_type == "RHEV" + + - name: Qemu Agent Restart + service: + name: qemu-guest-agent + state: restarted when: ansible_virtualization_type == "RHEV" \ No newline at end of file diff --git a/roles/toal-common/tasks/main.yml b/roles/toal-common/tasks/main.yml index a7de9f0..9992da6 100644 --- a/roles/toal-common/tasks/main.yml +++ b/roles/toal-common/tasks/main.yml @@ -1,17 +1,42 @@ --- # Ensure that virtual guests have the guest tools installed. +# TODO: Refactor to make cleaner, and more DRY - block: - name: Guest Tools Repository rhsm_repository: name: rhel-7-server-rh-common-rpms state: present + when: + - ansible_os_family == "RedHat" + - ansible_distribution_major_version == '7' + + - name: Guest Tools Repository + rhsm_repository: + name: rhel-8-for-x86_64-appstream-rpms + state: present + when: + - ansible_os_family == "RedHat" + - ansible_distribution_major_version == '8' - name: Install ovirt-guest-agent on RHV Guests yum: name: ovirt-guest-agent state: present notify: Ovirt Agent Restart - when: ansible_virtualization_type == "RHEV" + when: + - ansible_virtualization_type == "RHEV" + - ansible_os_family == "RedHat" + - ansible_distribution_major_version == '7' + + - name: Install qemu-guest agent on RHEL8 Guest + yum: + name: qemu-guest-agent + state: present + notify: Qemu Agent Restart + when: + - ansible_virtualization_type == "RHEV" + - ansible_os_family == "RedHat" + - ansible_distribution_major_version == '8' - name: Install katello-agent on Satellite managed systems yum: @@ -24,4 +49,3 @@ name: insights-client state: present when: ansible_os_family == "RedHat" - diff --git a/site.yml b/site.yml index 27406c5..a830fca 100644 --- a/site.yml +++ b/site.yml @@ -27,3 +27,6 @@ - name: Include Gitea tasks include: gitea.yml + +# - name: Include Pod Host +# include: podhost.yml