From 30cb1e72d6736bae9dacbed0c3e6ef8fb174aaeb Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Sat, 29 Dec 2018 17:43:17 -0500 Subject: [PATCH] cleanup: stop managing files inside /etc 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 --- tasks/galera_client_install_yum.yml | 29 -------------------------- tasks/galera_client_install_zypper.yml | 28 ------------------------- tests/test.yml | 23 -------------------- 3 files changed, 80 deletions(-) diff --git a/tasks/galera_client_install_yum.yml b/tasks/galera_client_install_yum.yml index 1f02a42..1b0060b 100644 --- a/tasks/galera_client_install_yum.yml +++ b/tasks/galera_client_install_yum.yml @@ -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 }}" diff --git a/tasks/galera_client_install_zypper.yml b/tasks/galera_client_install_zypper.yml index 7bfcaa4..a636e12 100644 --- a/tasks/galera_client_install_zypper.yml +++ b/tasks/galera_client_install_zypper.yml @@ -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 }}" diff --git a/tests/test.yml b/tests/test.yml index 71a0312..1878aea 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -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" @@ -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"