mirror of
https://github.com/Aviortheking/Blog_IMIE.git
synced 2025-04-24 11:52:17 +00:00
48 lines
893 B
YAML
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
|