Skip to content
This repository was archived by the owner on Dec 26, 2020. It is now read-only.

Commit f4cdcc0

Browse files
authored
Merge pull request #281 from kostasns/fix_fedora_build
fix: Ansible part of Fedora build
2 parents 12f5a8c + f410688 commit f4cdcc0

File tree

2 files changed

+22
-10
lines changed

2 files changed

+22
-10
lines changed

tests/default.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,17 @@
22
- name: wrapper playbook for kitchen testing "ansible-ssh-hardening" with default settings
33
hosts: localhost
44
pre_tasks:
5-
- package: name="{{item}}" state=present
6-
with_items:
7-
- "openssh-client"
8-
- "openssh-server"
9-
- "python-selinux"
5+
- name: use python3
6+
set_fact:
7+
ansible_python_interpreter: /usr/bin/python3
8+
when: ansible_facts.distribution == 'Fedora'
9+
10+
- package: name="{{ packages }}" state=present
11+
vars:
12+
packages:
13+
- openssh-clients
14+
- openssh-server
15+
- libselinux-python
1016
ignore_errors: true
1117
- apt: name="{{packages}}" state=present update_cache=true
1218
vars:

tests/default_custom.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,17 @@
22
- name: wrapper playbook for kitchen testing "ansible-ssh-hardening" with custom settings
33
hosts: localhost
44
pre_tasks:
5-
- package: name="{{item}}" state=present
6-
with_items:
7-
- "openssh-clients"
8-
- "openssh-server"
9-
- "libselinux-python"
5+
- name: use python3
6+
set_fact:
7+
ansible_python_interpreter: /usr/bin/python3
8+
when: ansible_facts.distribution == 'Fedora'
9+
10+
- package: name="{{ packages }}" state=present
11+
vars:
12+
packages:
13+
- openssh-clients
14+
- openssh-server
15+
- libselinux-python
1016
ignore_errors: true
1117
- apt: name="{{packages}}" state=present update_cache=true
1218
vars:

0 commit comments

Comments
 (0)