php4dvd: Initial version of role
This commit is contained in:
parent
946c7d0772
commit
f664e0271b
5 changed files with 101 additions and 0 deletions
55
roles/php4dvd/tasks/main.yml
Normal file
55
roles/php4dvd/tasks/main.yml
Normal file
|
@ -0,0 +1,55 @@
|
|||
---
|
||||
- name: Create group
|
||||
ansible.builtin.group:
|
||||
name: php4dvd
|
||||
|
||||
- name: Create user
|
||||
ansible.builtin.user:
|
||||
name: php4dvd
|
||||
comment: Podman pphp4dvd
|
||||
group: authcheck
|
||||
shell: /sbin/nologin
|
||||
|
||||
- name: Get container source
|
||||
ansible.builtin.git:
|
||||
dest: /usr/local/src/docker-php4dvd
|
||||
repo: https://github.com/foo-sh/docker-php4dvd.git
|
||||
update: false
|
||||
version: master
|
||||
notify: Rebuild php4dvd-container
|
||||
|
||||
- name: Create service file
|
||||
ansible.builtin.template:
|
||||
dest: /etc/systemd/system/php4dvd-container.service
|
||||
src: php4dvd-container.service.j2
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
- name: Create service config
|
||||
ansible.builtin.template:
|
||||
dest: /etc/sysconfig/php4dvd-container
|
||||
src: php4dvd-container.sysconfig.j2
|
||||
mode: 0600
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: Restart php4dvd-container
|
||||
|
||||
- name: Enable service
|
||||
ansible.builtin.service:
|
||||
name: php4dvd-container
|
||||
state: started
|
||||
enabled: true
|
||||
|
||||
- name: Copy nginx config
|
||||
ansible.builtin.copy:
|
||||
dest: "/etc/nginx/conf.d/{{ inventory_hostname }}/php4dvd-container.conf"
|
||||
content: |
|
||||
location /php4dvd {
|
||||
proxy_pass http://127.0.0.1:8005/;
|
||||
}
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: Restart nginx
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue