1
的劇本:如何使用Ansible在Ubuntu上禁用SELinux?
---
- name: Update repositories cache
apt: update_cache=yes
- name: Install build-essential
apt: name=build-essential state=present
- name: Disable SELinux
selinux: state=disabled
結果:
TASK [common : Update repositories cache] ***************************************************************************************************************************************************************************************************
changed: [server]
TASK [common : Install build-essential] *****************************************************************************************************************************************************************************************************
ok: [server]
TASK [common : Disable SELinux] *************************************************************************************************************************************************************************************************************
fatal: [server]: FAILED! => {"changed": false, "failed": true, "msg": "libselinux-python required for this module"}
我試圖找到libselinux-python
但它似乎是不存在的。當我嘗試其他庫如python-selinux
時,不能在系統上安裝。
我試過,但它說:'致命的:[服務器]:失敗! => {「changed」:false,「failed」:true,「msg」:「沒有與'libselinux-python'匹配的包'}'。 –
@cloud_cloud希望這會有幫助看看https://packages.ubuntu.com/source/trusty-updates/libselinux –
非常感謝。但是這一次:'致命的:[rancherserver]:失敗! => {「changed」:false,「failed」:true,「module_stderr」:「與192.168.33.111關閉的共享連接。\ r \ n」,「module_stdout」:「Traceback(最近一次調用最後一次):\ r \ n File \「/ tmp/ansible_T58IMt/ansible_module _selinux.py \」,第226行,在'。 –