infoMore than 5 years have passed since last update.
ansible を使って、ubuntu 16.04LTS を設定する
Last updated at Posted at 2018-08-02
だんだんと書いていきます。ansible を、python3 で使う前提です。備忘録ですので、あまり正確ではないです。ご容赦ください。
対象とする読者
- python3 になれていて、ansible のために、python2 は嫌だと思っている。
- サーバ設定ができればよく、stage,productionを区別する必要がない。
- 他人のスクリプトをできるだけ有効活用したい。(ansible galaxy)
前提
- python3 で使う
- 対象とするのは、aws (vagrantではない)
- どうせ aws に設定するのだから、aws にしました。スポットインスタンスなら激安です。
- ubuntu は、16.04 の公式AMIを使用
- 設定側は、anaconda3の管理下のansibleを使う
準備
- inventory に下記のように書いて、ansible から、pythonが使えるようにする
[ubuntu_hosts]
ホスト名
[ubuntu_hosts:vars]
ansible_python_interpreter=/usr/bin/python3
と書いておいて、
---
- hosts: ubuntu_hosts
become: yes
以下省略
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
What you can do with signing up