momo22017/07/18 21:49moonphase様 回答していただき、誠にありがとうございます。 1、squidのplaybook からrole を実行していますが以下のようなエラー文がでてしまい先に進めません。 FAILED! => {"ansible_facts": {}, "changed": false, "failed": true, "message": "Unable to find 'Core.yml' in expected paths."} core.ymlが必要なのでしょうか?いろいろ調べて試しましたが分からずお教えいただけませんか? 2、またlineinfile で文の編集ができるのは分かりましたが、複数の文の追記はできないのでしょうか? ・blockinfile コマンドもありましたがエラーが出てしまい、こちらも先に進めず・・・ ・copyでファイル自体を置き換える http://dev.classmethod.jp/server-side/ansible/ansible-file-modules-intro/
moonphase2017/07/19 01:07先に回答したのは私の環境でも動きませんでした。 改めて手元で動いた手順を案内しておきます。 git clone https://github.com/mrlesmithjr/ansible-squid.git cd ansible-squid sudo ansible-galaxy install -r requirements.yml -f ansible-playbook --connection=local -i tests/inventory tests/test.yml 複数行の追記はおっしゃるとおりblockinfileが良いかもしれません。 http://blog.enjoyxstudy.com/entry/2016/02/24/000000
momo22017/07/20 01:54 編集moonphase様 手順の方、大変ありがとうございました。 root@localhost ansible-squid]# rpm -qa | grep squid squid-3.5.20-2.el7_3.2.x86_64 squid-migration-script-3.5.20-2.el7_3.2.x86_64 上記のように[localhost] 内にはsquid.conf確認できましたが、仮想サーバー使用時、 PLAY [------] *********** skipping: no hosts matched と出てしまいます。hosts内にipアドレスを指定しても出来ますでしょうか? sshで接続後の仮想マシンのipアドレスにsquidを構築させる必要があると思いまして。 お願い致します。
momo22017/08/06 17:23moonphase様 すいません、squidの方は出来ましたが、教えていただいたこちらの方ですが、上手くインストール出来ていませんでした。 httpdのplaybook https://galaxy.ansible.com/bertvv/httpd/ squidと同様に、できれば、インストールの方法をお教えいただけないでしょうか? お願いします!!
momo22017/08/06 17:27git clone https://github.com/bertvv/ansible-role-httpd.git cd ansible-role-httpd ansible-playbook --connection=local -i tests/inventory test.yml このような感じになるのでしょうか?
moonphase2017/08/08 07:21私の環境では記載の通り、以下を順に実行して行けました。 git clone https://github.com/mrlesmithjr/ansible-squid.git cd ansible-squid sudo ansible-galaxy install -r requirements.yml -f ansible-playbook --connection=local -i tests/inventory tests/test.yml
momo22017/08/10 08:38ご連絡有難うございます! 私の理解不足かもしれませんが、 こちらはsquidのgitファイルですよね? httpdも同じplaybookで出来るのでしょうか? コメントして頂いてから考えていましたが、すいません。分からなかったです。 git clone https://github.com/bertvv/ansible-role-httpd.git cd ansible-role-httpd ansible-playbook --connection=local -i tests/inventory test.yml こちらではありませんか?
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/07/18 21:49
2017/07/19 01:07
2017/07/20 01:54 編集
2017/08/06 17:21 編集
2017/08/06 17:23
2017/08/06 17:27
2017/08/08 07:21
2017/08/10 08:38
2017/08/15 10:09