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 hidden or 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 |
TASK: [.zshrc を作る(conf/zshrc にある)] ****************************
failed: [192.168.33.10] => {"failed": true}
msg: Destination directory /home/vagrant/conf does not exist
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
とりあえず手動で$ mkdir /home/vagrant/conf
して進めました〜
すまない
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
でエラるのだけど、playbookのtemplate見る限りローカルにファイル必要なのではと思ったのだけど、
zshrc.in
はどうすればよい?