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

今さらだけど、group_varsとhost_varsについて一言言いたい

Tomohiko Isobe
December 06, 2018

 今さらだけど、group_varsとhost_varsについて一言言いたい

https://ansible-users.connpass.com/event/109717/
こちらでのLT資料です

Tomohiko Isobe

December 06, 2018
Tweet

More Decks by Tomohiko Isobe

Other Decks in Technology

Transcript

  1. Who am I ? • ү෦ ஐ඙ (Tomohiko Isobe) •

    twitter,Qiita: @isobecky74 • Infrastructure EngineerˏΫϦχΧϧɾϓϥοτϑΥʔϜגࣜձࣾ • ౡࠜݝग़਎ • Job Hopperʢݱࡏ8ࣾ໨wʣ • Favorites: ࢙੻ɾઓ੻Ί͙ΓɺϑΝϛϨε • Favorite Ansible Modules: template, AWSܥ https://clipla.jp
  2. ެࣜυΩϡϝϯτʹΑΔͱ "Similar functionality can still be achieved by using vars_files,

    include_vars, or group_vars and host_vars placed relative to the inventory file." ver2.4ͰɺΠϯϕϯτϦϑΝΠϧ͔Βͷ૬ରύε ʹͳͬͨΒ͍͠ https://docs.ansible.com/ansible/devel/porting_guides/porting_guide_2.4.html#initial- playbook-relative-group-vars-and-host-vars
  3. ͜Μͳ৘ใ͕ "As an advanced use case, you can create directories

    named after your groups or hosts, and Ansible will read all the files in these directories in lexicographical order." άϧʔϓ໊/ϗετ໊ͷσΟϨΫτϦ഑ԼͷϑΝΠϧ ΋ಡΈࠐΉͱͷ͜ͱ https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html#splitting-out-host-and- group-specific-data