Skip to content

Commit

Permalink
cleanup: stop managing files inside /etc
Browse files Browse the repository at this point in the history
If we're installing a client, there's absolutely no need for us
to be touching things inside /etc.  This is not being done inside
the process installing on Debian based operating systems however
it is being done under CentOS and SUSE.

Change-Id: I49790baa8394d9d6d412bf06252e9812f766ea30
  • Loading branch information
mnaser committed Dec 29, 2018
1 parent a947a9c commit 30cb1e7
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 80 deletions.
29 changes: 0 additions & 29 deletions tasks/galera_client_install_yum.yml
Expand Up @@ -36,35 +36,6 @@
warn: no
executable: /bin/bash

- name: Stat /etc/my.cnf.d
stat:
path: /etc/my.cnf.d
register: mycnfd_stat

- name: Destroy my.cnf.d dir if is dir
file:
path: /etc/my.cnf.d
state: absent
force: true
when:
- mycnfd_stat.stat.isdir is defined
- mycnfd_stat.stat.isdir == True

- name: Update the local file system CRUD
file:
src: "{{ item.src|default(omit) }}"
path: "{{ item.path }}"
state: "{{ item.state }}"
force: "{{ item.force|default(omit) }}"
with_items:
- { path: "/etc/mysql", state: "directory" }
- { path: "/etc/mysql/conf.d", state: "directory" }
- { src: "/usr/lib64/galera", path: "/usr/lib/galera", state: "link", force: true }
- { src: "/etc/mysql/conf.d", path: "/etc/my.cnf.d", state: "link", force: true }
- { src: "/etc/mysql/my.cnf", path: "/etc/my.cnf", state: "link", force: true }
tags:
- galera-config

- name: If a keyfile is provided, copy the gpg keyfile to the key location
copy:
src: "gpg/{{ item.key | basename }}"
Expand Down
28 changes: 0 additions & 28 deletions tasks/galera_client_install_zypper.yml
Expand Up @@ -13,34 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

- name: Stats /etc/my.cnf.d
stat:
path: /etc/my.cnf.d
register: mycnfd_stat

- name: Destroy my.cnf.d dir if is dir
file:
path: /etc/my.cnf.d
state: absent
force: true
when:
- mycnfd_stat.stat.isdir is defined
- mycnfd_stat.stat.isdir == True

- name: Update the local file system CRUD
file:
src: "{{ item.src|default(omit) }}"
path: "{{ item.path }}"
state: "{{ item.state }}"
force: "{{ item.force|default(omit) }}"
with_items:
- { path: "/etc/mysql", state: "directory" }
- { path: "/etc/mysql/conf.d", state: "directory" }
- { src: "/etc/mysql/conf.d", path: "/etc/my.cnf.d", state: "link", force: true }
- { src: "/etc/mysql/my.cnf", path: "/etc/my.cnf", state: "link", force: true }
tags:
- galera-config

- name: If a keyfile is provided, copy the gpg keyfile to the key location
copy:
src: "gpg/{{ item.key | basename }}"
Expand Down
23 changes: 0 additions & 23 deletions tests/test.yml
Expand Up @@ -20,18 +20,6 @@
become: true
pre_tasks:
- include_tasks: "common/common-tasks/test-set-nodepool-vars.yml"
# These directories are removed because the gate job has them in
# the base image.
- name: Remove local mysql directories if they exist
file:
path: "{{ item.path }}"
state: "absent"
with_items:
- { path: "/etc/mysql" }
- { path: "/etc/mysql/conf.d" }
- { path: "/usr/lib/galera" }
- { path: "/etc/my.cnf.d" }
- { path: "/etc/my.cnf" }
roles:
- role: "galera_client"
galera_address: "10.0.0.1"
Expand Down Expand Up @@ -59,17 +47,6 @@
connection: local
user: root
become: true
pre_tasks:
- name: Remove local mysql directories if they exist
file:
path: "{{ item.path }}"
state: "absent"
with_items:
- { path: "/etc/mysql" }
- { path: "/etc/mysql/conf.d" }
- { path: "/usr/lib/galera" }
- { path: "/etc/my.cnf.d" }
- { path: "/etc/my.cnf" }
roles:
- role: "galera_client"
galera_address: "10.0.0.1"
Expand Down

0 comments on commit 30cb1e7

Please sign in to comment.