¥¤¥ó¥¹¥È¡¼¥ë


  1. homebrew ÈǤΠpython ¤Ø¤Î Ansible ¤Î¥¤¥ó¥¹¥È¡¼¥ë¤Ï¼ºÇÔ¤¹¤ë¤Î¤Ç¡¢¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¥¢¥ó¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë
    $ brew uninstall python
  2. xcode (´ÞappleÈÇpython) ¤ò¥¤¥ó¥¹¥È¡¼¥ë
    $ xcode-select --install
  3. pip ¤ò¥¤¥ó¥¹¥È¡¼¥ë
    $ easy_install --user pip
    Mac OSX ¤Ç¤Ï¡¢"--user" ¤òÆþ¤ì¤Æ¡¢¥í¥°¥¤¥ó¥æ¡¼¥¶¤Î¥í¡¼¥«¥ë´Ä¶­¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ë¤è¤¦¤Ë¤·¤Ê¤¤¤È¥¤¥ó¥¹¥È¡¼¥ë¤Ë¼ºÇÔ¤¹¤ë
  4. ansible ¤ò¥¤¥ó¥¹¥È¡¼¥ë
    $ pip install --user ansible --upgrade
    $ ansible --version
    ansible 2.1.0.0
      config file =
      configured module search path = Default w/o overrides
  5. ¥ë¡¼¥È¤Î ansible.cfg ¤òÇÛÃÖ
    $ sudo mkdir /etc/ansible
    $ sudo curl -L https://raw.githubusercontent.com/ansible/ansible/devel/examples/ansible.cfg -o /etc/ansible/ansible.cfg
    ¤Û¤ÜÁ´Éô¥³¥á¥ó¥È¤Ê¤ó¤Ç̵¤¯¤Æ¤â¤¤¤¤¤±¤É¡¢¥ê¥Õ¥¡¥ì¥ó¥¹¤È¤·¤ÆÆþ¤ì¤Æ¤ª¤¯
  6. ¥Õ¥¡¥¤¥ë¡¦¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Î¾å¸Â¤òÂ礭¤¯¤¹¤ë (ansible ¤Ç¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¤Î 256 ¤Ç¤Ï­¤ê¤Ê¤¤)
    • /Library/LaunchDaemons?/limit.maxfiles.plist
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
              "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
      <plist version="1.0">
        <dict>
          <key>Label</key>
          <string>limit.maxfiles</string>
          <key>ProgramArguments</key>
          <array>
            <string>launchctl</string>
            <string>limit</string>
            <string>maxfiles</string>
            <string>524288</string>
            <string>524288</string>
          </array>
          <key>RunAtLoad</key>
          <true/>
          <key>ServiceIPC</key>
          <false/>
        </dict>
      </plist>
      
    • ³Îǧ
      $ launchctl limit maxfiles
       maxfiles    524288            524288
      $ ulimit -n
      524288

CentOS7 ¤ò Vagrant ¤Çµ¯Æ°¤¹¤ë

$ cd sourcetree/AnsibleExam/nginx
$ vagrant init centos/7
$ vagrant up
vbox.png

¤³¤Î¥×¥í¥¸¥§¥¯¥È¸þ¤±¤Î ansible ¤ÎÀßÄê

ansible ¥³¥Þ¥ó¥É¤Î¼Â¹Ô

$ ansible testserver -m ping
testserver | SUCCESS => {
    "changed": false,
    "ping": "pong"
}
$ ansible testserver -m command -a uptime
testserver | SUCCESS | rc=0 >>
 10:26:47 up  1:04,  1 user,  load average: 0.00, 0.01, 0.05

¤¦¤Þ¤¯Æ°¤¤¤Æ¤¤¤ë¤è¤¦¤À

ansible ¤Î¥â¥¸¥å¡¼¥ë

Playbook ¤Ç nginx ¤ò¥¤¥ó¥¹¥È¡¼¥ë¡¦ÀßÄê

vagrant up ¤Ç ansible ¤ò¸Æ¤Ó½Ð¤¹


Ansible


źÉÕ¥Õ¥¡¥¤¥ë: filenginx.png 1948·ï [¾ÜºÙ] filevbox.png 1858·ï [¾ÜºÙ]

¥È¥Ã¥×   ÊÔ½¸ Åà·ë º¹Ê¬ ¥Ð¥Ã¥¯¥¢¥Ã¥× źÉÕ Ê£À½ ̾Á°Êѹ¹ ¥ê¥í¡¼¥É   ¿·µ¬ °ìÍ÷ ñ¸ì¸¡º÷ ºÇ½ª¹¹¿·   ¥Ø¥ë¥×   ºÇ½ª¹¹¿·¤ÎRSS   sitemap
Last-modified: 2016-06-19 (Æü) 01:01:02 (3059d)
Short-URL: http://at-sushi.com/pukiwiki/index.php?cmd=s&k=4c7a9e22ab
ISBN10
ISBN13
9784061426061