Ansibleのインストールについて質問です。
現在下記サイトを参考に学習を進めております。
自分のVagrantfileの設定は下記です。
ボックスイメージの違いのみでそれ以外は参考サイトの通りに進めたつもりです。
現在わからない点がteratermマクロを作ったのを使ってくださいとあり、その使い方がわかりません。
ファイルを作るのか、Vagrantfile
に書き込むのか迷っています。
ここでいうマクロの使い方を教えていただきたく思います。
一応自分のVagrantfile
も載せておきます。
読解力の部分となりそうで、恐縮ですがよろしくお願いします。
bash
1# -*- mode: ruby -*- 2# vi: set ft=ruby : 3 4# All Vagrant configuration is done below. The "2" in Vagrant.configure 5# configures the configuration version (we support older styles for 6# backwards compatibility). Please don't change it unless you know what 7# you're doing. 8Vagrant.configure("2") do |config| 9 config.vm.define "controller" do |node| 10 node.vm.box = "centos/7" 11 node.vm.hostname = "controller" 12 node.vm.network :private_network, ip: "192.168.100.10" 13 node.vm.network :forwarded_port, id: "ssh", guest: 22, host: 2210 14 end 15 config.vm.define "target" do |node| 16 node.vm.box = "centos/7" 17 node.vm.hostname = "target" 18 node.vm.network :private_network, ip: "192.168.100.20" 19 node.vm.network :forwarded_port, id: "ssh", guest: 22, host: 2220 20 end 21 22 # The most common configuration options are documented and commented below. 23 # For a complete reference, please see the online documentation at 24 # https://docs.vagrantup.com. 25 26 # Every Vagrant development environment requires a box. You can search for 27 # boxes at https://vagrantcloud.com/search. 28 config.vm.box = "centos/7" 29 30 # Disable automatic box update checking. If you disable this, then 31 # boxes will only be checked for updates when the user runs 32 # `vagrant box outdated`. This is not recommended. 33 # config.vm.box_check_update = false 34 35 # Create a forwarded port mapping which allows access to a specific port 36 # within the machine from a port on the host machine. In the example below, 37 # accessing "localhost:8080" will access port 80 on the guest machine. 38 # NOTE: This will enable public access to the opened port 39 # config.vm.network "forwarded_port", guest: 80, host: 8080 40 41 # Create a forwarded port mapping which allows access to a specific port 42 # within the machine from a port on the host machine and only allow access 43 # via 127.0.0.1 to disable public access 44 # config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1" 45 46 # Create a private network, which allows host-only access to the machine 47 # using a specific IP. 48 config.vm.network "private_network", ip: "192.168.33.10" 49 50 # Create a public network, which generally matched to bridged network. 51 # Bridged networks make the machine appear as another physical device on 52 # your network. 53 # config.vm.network "public_network" 54 55 # Share an additional folder to the guest VM. The first argument is 56 # the path on the host to the actual folder. The second argument is 57 # the path on the guest to mount the folder. And the optional third 58 # argument is a set of non-required options. 59 # config.vm.synced_folder "../data", "/vagrant_data" 60 61 # Provider-specific configuration so you can fine-tune various 62 # backing providers for Vagrant. These expose provider-specific options. 63 # Example for VirtualBox: 64 # 65 # config.vm.provider "virtualbox" do |vb| 66 # # Display the VirtualBox GUI when booting the machine 67 # vb.gui = true 68 # 69 # # Customize the amount of memory on the VM: 70 # vb.memory = "1024" 71 # end 72 # 73 # View the documentation for the provider you are using for more 74 # information on available options. 75 76 # Enable provisioning with a shell script. Additional provisioners such as 77 # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the 78 # documentation for more information about their specific syntax and use. 79 # config.vm.provision "shell", inline: <<-SHELL 80 # apt-get update 81 # apt-get install -y apache2 82 # SHELL 83end 84
8/11追記
bash
1$sudo yum install ansible 2 3Loaded plugins: fastestmirror 4Loading mirror speeds from cached hostfile 5 * base: ftp.tsukuba.wide.ad.jp 6 * extras: ftp.tsukuba.wide.ad.jp 7 * updates: ftp.tsukuba.wide.ad.jp 8No package ansible available. 9Error: Nothing to do
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/08/10 08:50
2017/08/10 09:01
2017/08/11 09:56
2017/08/11 10:26