Blog_IMIE/ops/ansible/httpd-centos.yml
2018-11-01 16:57:25 +01:00

48 lines
893 B
YAML

---
- hosts: hifive
become: yes
become_user: root
tasks:
- name: Yum update
yum:
name: '*'
state: latest
- name: Install httpd
yum:
name: httpd
state: latest
- name: Systemd enable httpd
systemd:
name: httpd
enabled: yes
masked: no
- name: Systemd start httpd
systemd:
name: httpd
state: started
- name: Permissions httpd
file:
path: /var/www
owner: apache
group: apache
recurse: yes
#- htpasswd:
#path: /etc/apache2/.htpasswd
#name: hifive
#password: hifive
#owner: root
#group: www-data
#mode: 0640
#
#- name: Create virtual host file
#template:
#src: virtualhost.j2
#dest: /etc/apache2/sites-available/{{ domain }}.conf
#force: yes