diff --git a/Ansible/roles/cloudstack-manager/tasks/centos.yml b/Ansible/roles/cloudstack-manager/tasks/centos.yml index 258cdc53ad..3ecb6a4baa 100644 --- a/Ansible/roles/cloudstack-manager/tasks/centos.yml +++ b/Ansible/roles/cloudstack-manager/tasks/centos.yml @@ -26,9 +26,15 @@ - name: Ensure CA Certs are latest yum: name=ca-certificates state=latest enablerepo=base -- name: install rng-tools to get entropy +- name: install haveged to get entropy yum: name=haveged state=present +- name: start haveged for entropy + service: + name: haveged + state: started + enabled: yes + - name: update lvm2 as fix for bugzilla.redhat.com/show_bug.cgi?id=1294128 yum: name=lvm2 state=latest diff --git a/Ansible/roles/cloudstack-manager/tasks/centos8.yml b/Ansible/roles/cloudstack-manager/tasks/centos8.yml index 71221e7a29..b6ffa68ab2 100644 --- a/Ansible/roles/cloudstack-manager/tasks/centos8.yml +++ b/Ansible/roles/cloudstack-manager/tasks/centos8.yml @@ -69,9 +69,15 @@ - name: Ensure CA Certs are latest dnf: name=ca-certificates state=latest enablerepo=base -- name: install rng-tools to get entropy +- name: install haveged to get entropy dnf: name=haveged state=present +- name: start haveged for entropy + service: + name: haveged + state: started + enabled: yes + - name: determine number of db hosts set_fact: num_xen_hosts="{{ groups['xenserver_hosts'] | length }}" @@ -135,4 +141,4 @@ shell: "dnf install -y {{ sb_repo }}/ipmi/{{ ipmitool_binary }}" - name: Upgrade gcrypt library on CentOS 8 MS - dnf: name=libgcrypt state=present \ No newline at end of file + dnf: name=libgcrypt state=present diff --git a/Ansible/roles/kvm/tasks/centos.yml b/Ansible/roles/kvm/tasks/centos.yml index c5fbd613b8..86bddbdcc3 100644 --- a/Ansible/roles/kvm/tasks/centos.yml +++ b/Ansible/roles/kvm/tasks/centos.yml @@ -77,6 +77,7 @@ - rpcbind - parted - vim + - wget tags: - kvm @@ -127,6 +128,26 @@ - kvm - kvm-agent +- name: Install centos-release + shell: /usr/bin/wget http://10.0.3.122/centos-release/{{ item }} -P /tmp + with_items: + - centos-release-7-9.2009.0.el7.centos.x86_64.rpm + +- name: Cleanup old repos + shell: rm /etc/yum.repos.d/CentOS- -f; rpm -ivh --replacepkgs --replacefiles /tmp/centos-release-7-9.2009.0.el7.centos.x86_64.rpm + +- name: ensure yum cache is cleared + shell: command="yum clean all" + +- name: Ensure centos-release-qemu-ev is installed + yum: name=centos-release-qemu-ev state=present + +- name: Ensure qemu-kvm-ev is installed + yum: name=qemu-kvm-ev state=present + +- name: Remove centos-release-qemu-ev + shell: "yum remove centos-release-qemu-ev -y" + - name: Update /etc/sysconfig/libvirtd - LIBVIRTD_ARGS lineinfile: dest=/etc/sysconfig/libvirtd regexp='LIBVIRTD_ARGS' line='LIBVIRTD_ARGS="--listen"' state=present tags: @@ -204,6 +225,17 @@ shell: "echo {{ kvm_password }} | passwd {{ kvm_username }} --stdin" - include: ./centos_elrepokernel.yml - when: kvm_install_elrepo_kernel + #when: kvm_install_elrepo_kernel tags: - - kvm \ No newline at end of file + - kvm + +- name: Install cryptsetup and rng-tools to support encryption and entropy respectively + yum: name={{ item }} state=present enablerepo=base + with_items: + - cryptsetup + - rng-tools + tags: + - kvm + +- name: Start rng service + shell: "systemctl start rngd" diff --git a/Ansible/roles/kvm/tasks/centos8.yml b/Ansible/roles/kvm/tasks/centos8.yml index efba23765c..edbbd89099 100644 --- a/Ansible/roles/kvm/tasks/centos8.yml +++ b/Ansible/roles/kvm/tasks/centos8.yml @@ -218,3 +218,14 @@ # when: kvm_install_elrepo_kernel tags: - kvm + +- name: Install cryptsetup and rng-tools to support encryption and entropy respectively + dnf: name={{ item }} state=present enablerepo=base + with_items: + - cryptsetup + - rng-tools + tags: + - kvm + +- name: Start rng service + shell: "systemctl start rngd" diff --git a/Ansible/templates/CentOS-Base.repo.j2 b/Ansible/templates/CentOS-Base.repo.j2 index 204e1566d2..6c298d008c 100644 --- a/Ansible/templates/CentOS-Base.repo.j2 +++ b/Ansible/templates/CentOS-Base.repo.j2 @@ -26,3 +26,11 @@ baseurl={{ os_repo }}/centos/$releasever/updates/$basearch/ gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-$releasever enabled = {{ update_repo_enabled | default(1) }} + +[extras] +name=CentOS-$releasever - Extras +mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras +#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/ +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 +enabled = {{ update_repo_enabled | default(1) }} \ No newline at end of file