{{ cat }}'s docs

1.3.3.1: PLAYBOOK-copy error


1. 错误信息

Aborting, target uses selinux but python bindings (libselinux-python) aren't installed!" ansible


2. 解决办法

1) 手动操作:在对方节点上安装libselinux-python

yum install epel-release
yum install libselinux-python

2) 使用ansible任务:在执行copy之前添加下面的task

- name: env prepare
  yum: name={{ item }} state=latest
  with_items:
    - epel-release
    - libselinux-python