mirror of
https://github.com/Aviortheking/Blog_IMIE.git
synced 2025-04-25 04:12:13 +00:00
78 lines
1.5 KiB
YAML
78 lines
1.5 KiB
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 apache2
|
|
#file:
|
|
#path: /etc/apache2
|
|
#owner: www-data
|
|
#group: www-data
|
|
#recurse: yes
|
|
#
|
|
#- name: Permissions www
|
|
#file:
|
|
#path: /var/www
|
|
#owner: www-data
|
|
#group: www-data
|
|
#recurse: yes
|
|
#
|
|
#- name: Start service httpd, if not started
|
|
#service:
|
|
#name: apache2
|
|
#state: started
|
|
#
|
|
#- name: Enable service apache2, and not touch the state
|
|
#service:
|
|
#name: apache2
|
|
#enabled: yes
|
|
#
|
|
#- name: Enable mod_rewrite
|
|
#apache2_module:
|
|
#name: rewrite
|
|
#state: present
|
|
#
|
|
#- 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
|
|
#
|
|
#- name: a2ensite {{ domain }}
|
|
#command: a2ensite {{ domain }}
|
|
#
|
|
#- name: Reload service apache2
|
|
#service:
|
|
#name: apache2
|
|
#state: reloaded
|