Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Ansibleモジュール自作入門

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
Avatar for satoken satoken
October 28, 2018
570

 Ansibleモジュール自作入門

Avatar for satoken

satoken

October 28, 2018
Tweet

Transcript

  1. Ansible ? - Introduction: - Pythonで実装されたインフラ構成管理ツール - サーバ、DB、NW、クラウド etc -

    2.7.0では2900モジュールもあるそうな - Red Hat, Debian, CentOS, OS X, any of the BSDsで動作
  2. Ansibleモジュール完全に理解した - 1モジュール、1つのファイルで構成 yumモジュール → yum.py - 実際の処理 開始: AnsibleModuleでPlaybookからパラメータを受け取る

    途中: 必要な処理を行う→コマンド打ったりAPI呼んだり 終了: module.exit_json()を呼んで終了 - 開始と終了のお作法を守れば途中の処理は何してもいいのでは