initial commit
This commit is contained in:
commit
676eb4c7c5
|
@ -0,0 +1,9 @@
|
||||||
|
- name: reload nginx
|
||||||
|
ansible.builtin.service:
|
||||||
|
name: nginx
|
||||||
|
state: reloaded
|
||||||
|
|
||||||
|
- name: restart nginx
|
||||||
|
ansible.builtin.service:
|
||||||
|
name: nginx
|
||||||
|
state: restarted
|
|
@ -0,0 +1,4 @@
|
||||||
|
galaxy_info:
|
||||||
|
role_name: nginx
|
||||||
|
|
||||||
|
dependencies: []
|
|
@ -0,0 +1,24 @@
|
||||||
|
- name: Install packages.
|
||||||
|
tags: nginx
|
||||||
|
ansible.builtin.package:
|
||||||
|
state: present
|
||||||
|
name:
|
||||||
|
- nginx
|
||||||
|
register: nginx_installed
|
||||||
|
|
||||||
|
- name: Remove default nginx directory.
|
||||||
|
tags: nginx
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /etc/nginx
|
||||||
|
state: absent
|
||||||
|
register: nginx_config_cleared
|
||||||
|
when: nginx_installed.changed == true
|
||||||
|
|
||||||
|
- name: Clone h5bp nginx config.
|
||||||
|
tags: nginx
|
||||||
|
ansible.builtin.git:
|
||||||
|
repo: https://github.com/h5bp/server-configs-nginx
|
||||||
|
dest: /etc/nginx
|
||||||
|
depth: 1
|
||||||
|
notify: restart nginx
|
||||||
|
when: nginx_config_cleared.changed == true
|
Loading…
Reference in New Issue