在今天升级到12.04期间,我在运行resolvconf包的后安装钩子时出错:
Setting up resolvconf (1.63ubuntu11) ...
resolvconf.postinst: Error: Cannot replace the current /etc/resolv.conf with a symbolic link because it is immutable. To correct this problem, gain root privileges in a terminal and run 'chattr -i /etc/resolv.conf
试图使用Ansible更新不可变文件(在支持属性的文件系统上)失败,出现以下错误。
Operation not permitted
还请参见
示例任务
- name: example
template:
src: example.j2
dest: /some/example
attributes: '+i'
到目前为止,我已经提出了以下选项来处理这个问题,每个选项都有一个缺点。
选项1)
缺点:这两个任务总是在每次运行时更改文件。
- name: Make example mutable (so changes can be applied)
f
Errors were encountered while processing:
/var/cache/apt/archives/openssh-client_1%3a6.6p1-2ubuntu2.10_amd64.deb
/var/cache/apt/archives/openssh-server_1%3a6.6p1-2ubuntu2.10_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
当我做sudo apt-get install openssh-client=1:6.6p1