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
This commit is contained in:
Mohammed Naser 2018-12-29 17:43:17 -05:00
parent a947a9cc2d
commit 30cb1e72d6
3 changed files with 0 additions and 80 deletions

View File

@ -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 }}"

View File

@ -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 }}"

View File

@ -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"