Browse Source

Switch galera_install_dnf back to being a symlink

In I239a472c1d76f1cc00666280a93b73ecd84ba3d9 the galera_install_dnf
task file was mistakenly changed from a symlink to a copy of the
galera_install_yum file. Since then its contents have drifted from
the yum install process, but it's supposed to be exactly the same..

This patch switches it back to being a symlink to reduce the cost
of maintenance.

Change-Id: If7c40e7459e06526e883dc5a36b4fd31177598f1
Jesse Pretorius 3 months ago
parent
commit
a1656f8876
2 changed files with 1 additions and 109 deletions
  1. 0
    109
      tasks/galera_install_dnf.yml
  2. 1
    0
      tasks/galera_install_dnf.yml

+ 0
- 109
tasks/galera_install_dnf.yml View File

@@ -1,109 +0,0 @@
1
----
2
-# Copyright 2016, Rackspace US, Inc.
3
-#
4
-# Licensed under the Apache License, Version 2.0 (the "License");
5
-# you may not use this file except in compliance with the License.
6
-# You may obtain a copy of the License at
7
-#
8
-#     http://www.apache.org/licenses/LICENSE-2.0
9
-#
10
-# Unless required by applicable law or agreed to in writing, software
11
-# distributed under the License is distributed on an "AS IS" BASIS,
12
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
-# See the License for the specific language governing permissions and
14
-# limitations under the License.
15
-
16
-- name: Update the local file system CRUD
17
-  file:
18
-    src: "{{ item.src|default(omit) }}"
19
-    path: "{{ item.path }}"
20
-    state: "{{ item.state }}"
21
-    force: "{{ item.force|default(omit) }}"
22
-  with_items:
23
-    - { path: "/etc/mysql", state: "directory" }
24
-    - { path: "/etc/mysql/conf.d", state: "directory" }
25
-    - { src: "/usr/lib64/galera", path: "/usr/lib/galera", state: "link", force: true }
26
-    - { src: "/etc/mysql/conf.d", path: "/etc/my.cnf.d", state: "link", force: true }
27
-    - { src: "/etc/mysql/my.cnf", path: "/etc/my.cnf", state: "link", force: true }
28
-
29
-- name: If a keyfile is provided, copy the gpg keyfile to the key location
30
-  copy:
31
-    src: "{{ item.keyfile }}"
32
-    dest: "{{ item.key }}"
33
-    mode: '0644'
34
-  with_items: "{{ galera_gpg_keys | selectattr('keyfile','defined') | list }}"
35
-
36
-- name: Install gpg keys
37
-  rpm_key:
38
-    key: "{{ key.key }}"
39
-    validate_certs: "{{ key.validate_certs | default(omit) }}"
40
-    state: "{{ key.state | default('present') }}"
41
-  with_items: "{{ galera_gpg_keys }}"
42
-  loop_control:
43
-    loop_var: key
44
-  register: _add_yum_keys
45
-  until: _add_yum_keys is success
46
-  retries: 5
47
-  delay: 2
48
-
49
-- name: Add galera repo
50
-  yum_repository:
51
-    name: "{{ galera_repo.name }}"
52
-    description: "{{ galera_repo.description }}"
53
-    baseurl: "{{ galera_repo.baseurl }}"
54
-    gpgkey: "{{ galera_repo.gpgkey | default(omit) }}"
55
-    gpgcheck: yes
56
-    enabled: yes
57
-  register: add_repos
58
-  until: add_repos is success
59
-  retries: 5
60
-  delay: 2
61
-
62
-# When changing the repo URL, the metadata does
63
-# not reliably update, resulting in the right
64
-# URL being used, but the wrong package list.
65
-# This is why we force the metadata to be
66
-# cleaned out whenever the repo config changes.
67
-- name: Force the expiry of the repo metadata
68
-  command: "{{ ansible_pkg_mgr }} clean metadata"
69
-  args:
70
-    warn: no
71
-  when: add_repos is changed
72
-  tags:
73
-    - skip_ansible_lint
74
-
75
-- name: Install percona repo
76
-  yum_repository:
77
-    name: 'percona-release-$basearch'
78
-    description: 'Percona-Release YUM repository - $basearch'
79
-    baseurl: "{{ galera_percona_xtrabackup_repo.repo }}"
80
-    enabled: true
81
-    gpgcheck: true
82
-    state: "{{ galera_percona_xtrabackup_repo.state }}"
83
-  register: install_packages
84
-  until: install_packages is success
85
-  retries: 5
86
-  delay: 2
87
-
88
-# NOTE(mhayden): MariaDB/percona repositories are prioritized at 99 by default
89
-# and that allows yum to install galera from the RDO repos, which is not good.
90
-# This task ensures that the following task will choose MariaDB/percona repos
91
-# as the highest priority.
92
-- name: Ensure MariaDB/percona repositories take highest priority
93
-  command: |
94
-    yum-config-manager
95
-      --enable {{ item }}
96
-      --setopt="{{ item }}.priority=25"
97
-  with_items:
98
-    - MariaDB
99
-    - percona-release-noarch
100
-    - percona-release-x86_64
101
-
102
-- name: Install galera_server role remote packages
103
-  package:
104
-    name: "{{ galera_packages_list }}"
105
-    state: "{{ galera_server_package_state }}"
106
-  register: install_remote_packages
107
-  until: install_remote_packages is success
108
-  retries: 5
109
-  delay: 2

+ 1
- 0
tasks/galera_install_dnf.yml View File

@@ -0,0 +1 @@
1
+galera_install_yum.yml

Loading…
Cancel
Save