Chinaunix首页 | 论坛 | 博客
  • 博客访问: 482148
  • 博文数量: 108
  • 博客积分: 25
  • 博客等级: 民兵
  • 技术积分: 1134
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-29 19:43
文章分类

全部博文(108)

文章存档

2016年(10)

2015年(9)

2014年(73)

2013年(16)

我的朋友

分类: 系统运维

2015-02-10 13:04:43

最近想利用下面的rsync_opts选项(支持ansible1.6以上)。但由于当前的ansible版本是1.5.4.
于是想直接apt-get update,失败。所以想卸载重新安装下,成功。

点击(此处)折叠或打开

  1. synchronize: src=/tmp/helloworld dest=/var/www/helloword rsync_opts=--no-motd,--exclude=.git

点击(此处)折叠或打开

  1. root@MyUbuntu:/etc# ansible --version
  2. ansible 1.5.4 ###查看当前版本号
  3. root@MyUbuntu:/etc# apt-
  4. apt-add-repository apt-cdrom apt-extracttemplates apt-get apt-mark
  5. apt-cache apt-config apt-ftparchive apt-key apt-sortpkgs
  6. root@MyUbuntu:/etc# apt-get remove ansible ##卸载当前的ansible
  7. Reading package lists... Done
  8. Building dependency tree
  9. Reading state information... Done
  10. The following packages were automatically installed and are no longer required:
  11.   firefox-locale-zh-hans linux-headers-3.13.0-24
  12.   linux-headers-3.13.0-24-generic linux-image-3.13.0-24-generic
  13.   linux-image-extra-3.13.0-24-generic python-yaml
  14. Use 'apt-get autoremove' to remove them. ##也可以用apt-get autoremove直接卸载
  15. The following packages will be REMOVED:
  16.   ansible
  17. 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
  18. After this operation, 2,758 kB disk space will be freed.
  19. Do you want to continue? [Y/n] y
  20. (Reading database ... 601559 files and directories currently installed.)
  21. Removing ansible (1.5.4+dfsg-1) ...
  22. Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
  23. root@MyUbuntu:/etc# apt-get install ansible ##重新安装ansible
  24. Reading package lists... Done
  25. Building dependency tree
  26. Reading state information... Done
  27. The following packages were automatically installed and are no longer required:
  28.   firefox-locale-zh-hans linux-headers-3.13.0-24
  29.   linux-headers-3.13.0-24-generic linux-image-3.13.0-24-generic
  30.   linux-image-extra-3.13.0-24-generic
  31. Use 'apt-get autoremove' to remove them.
  32. The following extra packages will be installed:
  33.   sshpass
  34. The following NEW packages will be installed:
  35.   ansible sshpass
  36. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  37. Need to get 567 kB of archives.
  38. After this operation, 3,854 kB of additional disk space will be used.
  39. Do you want to continue? [Y/n] y
  40. Get:1 http://cn.archive.ubuntu.com/ubuntu/ trusty/universe sshpass amd64 1.05-1 [10.5 kB]
  41. Get:2 http://ppa.launchpad.net/ansible/ansible/ubuntu/ trusty/main ansible all 1.8.2-1ppa~trusty [556 kB]
  42. Fetched 567 kB in 11s (51.1 kB/s)
  43. Selecting previously unselected package sshpass.
  44. (Reading database ... 601235 files and directories currently installed.)
  45. Preparing to unpack .../sshpass_1.05-1_amd64.deb ...
  46. Unpacking sshpass (1.05-1) ...
  47. Selecting previously unselected package ansible.
  48. Preparing to unpack .../ansible_1.8.2-1ppa~trusty_all.deb ...
  49. Unpacking ansible (1.8.2-1ppa~trusty) ...
  50. Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
  51. Setting up sshpass (1.05-1) ...
  52. Setting up ansible (1.8.2-1ppa~trusty) ...

  53. Configuration file '/etc/ansible/hosts'
  54.  ==> Modified (by you or by a script) since installation.
  55.  ==> Package distributor has shipped an updated version.
  56.    What would you like to do about it ? Your options are:
  57.     Y or I : install the package maintainer's version
  58.     N or O : keep your currently-installed version
  59.       D : show the differences between the versions
  60.       Z : start a shell to examine the situation
  61.  The default action is to keep your current version.
  62. *** hosts (Y/I/N/O/D/Z) [default=N] ?

  63. Configuration file '/etc/ansible/ansible.cfg'
  64.  ==> Modified (by you or by a script) since installation.
  65.  ==> Package distributor has shipped an updated version.
  66.    What would you like to do about it ? Your options are:
  67.     Y or I : install the package maintainer's version
  68.     N or O : keep your currently-installed version
  69.       D : show the differences between the versions
  70.       Z : start a shell to examine the situation
  71.  The default action is to keep your current version.
  72. *** ansible.cfg (Y/I/N/O/D/Z) [default=N] ? N
  73. Processing triggers for python-support (1.0.15) ...
  74. root@MyUbuntu:/etc# ansible --version
  75. ansible 1.8.2
  76.   configured module search path = /usr/share/ansible


阅读(2207) | 评论(0) | 转发(0) |
0

上一篇:Python socket programming

下一篇:Git 学习笔记

给主人留下些什么吧!~~