cec16bd0 by Javier Franco

first commit

0 parents
---
- name: Configure a simple repo with apache
hosts: "{{ server | default('jb_1') }}" # servidor a ser utilizado como repo
become: true
tasks:
- name: install apache
yum:
name: httpd
state: present
tags:
- install_apache
- name: copy the conf file
template:
src: templates/repo.conf
dest: /etc/httpd/conf.d/repo.conf
notify: restart httpd
tags:
- copy_the_conf_file
- name: check firewalld is up
service:
name: firewalld
state: started
tags:
- check_firewalld_is_up
- name: add http service to the firewalld
firewalld:
service: http
permanent: yes
state: enabled
immediate: yes
tags:
- add_http_service_to_the_firewalld
- name: enable the httpd service
service:
name: httpd
state: started
enabled: yes
handlers:
- name: restart httpd
service:
name: httpd
state: restarted
Alias {{ repo_dir | default("/repo/") }} "/opt/repo/"
<Directory "/opt/repo/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
Require all granted
</Directory>
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!