Skip to content

Commit 6d4d502

Browse files
author
Sebastian Gumprich
committed
install python3 on debian10
Signed-off-by: Sebastian Gumprich <sebastian.gumprich@t-systems.com>
1 parent cfa8d7d commit 6d4d502

File tree

1 file changed

+21
-22
lines changed

1 file changed

+21
-22
lines changed

molecule/os_hardening/prepare.yml

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,62 @@
11
---
2-
- name: wrapper playbook for kitchen testing "ansible-os-hardening" with custom vars for testing
2+
- name: Wrapper playbook for kitchen testing "ansible-os-hardening" with custom vars for testing
33
hosts: all
44
become: true
55
environment:
66
http_proxy: "{{ lookup('env', 'http_proxy') | default(omit) }}"
77
https_proxy: "{{ lookup('env', 'https_proxy') | default(omit) }}"
88
no_proxy: "{{ lookup('env', 'no_proxy') | default(omit) }}"
99
tasks:
10-
- name: set ansible_python_interpreter to "/usr/bin/python3" on fedora
11-
set_fact:
12-
ansible_python_interpreter: "/usr/bin/python3"
13-
when: ansible_facts.distribution == 'Fedora'
14-
15-
- name: Run the equivalent of "apt-get update && apt-get upgrade"
16-
apt:
17-
name: "*"
18-
state: latest
10+
- name: Install Python3 on Debian 10
11+
ansible.builtin.apt:
12+
name: python3
13+
state: present
1914
update_cache: true
2015
when: ansible_os_family == 'Debian'
2116

22-
- name: install required tools on SuSE
17+
- name: Set ansible_python_interpreter to "/usr/bin/python3"
18+
ansible.builtin.set_fact:
19+
ansible_python_interpreter: /usr/bin/python3
20+
21+
- name: Install required tools on SuSE
2322
# cannot use zypper module, since it depends on python-xml
24-
shell: "zypper -n install python-xml"
23+
ansible.builtin.shell: zypper -n install python-xml
2524
when: ansible_facts.os_family == 'Suse'
2625

27-
- name: install required tools on fedora
28-
dnf:
26+
- name: Install required tools on fedora
27+
ansible.builtin.dnf:
2928
name:
3029
- python
3130
- findutils
3231
- procps-ng
3332
when: ansible_facts.distribution == 'Fedora'
3433

35-
- name: install required tools on Arch
34+
- name: Install required tools on Arch
3635
community.general.pacman:
3736
name:
3837
- awk
3938
state: present
4039
update_cache: true
4140
when: ansible_facts.os_family == 'Archlinux'
4241

43-
- name: install required tools on RHEL # noqa ignore-errors
44-
yum:
42+
- name: Install required tools on RHEL # noqa ignore-errors
43+
ansible.builtin.yum:
4544
name:
4645
- openssh-clients
4746
- openssh
4847
state: present
4948
update_cache: true
5049
ignore_errors: true
5150

52-
- name: create recursing symlink to test minimize access
53-
shell: "rm -f /usr/bin/zzz && ln -s /usr/bin /usr/bin/zzz"
51+
- name: Create recursing symlink to test minimize access
52+
ansible.builtin.shell: rm -f /usr/bin/zzz && ln -s /usr/bin /usr/bin/zzz
5453
changed_when: false
5554

56-
- name: include YUM prepare tasks
57-
include_tasks: prepare_tasks/yum.yml
55+
- name: Include YUM prepare tasks
56+
ansible.builtin.include_tasks: prepare_tasks/yum.yml
5857
when: ansible_facts.os_family == 'RedHat'
5958

60-
- name: include preparation tasks
59+
- name: Include preparation tasks
6160
ansible.builtin.include_tasks:
6261
file: "{{ item }}"
6362
loop:

0 commit comments

Comments
 (0)