forked from redhat-nfvpe/rhel-local-mirrors
-
Notifications
You must be signed in to change notification settings - Fork 1
/
prepare_system.yml
37 lines (33 loc) · 930 Bytes
/
prepare_system.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
- block:
- name: Install needed packages for reposync
package:
name: "{{ item }}"
state: present
with_items:
- createrepo
- yum-utils
- httpd
- name: Install needed packaged for firewalld
package:
name: "{{ item }}"
state: present
with_items:
- python-firewall
- name: Check if firewalld is running
command: systemctl is-active firewalld
ignore_errors: yes
changed_when: false
register: firewalld_service_status
- name: Open firewall port for http (firewall)
firewalld:
service: http
permanent: true
state: enabled
immediate: true
when: firewalld_service_status.stdout == 'active'
- name: Create directory to contain mirrors
file:
path: "/var/www/html"
state: directory
mode: 0755
become: true