tripleo / tripleo.repos / 0.0.5 / module / yum_config Update yum configuration files for TripleO deployments. | "added in version" 1.0.0 of tripleo.repos" Authors: Douglas Viroel (@viroel)tripleo.repos.yum_config (0.0.5) — module
Install with ansible-galaxy collection install tripleo.repos:==0.0.5
collections: - name: tripleo.repos version: 0.0.5
Update specific options for different yum configuration files like yum repos, yum modules and yum global configuration.
# Set yum 'appstream' repo to enabled and exclude a list of packages - name: Enable appstream repo and exclude nodejs and mariadb packages become: true become_user: root tripleo_yum_config: type: repo name: appstream enabled: true set_options: exclude: - nodejs* - mariadb*
# Enable and install a yum/dnf module - name: Enable nginx module become: true become_user: root tripleo_yum_config: type: module name: tomcat enabled: false stream: "1.18"
- name: Enable nginx module become: true become_user: root tripleo_yum_config: type: module name: nginx operation: install profile: common
# Set yum global configuration options - name: Set yum global options become: true become_user: root tripleo_yum_config: type: global file_path: /etc/dnf/dnf.conf set_options: skip_if_unavailable: "False" keepcache: "0"
- name: Configure a set of repos based on latest CentOS Stream 8 compose become: true become_user: root tripleo_yup_config: compose_url: https://composes.centos.org/latest-CentOS-Stream-8/compose/ centos_release: centos-stream-8 variants: - AppStream - BaseOS disable_conflicting_variants: true disable_repos: - /etc/yum.repos.d/CentOS-Linux-AppStream.repo - /etc/yum.repos.d/CentOS-Linux-BaseOS.repo
arch: choices: - aarch64 - ppc64le - x86_64 default: x86_64 description: - System architecture which the repos will be configure. type: str name: description: - Name of the repo or module to be changed. This options is mandatory only for repo and module types. type: str type: choices: - repo - module - global - enable-compose-repos description: - The type of yum configuration to be changed. required: true type: str stream: description: - Sets a module stream. This options is recommended when enabling a module that doesn't have a default stream. type: str enabled: default: true description: - Change the yum repo or module to enabled or disabled. - This options is ignored for yum global configuration. type: bool profile: description: - Sets a module profile. This options is recommended when installing a module that doesn't have a default profile. type: str dir_path: default: /etc/yum.repos.d description: - Absolute path of the directory that contains the configuration file to be changed. type: path variants: description: - Repository variants that should be configured. If not provided, all available variants will be configured. elements: str type: list file_path: description: - Absolute path of the configuration file to be changed. type: path operation: choices: - install - remove - reset description: - Operation to be execute within a dnf module. type: str compose_url: description: - URL that contains CentOS compose repositories. type: str set_options: description: - Dictionary with options to be updated. All dictionary values must be string or list of strings. type: dict disable_repos: description: - List with file path of repos that should be disabled after successfully enabling all compose repos. elements: str type: list centos_release: choices: - centos-stream-8 - centos-stream-9 description: - Target CentOS release. type: str disable_conflicting_variants: default: false description: - Disable all repos from the same directory that match variants' name. type: bool