ansible-base/roles/lighttpd/tasks/main.json

69 lines
1.3 KiB
JSON
Raw Normal View History

2023-11-20 02:07:08 +01:00
[
{
"name": "install packages",
"become": true,
"ansible.builtin.apt": {
2024-03-20 00:05:11 +01:00
"update_cache": true,
2023-11-20 02:07:08 +01:00
"pkg": [
"lighttpd",
"lighttpd-mod-openssl"
]
}
},
{
"name": "activate openssl module | file",
"become": true,
"ansible.builtin.template": {
"src": "10-ssl-custom.conf.j2",
"dest": "/etc/lighttpd/conf-available/10-ssl-custom.conf"
}
},
{
"name": "activate openssl module | link",
"become": true,
"ansible.builtin.file": {
"state": "link",
"src": "/etc/lighttpd/conf-available/10-ssl-custom.conf",
"dest": "/etc/lighttpd/conf-enabled/10-ssl-custom.conf"
}
},
{
2024-06-01 17:56:28 +02:00
"name": "ufw | check",
"check_mode": true,
2024-06-01 17:56:28 +02:00
"become": true,
"community.general.ufw": {
2024-06-01 17:56:28 +02:00
"state": "enabled"
},
"register": "ufw_enable_check"
},
{
2024-06-01 17:56:28 +02:00
"name": "ufw | allow port 80",
"when": "not ufw_enable_check.changed",
"become": true,
"community.general.ufw": {
"rule": "allow",
"port": "80",
"proto": "tcp"
2024-06-01 17:56:28 +02:00
}
},
{
2024-06-01 17:56:28 +02:00
"name": "ufw | allow port 443",
"when": "not ufw_enable_check.changed",
"become": true,
"community.general.ufw": {
"rule": "allow",
"port": "443",
"proto": "tcp"
2024-06-01 17:56:28 +02:00
}
},
2023-11-20 02:07:08 +01:00
{
"name": "restart service",
"become": true,
"ansible.builtin.systemd_service": {
"state": "restarted",
"name": "lighttpd"
}
}
]