Skip to content

Commit

Permalink
missing a package, move to var defined packages
Browse files Browse the repository at this point in the history
  • Loading branch information
correcthorse committed Sep 29, 2019
1 parent 9cc3db9 commit 123be85
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 21 deletions.
31 changes: 10 additions & 21 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,30 @@
---
- name: gather os specific variables
include_vars: "{{ item }}"
with_first_found:
- "{{ ansible_os_family }}-{{ ansible_distribution_major_version}}.yml"
- "{{ ansible_os_family }}.yml"
tags: vars

- name: configure yum repos
include: repos.yml

- name: install selinux fact dependency
yum: name=libselinux-python state=present
yum: name="{{ _common_libselinux }}" state=present
tags:
- selinux
- packages

- name: install selinux management dependency
yum: name=libsemanage-python state=present
when: ansible_distribution_major_version|int < 8
yum: name="{{ _common_libsemanage }}" state=present
tags:
- selinux
- packages

- name: install selinux management dependency
yum: name=python3-libselinux state=present
when: ansible_distribution_major_version|int > 7
tags:
- selinux
- packages

- name: ensure python crypto is installed
yum:
name: python2-cryptography
state: present
when: ansible_distribution_major_version|int < 8
tags:
- hitch
- packages

- name: ensure python crypto is installed
yum:
name: python3-cryptography
name: "{{ _common_cryptography }}"
state: present
when: ansible_distribution_major_version|int > 7
tags:
- hitch
- packages
Expand Down
4 changes: 4 additions & 0 deletions vars/RedHat-6.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
_common_libselinux: libselinux-python
_common_libsemanage: libsemanage-python
_common_cryptography: python2-cryptography
4 changes: 4 additions & 0 deletions vars/RedHat-7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
_common_libselinux: libselinux-python
_common_libsemanage: libsemanage-python
_common_cryptography: python2-cryptography
4 changes: 4 additions & 0 deletions vars/RedHat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
_common_libselinux: python3-libselinux
_common_libsemanage: python3-libsemanage
_common_cryptography: python3-cryptography

0 comments on commit 123be85

Please sign in to comment.