diff --git a/playbooks/dependencies.yml b/playbooks/dependencies.yml new file mode 100644 index 0000000..cf944ad --- /dev/null +++ b/playbooks/dependencies.yml @@ -0,0 +1,8 @@ +--- +- hosts: all + name: Ansible python bindings + tasks: + - import_tasks: tasks/centos/bindings.yml + when: ansible_distribution == "CentOS" + - import_tasks: tasks/fedora/bindings.yml + when: ansible_distribution == "Fedora" diff --git a/tasks/centos/bindings.yml b/tasks/centos/bindings.yml new file mode 100644 index 0000000..182bae7 --- /dev/null +++ b/tasks/centos/bindings.yml @@ -0,0 +1,9 @@ +--- +- name: Install python bindings using YUM + become: true + yum: + state: latest + name: + - libselinux-python + - policycoreutils-python + - python-firewall diff --git a/tasks/fedora/bindings.yml b/tasks/fedora/bindings.yml new file mode 100644 index 0000000..9ba0928 --- /dev/null +++ b/tasks/fedora/bindings.yml @@ -0,0 +1,9 @@ +--- +- name: Install python bindings using DNF + become: true + dnf: + state: latest + name: + - libselinux-python + - policycoreutils-python + - python3-firewall