最近想利用下面的rsync_opts选项(支持ansible1.6以上)。但由于当前的ansible版本是1.5.4.
于是想直接apt-get update,失败。所以想卸载重新安装下,成功。
-
synchronize: src=/tmp/helloworld dest=/var/www/helloword rsync_opts=--no-motd,--exclude=.git
-
root@MyUbuntu:/etc# ansible --version
-
ansible 1.5.4 ###查看当前版本号
-
root@MyUbuntu:/etc# apt-
-
apt-add-repository apt-cdrom apt-extracttemplates apt-get apt-mark
-
apt-cache apt-config apt-ftparchive apt-key apt-sortpkgs
-
root@MyUbuntu:/etc# apt-get remove ansible ##卸载当前的ansible
-
Reading package lists... Done
-
Building dependency tree
-
Reading state information... Done
-
The following packages were automatically installed and are no longer required:
-
firefox-locale-zh-hans linux-headers-3.13.0-24
-
linux-headers-3.13.0-24-generic linux-image-3.13.0-24-generic
-
linux-image-extra-3.13.0-24-generic python-yaml
-
Use 'apt-get autoremove' to remove them. ##也可以用apt-get autoremove直接卸载
-
The following packages will be REMOVED:
-
ansible
-
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
-
After this operation, 2,758 kB disk space will be freed.
-
Do you want to continue? [Y/n] y
-
(Reading database ... 601559 files and directories currently installed.)
-
Removing ansible (1.5.4+dfsg-1) ...
-
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
-
root@MyUbuntu:/etc# apt-get install ansible ##重新安装ansible
-
Reading package lists... Done
-
Building dependency tree
-
Reading state information... Done
-
The following packages were automatically installed and are no longer required:
-
firefox-locale-zh-hans linux-headers-3.13.0-24
-
linux-headers-3.13.0-24-generic linux-image-3.13.0-24-generic
-
linux-image-extra-3.13.0-24-generic
-
Use 'apt-get autoremove' to remove them.
-
The following extra packages will be installed:
-
sshpass
-
The following NEW packages will be installed:
-
ansible sshpass
-
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
-
Need to get 567 kB of archives.
-
After this operation, 3,854 kB of additional disk space will be used.
-
Do you want to continue? [Y/n] y
-
Get:1 http://cn.archive.ubuntu.com/ubuntu/ trusty/universe sshpass amd64 1.05-1 [10.5 kB]
-
Get:2 http://ppa.launchpad.net/ansible/ansible/ubuntu/ trusty/main ansible all 1.8.2-1ppa~trusty [556 kB]
-
Fetched 567 kB in 11s (51.1 kB/s)
-
Selecting previously unselected package sshpass.
-
(Reading database ... 601235 files and directories currently installed.)
-
Preparing to unpack .../sshpass_1.05-1_amd64.deb ...
-
Unpacking sshpass (1.05-1) ...
-
Selecting previously unselected package ansible.
-
Preparing to unpack .../ansible_1.8.2-1ppa~trusty_all.deb ...
-
Unpacking ansible (1.8.2-1ppa~trusty) ...
-
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
-
Setting up sshpass (1.05-1) ...
-
Setting up ansible (1.8.2-1ppa~trusty) ...
-
-
Configuration file '/etc/ansible/hosts'
-
==> Modified (by you or by a script) since installation.
-
==> Package distributor has shipped an updated version.
-
What would you like to do about it ? Your options are:
-
Y or I : install the package maintainer's version
-
N or O : keep your currently-installed version
-
D : show the differences between the versions
-
Z : start a shell to examine the situation
-
The default action is to keep your current version.
-
*** hosts (Y/I/N/O/D/Z) [default=N] ?
-
-
Configuration file '/etc/ansible/ansible.cfg'
-
==> Modified (by you or by a script) since installation.
-
==> Package distributor has shipped an updated version.
-
What would you like to do about it ? Your options are:
-
Y or I : install the package maintainer's version
-
N or O : keep your currently-installed version
-
D : show the differences between the versions
-
Z : start a shell to examine the situation
-
The default action is to keep your current version.
-
*** ansible.cfg (Y/I/N/O/D/Z) [default=N] ? N
-
Processing triggers for python-support (1.0.15) ...
-
root@MyUbuntu:/etc# ansible --version
-
ansible 1.8.2
-
configured module search path = /usr/share/ansible
阅读(2207) | 评论(0) | 转发(0) |