Last active
November 20, 2022 11:39
-
-
Save keisei1092/1abaedbe81365e97026d to your computer and use it in GitHub Desktop.
Ansibleの(とりあえずCakePHPとMySQLのsecure_installation以外) https://gist.github.com/keisei1092/621f2b122eb957040b05 これも必要
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# playbook.yml | |
--- | |
- hosts: all | |
sudo: true | |
user: vagrant | |
tasks: | |
- name: Vimをインストールする | |
yum: name=vim state=present | |
- name: zshをインストールする | |
yum: name=zsh state=present | |
- name: zsh のプラグイン oh-my-zsh をインストールする | |
git: repo=https://github.com/robbyrussell/oh-my-zsh.git dest=/home/vagrant/.oh-my-zsh | |
- name: .zshrc を作る (あとですげかえてね!) | |
template: src=zshrc.in dest=/home/vagrant/zshrc_please_rename_this_to_.zshrc owner=vagrant | |
- name: zsh をデフォルトシェルにする | |
user: name=vagrant shell=/bin/zsh | |
- name: Apacheをインストールする | |
yum: name=httpd state=present | |
- name: Apacheを環境始動時に自動で起動するようにする | |
action: service name=httpd state=started enabled=yes | |
- name: phpをインストールする | |
yum: name={{item}} enablerepo=epel state=present | |
with_items: | |
- php | |
- phpMyAdmin | |
- php-mbstring | |
- php-mysql | |
- php-mcrypt | |
- name: Composerをインストールする | |
shell: > | |
curl -sS https://getcomposer.org/installer | php && mv composer.phar composer | |
chdir=/usr/local/bin | |
creates=/usr/local/bin/composer | |
- name: MySQLのパッケージをダウンロードする | |
yum: pkg={{item}} state=present | |
with_items: | |
- http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-shared-compat-5.6.23-1.el6.x86_64.rpm | |
- http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-shared-5.6.23-1.el6.x86_64.rpm | |
- http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-server-5.6.23-1.el6.x86_64.rpm | |
- http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-client-5.6.23-1.el6.x86_64.rpm | |
- http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-devel-5.6.23-1.el6.x86_64.rpm | |
- name: MySQLをインストールする | |
yum: pkg={{item}} state=present | |
with_items: | |
- MySQL-client.x86_64 | |
- MySQL-devel.x86_64 | |
- MySQL-server.x86_64 | |
- MySQL-shared-compat.x86_64 | |
- MySQL-shared.x86_64 | |
- name: MySQLを環境始動時に自動で起動するようにする | |
action: service name=mysql state=started enabled=yes | |
- name: Apacheを再起動する | |
action: service name=httpd state=restarted |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
すまない