Slide 1

Slide 1 text

2019/07/30 Ansible Night in Tokyo 2019.07 MacΛAnsibleͰ
 ߏ੒؅ཧͪ͠Ό͓ͬͨ࿩ Lancers,Inc
 @adachin0817/SRE

Slide 2

Slide 2 text

2019/07/30 Ansible Night in Tokyo 2019.07 ΞδΣϯμ ɾࣗݾ঺հ ɾݸਓతͳ͓࿩ ɾansible_MacΛ࡞ͬͨΘ͚ ɾߏ੒ ɾ࢖͍ํ ɾσϞ ɾ·ͱΊ

Slide 3

Slide 3 text

2019/07/30 Ansible Night in Tokyo 2019.07 ࣗݾ঺հ

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

2019/07/30 Ansible Night in Tokyo 2019.07 ݸਓతͳ͓࿩

Slide 6

Slide 6 text

2019/07/30 Ansible Night in Tokyo 2019.07 ݸਓϒϩάΛDigitalOceanʹҠߦ https://blog.adachin.me/archives/10635 γϯΨϙʔϧϦʔδϣϯ ʹͳΓ·ͨ͠✌ ౦ژϦʔδϣϯ͔Β

Slide 7

Slide 7 text

2019/07/30 Ansible Night in Tokyo 2019.07 ϥϯαʔζΛࢧ͑Δٕज़

Slide 8

Slide 8 text

2019/07/30 Ansible Night in Tokyo 2019.07 ansible_MacΛ࡞ͬͨΘ͚

Slide 9

Slide 9 text

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ͳͲͰ؅ཧ

Slide 10

Slide 10 text

2019/07/30 Ansible Night in Tokyo 2019.07 օ͞Μ͜Μͳܦݧ͋Γ·ͤΜ͔ʁ ɾࠓ·Ͱ͸gistΛ࢖ͬͯ؅ཧ(Θ͔Δ) ɾίϐϖͰରԠ(μα͍✌) ɾԿΛมߋͨ͠ͷ͔๨ΕͯݸਓͷPCͱ૬ҧ͕ग़Δ(ന໨)
 ɾస৬ͨ͠ͱ͖(ങ͍ସ͑)ʹηοτΞοϓ͕μϧ͍ ɾ͍ͭ΋ೖΕͯΔΞϓϦέʔγϣϯͳΜ͚ͩͬ ɾ؂ࠪͳͲͰTime machine͕࢖͑ͳ͍ ɾTime machineͰ΋͍͍͕ແବͳ΋ͷ͸ೖΕͨ͘ͳ͍

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

2019/07/30 Ansible Night in Tokyo 2019.07 ߏ੒

Slide 13

Slide 13 text

2019/07/30 Ansible Night in Tokyo 2019.07 ߏ੒ ɾroles͸3ͭ ɾϩʔΧϧϗετͰ࣮ߦ ɾgroup_vars/allʹͯύοέʔδ໊Λ؅ཧ

Slide 14

Slide 14 text

2019/07/30 Ansible Night in Tokyo 2019.07 ./scripts/first.sh ɾ·ͣ͸HomebrewͱAnsibleΛΠϯετʔϧ

Slide 15

Slide 15 text

2019/07/30 Ansible Night in Tokyo 2019.07 roles/homebrew/tasks/main.yml

Slide 16

Slide 16 text

2019/07/30 Ansible Night in Tokyo 2019.07 roles/homebrew-cask/tasks/main.yml

Slide 17

Slide 17 text

2019/07/30 Ansible Night in Tokyo 2019.07 roles/homedirectory/tasks/main.yml

Slide 18

Slide 18 text

2019/07/30 Ansible Night in Tokyo 2019.07 group_vars/all group_vars/allΛݟΕ͹Կ͕ೖ͍ͬͯΔ͔Θ͔Δʂ

Slide 19

Slide 19 text

2019/07/30 Ansible Night in Tokyo 2019.07 ࢖͍ํ

Slide 20

Slide 20 text

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 →ॳΊ࣮ͯߦ͢Δ৔߹

Slide 21

Slide 21 text

2019/07/30 Ansible Night in Tokyo 2019.07 group_vars/all

Slide 22

Slide 22 text

2019/07/30 Ansible Night in Tokyo 2019.07 σϞ΍Γ·;

Slide 23

Slide 23 text

2019/07/30 Ansible Night in Tokyo 2019.07 ·ͱΊ

Slide 24

Slide 24 text

2019/07/30 Ansible Night in Tokyo 2019.07 ·ͱΊ ɾγϯϓϧʹ࡞Εͨ
 ɾMacͷઃఆ౳ՄࢹԽͰ͖ͨ ɾΤϯδχΞಉ࢜ͰಠࣗίϚϯυ౳ڞ༗Ͱ͖ΔΑ͏ʹ ɾ৔ॴʹͱΒΘΕͣgit pullɺansible࣮ߦ͢Δ͚ͩ ɾ࣮ߦ͢Δͷʹ͕͔͔࣌ؒͬͯ͠·͏ ɾͥͻStarΛʂʂʂʂ

Slide 25

Slide 25 text

2019/07/30 Ansible Night in Tokyo 2019.07 ͝ਗ਼ௌ
 ͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ