cec16bd0 by Javier Franco

first commit

0 parents
1 ---
2 - name: Configure a simple repo with apache
3 hosts: "{{ server | default('jb_1') }}" # servidor a ser utilizado como repo
4 become: true
5 tasks:
6 - name: install apache
7 yum:
8 name: httpd
9 state: present
10 tags:
11 - install_apache
12
13 - name: copy the conf file
14 template:
15 src: templates/repo.conf
16 dest: /etc/httpd/conf.d/repo.conf
17 notify: restart httpd
18 tags:
19 - copy_the_conf_file
20
21 - name: check firewalld is up
22 service:
23 name: firewalld
24 state: started
25 tags:
26 - check_firewalld_is_up
27
28 - name: add http service to the firewalld
29 firewalld:
30 service: http
31 permanent: yes
32 state: enabled
33 immediate: yes
34 tags:
35 - add_http_service_to_the_firewalld
36
37 - name: enable the httpd service
38 service:
39 name: httpd
40 state: started
41 enabled: yes
42
43 handlers:
44 - name: restart httpd
45 service:
46 name: httpd
47 state: restarted
1 Alias {{ repo_dir | default("/repo/") }} "/opt/repo/"
2 <Directory "/opt/repo/">
3 Options Indexes MultiViews FollowSymLinks
4 AllowOverride None
5 Order allow,deny
6 Allow from all
7 Require all granted
8 </Directory>
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!