{"id":16367945,"url":"https://github.com/treetips/ansible-playbook-mysql-client-server","last_synced_at":"2026-05-08T17:36:04.247Z","repository":{"id":150606641,"uuid":"56906222","full_name":"treetips/ansible-playbook-mysql-client-server","owner":"treetips","description":"mysql-client nad mysql-server playbook for ansible.","archived":false,"fork":false,"pushed_at":"2016-04-23T08:12:43.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-31T06:40:55.508Z","etag":null,"topics":["ansible","mysql-client","mysql-server","vagrant"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/treetips.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-23T07:24:07.000Z","updated_at":"2016-12-16T17:00:38.000Z","dependencies_parsed_at":"2023-06-12T00:45:24.498Z","dependency_job_id":null,"html_url":"https://github.com/treetips/ansible-playbook-mysql-client-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treetips%2Fansible-playbook-mysql-client-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treetips%2Fansible-playbook-mysql-client-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treetips%2Fansible-playbook-mysql-client-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/treetips%2Fansible-playbook-mysql-client-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/treetips","download_url":"https://codeload.github.com/treetips/ansible-playbook-mysql-client-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239868779,"owners_count":19710478,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","mysql-client","mysql-server","vagrant"],"created_at":"2024-10-11T02:51:15.462Z","updated_at":"2026-02-26T09:30:17.176Z","avatar_url":"https://github.com/treetips.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"mysql-client and mysql-server environment playbook\n====\n\n## Description\n\nIt is `ansible-playbook` to build `mysql-client` and `mysql-server` environment with maintaining idempotency.\n\nOf course the conflict-error at the time of the `yum install mysql-xxx`  does not happen, and the conflict-error at the time of the `yum install MySQL-python` does not happen, too.\n\n## Environment\n\n### Ansible client\n\n* ansible: v2.0\n* vagrant: v1.8\n\n### Target server\n\n* os: CentOS v6.5\n* mysql: v5.5\n* pyenv: latest\n* python: v2.7.11\n\n## Usage\n\n### Checkout this repository.\n\n```bash\ngit clone https://github.com/treetips/ansible-playbook-mysql-client-server.git\n```\n\n### Add vagrant box.\n\n```bash\nvagrant box add centos6.5 http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.5_chef-provisionerless.box\n```\n\nThe box name `centos6.5` sets it in Vagrantfile.\n\n### Start up vagrant.\n\n```bash\ncd ansible-playbook-mysql-client-server/vagrant\nvagrant up\n```\n\nIf `vagrant up` becomes the error, Look for different vagrant-box.\n\nIn Vagrantfile, Add worker user and set a password `worker` and enable sudo by provisioning.\n\n### Perfome ansible-playbook script.\n\n```bash\nchmod +x ./playbook.sh\n./playbook.sh\n```\n\n## Optional\n\n### ssh\n\n```bash\nssh worker@192.168.33.31\n```\n\n### Connect mysql-server\n\nPlaybook create connect script for mysql-server at home directory.\n\n```bash\nssh worker@192.168.33.31\n./mysql.sh\n```\n\nPlaybook create mysql connect-setting file to home directory.\n\n```bash\n$ ls -l ~/.my.cnf\n-rw------- 1 worker worker 298 2016-04-23 16:17 /home/worker/.my.cnf\n\n$ cat .my.cnf\n[client_root]\nhost=192.168.33.31\ndatabase=hoge\nuser=root\npassword=fuga\n\n[client_user]\nhost=192.168.33.31\ndatabase=hoge\nuser=worker\npassword=worker\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftreetips%2Fansible-playbook-mysql-client-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftreetips%2Fansible-playbook-mysql-client-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftreetips%2Fansible-playbook-mysql-client-server/lists"}