質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

Vagrant

Vagrantは、VirtualBox上の仮想マシンを コマンドラインから作成してくれるソフトウェアです。 ビルド環境など容易に構築が可能です。

Ansible

Ansibleは、Python で書かれたサーバーの設定を管理するための 構成管理ツールです。

Q&A

解決済

1回答

3993閲覧

Vagrant で Ansible が上手く走らない

AKIHIROYAJIMA

総合スコア10

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

Vagrant

Vagrantは、VirtualBox上の仮想マシンを コマンドラインから作成してくれるソフトウェアです。 ビルド環境など容易に構築が可能です。

Ansible

Ansibleは、Python で書かれたサーバーの設定を管理するための 構成管理ツールです。

0グッド

0クリップ

投稿2015/07/14 08:42

編集2015/07/14 08:47

vagrant up をすると
hostnamectl: command not found と怒られてしまいます。
どこを修正していけばいいのでしょうか…。

情報が足りない部分ありましたら、ご指摘していただけますとありがたいです。

$ vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Importing base box 'ubuntu12.04'... ==> default: Matching MAC address for NAT networking... ==> default: Setting the name of the VM: ietty_default_1436859130223_77096 ==> default: Clearing any previously set forwarded ports... ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat default: Adapter 2: hostonly ==> default: Forwarding ports... default: 3000 => 3000 (adapter 1) default: 22 => 2222 (adapter 1) ==> default: Running 'pre-boot' VM customizations... ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2222 default: SSH username: vagrant default: SSH auth method: private key default: Warning: Connection timeout. Retrying... default: default: Vagrant insecure key detected. Vagrant will automatically replace default: this with a newly generated keypair for better security. default: default: Inserting generated public key within guest... default: Removing insecure key from the guest if it's present... default: Key inserted! Disconnecting and reconnecting using new SSH key... ==> default: Machine booted and ready! ==> default: Checking for guest additions in VM... default: The guest additions on this VM do not match the installed version of default: VirtualBox! In most cases this is fine, but in rare cases it can default: prevent things such as shared folders from working properly. If you see default: shared folder errors, please make sure the guest additions within the default: virtual machine match the version of VirtualBox you have installed on default: your host and reload your VM. default: default: Guest Additions Version: 4.2.10 default: VirtualBox Version: 5.0 ==> default: Setting hostname... The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed! hostnamectl set-hostname 'ubuntu-VirtualVox' Stdout from the command: Stderr from the command: stdin: is not a tty bash: line 2: hostnamectl: command not found

hostnamectl に関する部分を調べていてもあまり理解できず解決せずです…。

vagrant provision をすると

$ vagrant provision ==> default: Running provisioner: ansible... PLAY [vagrant] **************************************************************** GATHERING FACTS *************************************************************** fatal: [192.168.33.10] => SSH Error: ssh: connect to host 192.168.33.10 port 22: Operation timed out while connecting to 192.168.33.10:22 It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue. TASK: [ubuntu | install essential packages] *********************************** FATAL: no hosts matched or all hosts have already failed -- aborting PLAY RECAP ******************************************************************** to retry, use: --limit @/Users/ietty/provision_vagrant.retry 192.168.33.10 : ok=0 changed=0 unreachable=1 failed=0 Ansible failed to complete successfully. Any error output should be visible above. Please fix these errors and try again.

となってしまいます。
よろしくお願いします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

jcs502ulf

2015/07/14 10:00

vagrantのコンフィグファイル(Vagrantfile)は公開可能でしょうか。
guest

回答1

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問