Skip to content

Commit

Permalink
現在の構成までの解説
Browse files Browse the repository at this point in the history
  • Loading branch information
tomcat0090 committed Jul 18, 2016
1 parent 27c88fc commit 1e92ea8
Showing 1 changed file with 50 additions and 2 deletions.
52 changes: 50 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<title>reveal.js</title>

<link rel="stylesheet" href="reveal.js/css/reveal.css">
<link rel="stylesheet" href="reveal.js/css/theme/black.css">
<link rel="stylesheet" href="reveal.js/css/theme/solarized.css">

<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="reveal.js/lib/css/zenburn.css">
Expand Down Expand Up @@ -168,7 +168,7 @@ <h2>Vagrant コマンド(2)</h2>

<section>
<h2>Vagrantfileの書き方</h2>
<p>FabarCastell プロジェクトで使用したVagrantfile</p>
<p>記述例</p>
<pre><code class="hljs" data-trim contenteditable>
# Vagrantのバージョンを指定
VAGRANTFILE_API_VERSION = "2"
Expand Down Expand Up @@ -227,6 +227,54 @@ <h2>hosts</h2>
192.168.33.20
</code></pre>
</section>

<section>
<h2>playbookの構成</h2>
<p>構成例(ベストプラクティスからはすこし調整しています)</p>
<pre><code class="hljs" data-trim contenteditable>
try-ansible-best-practices
├── site.yml
├── development.yml # 対象毎に実行するロールを指定する
├── ci.yml # 対象毎に実行するロールを指定する
├── setup.yml # プロジェクトのセットアップ用
├── update.yml # プロジェクトのアップデート用
├── vars
│ └── プロジェクト.yml # プロジェクト毎の定数
└── roles
└── common
├── handlers # notifyが指定されると、ここに記述されたタスクを実行する
│ └── main.yml
├── tasks # このロールで実行されるタスク
│ └── main.yml
├── vars # ロールごとの定数
│ └── main.yml
└── templates # templateモジュールで使用される雛形をおく
└── php.ini.j2
</code></pre>
</section>

<section>
<h2>playbook.yml</h2>
<p>yumモジュール</p>
<pre><code class="hljs" data-trim contenteditable>
- hosts: web
user: root
tasks:
- name: Apacheをインストール
yum: name=httpd state=present
</code></pre>
</section>

<section>
<h2>playbook.yml</h2>
<p>templateモジュール</p>
<pre><code class="hljs" data-trim contenteditable>
- name: 設定の差し替え
template: src=php.ini.j2
dest=/etc/php.ini
owner=vagrant group=vagrant mode=0644
</code></pre>
</section>
</div>
</div>

Expand Down

0 comments on commit 1e92ea8

Please sign in to comment.