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

MacをAnsibleで
構成管理しちゃったお話

 MacをAnsibleで
構成管理しちゃったお話

adachin0817

July 30, 2019
Tweet

More Decks by adachin0817

Other Decks in Programming

Transcript

  1. 2019/07/30 Ansible Night in Tokyo 2019.07 ΞδΣϯμ  ɾࣗݾ঺հ ɾݸਓతͳ͓࿩

    ɾansible_MacΛ࡞ͬͨΘ͚ ɾߏ੒ ɾ࢖͍ํ ɾσϞ ɾ·ͱΊ
  2. 2019/07/30 Ansible Night in Tokyo 2019.07 ࣗݾ঺հ  - name:

    Introduction me user: name: adachi.ryo(adachin) work: SRE detail: aws analytical base
 skill: ansible terraform embulk shell PHP go
 blog: blog.adachin.me
 oss: Vuls contributor Evangelist twitter:adachin0817 github:RVIRUS0817 
  3. 2019/07/30 Ansible Night in Tokyo 2019.07 Θ͍ͷλʔϛφϧ؀ڥͱΞϓϦέʔγϣϯΒ  ɾnvim/dein.vim ɾzsh

    ɾtmux/powerline ɾpeco/ghq (control + h(history),j(ssh)/repo
 ɾ伴͸Google DriveͳͲͰ؅ཧ
  4. 2019/07/30 Ansible Night in Tokyo 2019.07 օ͞Μ͜Μͳܦݧ͋Γ·ͤΜ͔ʁ  ɾࠓ·Ͱ͸gistΛ࢖ͬͯ؅ཧ(Θ͔Δ) ɾίϐϖͰରԠ(μα͍✌)

    ɾԿΛมߋͨ͠ͷ͔๨ΕͯݸਓͷPCͱ૬ҧ͕ग़Δ(ന໨)
 ɾస৬ͨ͠ͱ͖(ങ͍ସ͑)ʹηοτΞοϓ͕μϧ͍ ɾ͍ͭ΋ೖΕͯΔΞϓϦέʔγϣϯͳΜ͚ͩͬ ɾ؂ࠪͳͲͰTime machine͕࢖͑ͳ͍ ɾTime machineͰ΋͍͍͕ແବͳ΋ͷ͸ೖΕͨ͘ͳ͍
  5. 2019/07/30 Ansible Night in Tokyo 2019.07 ͦͯ͠AnsibleͰ࡞ͬͯ͠·ͬͨ  ɾ2017೥ ɾAnsible

    2.8.3 ɾ׬શϦϙδτϦԽ ɾϗʔϜσΟϨΫτϦʹ͋ΔઃఆϑΝΠϧΛ؅ཧ ɾChromeͳͲͷΞϓϦέʔγϣϯ΋؅ཧ ɾhomebrewͷύοέʔδ΋؅ཧ ɾ؆୯ʹΧελϚΠζͰ͖ΔΑ͏ʹ https://blog.adachin.me/archives/5040
 https://github.com/RVIRUS0817/ansible_Mac ansible_Mac
  6. 2019/07/30 Ansible Night in Tokyo 2019.07 ४උ  $ Fork!!!!!!!!!!!!!!!!!!!!!!!!!

    $ cd ansible_Mac $ ./scripts/first.sh 1. run first.sh 2. add role/homedirectory/files 3. add group_vars/all 4. dry-run $ ansible-playbook -i hosts mac.yml -KD -C 5. run $ ansible-playbook -i hosts mac.yml -KD 6. reboot Mac →ॳΊ࣮ͯߦ͢Δ৔߹
  7. 2019/07/30 Ansible Night in Tokyo 2019.07 ·ͱΊ  ɾγϯϓϧʹ࡞Εͨ
 ɾMacͷઃఆ౳ՄࢹԽͰ͖ͨ

    ɾΤϯδχΞಉ࢜ͰಠࣗίϚϯυ౳ڞ༗Ͱ͖ΔΑ͏ʹ ɾ৔ॴʹͱΒΘΕͣgit pullɺansible࣮ߦ͢Δ͚ͩ ɾ࣮ߦ͢Δͷʹ͕͔͔࣌ؒͬͯ͠·͏ ɾͥͻStarΛʂʂʂʂ