Updated Yum roles with review comments.

This commit is contained in:
Jonathan Davies 2017-11-01 14:49:28 +00:00
parent a3bb4e17e7
commit 4823db1563
8 changed files with 19 additions and 7 deletions

View File

@ -4,3 +4,4 @@
service: service:
name: yum-cron name: yum-cron
state: restarted state: restarted
become: True

View File

@ -5,6 +5,7 @@
name: yum-cron name: yum-cron
state: present state: present
when: yum_cron_enabled when: yum_cron_enabled
become: True
- name: Replace | Enable update applying for yum-cron (CentOS) - name: Replace | Enable update applying for yum-cron (CentOS)
replace: replace:
@ -14,15 +15,17 @@
when: yum_cron_enabled when: yum_cron_enabled
notify: notify:
- Restart yum-cron - Restart yum-cron
become: True
- name: Replace | Enable update applying for yum-cron (CentOS) - name: Replace | Enable update applying for yum-cron (CentOS)
replace: replace:
dest: /etc/yum/yum-cron.conf dest: /etc/yum/yum-cron.conf
regexp: "^update_cmd = default" regexp: "^update_cmd = .*$"
replace: "update_cmd = {{ yum_cron_update_cmd }}" replace: "update_cmd = {{ yum_cron_update_cmd }}"
when: yum_cron_enabled when: yum_cron_enabled
notify: notify:
- Restart yum-cron - Restart yum-cron
become: True
- name: Service | Enable yum-cron (CentOS) - name: Service | Enable yum-cron (CentOS)
service: service:
@ -30,3 +33,4 @@
state: started state: started
enabled: yes enabled: yes
when: yum_cron_enabled when: yum_cron_enabled
become: True

View File

@ -1,4 +1,6 @@
--- ---
- include: redhat.yml - include: redhat.yml
when: (ansible_os_family == "RedHat" and use_local_mirror == true) when:
- ansible_os_family == "RedHat"
- yum_use_local_mirror

View File

@ -5,6 +5,7 @@
dest: /etc/yum/pluginconf.d/fastestmirror.conf dest: /etc/yum/pluginconf.d/fastestmirror.conf
regexp: "enabled=1" regexp: "enabled=1"
replace: "enabled=0" replace: "enabled=0"
become: True
- name: Template | Copy CentOS repo templates (CentOS) - name: Template | Copy CentOS repo templates (CentOS)
template: template:
@ -13,16 +14,18 @@
owner: root owner: root
group: root group: root
mode: 0664 mode: 0664
become: True
- name: Yum | Update cache (CentOS) - name: Yum | Update cache (CentOS)
yum: yum:
update_cache: yes update_cache: yes
become: True
- name: Yum | Install epel-release (CentOS) - name: Yum | Install epel-release (CentOS)
yum: yum:
name: epel-release name: epel-release
state: installed state: installed
when: ansible_os_family == 'RedHat' become: True
- name: Template | Copy EPEL repo templates (CentOS) - name: Template | Copy EPEL repo templates (CentOS)
template: template:
@ -31,8 +34,9 @@
owner: root owner: root
group: root group: root
mode: 0664 mode: 0664
become: True
- name: Yum | Update cache (CentOS) - name: Yum | Update cache (CentOS)
yum: yum:
update_cache: yes update_cache: yes
when: ansible_os_family == 'RedHat' become: True

View File

@ -17,6 +17,7 @@ Features
* Adds support for configuration of custom fluentd filters, and additional * Adds support for configuration of custom fluentd filters, and additional
config file templates for heat, ironic, keystone, magnum, murano, sahara, and config file templates for heat, ironic, keystone, magnum, murano, sahara, and
swift in ``$KAYOBE_CONFIG_PATH/kolla/config/<component>/``. swift in ``$KAYOBE_CONFIG_PATH/kolla/config/<component>/``.
* Adds support for specifing a local Yum mirror for package installation.
Upgrade Notes Upgrade Notes
------------- -------------

View File

@ -1,4 +1,6 @@
--- ---
# Whether to enable Yum automatic updates.
#yum_cron_enabled: false #yum_cron_enabled: false
# Command to use for Yum automatic updates.
#yum_cron_update_cmd: 'security' #yum_cron_update_cmd: 'security'

View File

@ -2,8 +2,6 @@
# Whether or not to use a local Yum mirror. # Whether or not to use a local Yum mirror.
#yum_use_local_mirror: false #yum_use_local_mirror: false
# Whether or not yum-cron is enabled.
#yum_cron_enabled: false
# Mirror FQDN for Yum repos. # Mirror FQDN for Yum repos.
#yum_centos_mirror_host: 'mirror.centos.org' #yum_centos_mirror_host: 'mirror.centos.org'
# Mirror directory for Yum CentOS repos. # Mirror directory for Yum CentOS repos.

View File

@ -555,11 +555,11 @@ class OvercloudHostConfigure(KollaAnsibleMixin, KayobeAnsibleMixin, VaultMixin,
* Configure a user account for use by kayobe for SSH access. * Configure a user account for use by kayobe for SSH access.
* Optionally, wipe unmounted disk partitions (--wipe-disks). * Optionally, wipe unmounted disk partitions (--wipe-disks).
* Configure user accounts, group associations, and authorised SSH keys. * Configure user accounts, group associations, and authorised SSH keys.
* Configure YUM repos.
* Disable SELinux. * Disable SELinux.
* Configure the host's network interfaces. * Configure the host's network interfaces.
* Set sysctl parameters. * Set sysctl parameters.
* Disable bootstrap interface configuration. * Disable bootstrap interface configuration.
* Configure YUM repos.
* Configure NTP. * Configure NTP.
* Configure LVM volumes. * Configure LVM volumes.
* Configure a user account for kolla-ansible. * Configure a user account for kolla-ansible.