ansible-playbookコマンドを用いて、
対象サーバ上の特定のrpmパッケージをyum remove同様に削除したいのですが
エラーが発生し、処理が途中で止まっていまいます。
また、ansibleの処理自体は途中で止まっているのですが、
yum removeは完了しているのです。
原因がつかめないため何か心当たりが思いつく方は助言頂けますと幸いです。
#実行時のログと設定内容
Postgresql9.4を入れた後、古いPostgresql-libsを消そうとしています。
▼実行時のログ
Bash
1ansible-playbook -k -i hosts postgresql_common.yml 2SSH password: 3 4PLAY [Development] ************************************************************ 5 6GATHERING FACTS *************************************************************** 7ok: [xx.xx.xx.xx] 8 9TASK: [postgresql_common | Install postgres process] ************************** 10changed: [xx.xx.xx.xx] => (item=postgresql94,postgresql94-devel,postgresql94-libs,postgresql94-contrib) 11 12TASK: [postgresql_common | remove old postgresql packages] ******************** 13failed: [xx.xx.xx.xx] => {"changed": false, "failed": true, "rc": 0, "results": ["Loaded plugins: fastestmirror, security, versionlock 14Setting up Remove Process 15Resolving Dependencies 16--> Running transaction check 17---> Package postgresql-libs.x86_64 0:8.4.20-5.el6_7 will be erased 18--> Finished Dependency Resolution 19 20Dependencies Resolved 21 22================================================================================ 23 Package Arch Version Repository Size 24================================================================================ 25Removing: 26 postgresql-libs x86_64 8.4.20-5.el6_7 @updates 625 k 27 28Transaction Summary 29================================================================================ 30Remove 1 Package(s) 31 32Installed size: 625 k 33Downloading Packages: 34Running rpm_check_debug 35Running Transaction Test 36Transaction Test Succeeded 37Running Transaction 38 Erasing : postgresql-libs-8.4.20-5.el6_7.x86_64 1/1 39 Verifying : postgresql-libs-8.4.20-5.el6_7.x86_64 1/1 40 41Removed: 42 postgresql-libs.x86_64 0:8.4.20-5.el6_7 43Complete! 44"]} 45 46FATAL: all hosts have already failed -- aborting 47 48PLAY RECAP ******************************************************************** 49 to retry, use: --limit @/Users/akinorisakamoto/postgresql_common.retry 50 51xx.xx.xx.xx : ok=2 changed=1 unreachable=0 failed=1
▼設定ファイル
- name: Install postgres process yum: name={{ item }} state=present enablerepo=pgdg94 disable_gpg_check=yes with_items: - postgresql94 - postgresql94-devel - postgresql94-libs - postgresql94-contrib tags: - postgresql_common - name: remove old postgresql packages yum: name=postgresql-libs state=absent - name: Postgresql PATH shell: | echo 'export PATH=$PATH:/usr/pgsql-9.4/bin'>>/root/.bash_profile echo 'export PATH=$PATH:/usr/pgsql-9.4/bin'>>/home/deploy/.bash_profile tags: - postgresql_common
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/03/25 00:04