78 lines
1.5 KiB
YAML
78 lines
1.5 KiB
YAML
---
|
|
- name: Update package cache
|
|
apt:
|
|
update_cache: yes
|
|
|
|
- name: Install build deps
|
|
ansible.builtin.package:
|
|
name:
|
|
- make
|
|
- gcc
|
|
state: present
|
|
|
|
- name: Create libcrypt symlink
|
|
ansible.builtin.file:
|
|
src: /lib/x86_64-linux-gnu/libcrypt.so.1
|
|
dest: /lib/libcrypt.so
|
|
owner: root
|
|
group: root
|
|
state: link
|
|
|
|
- name: Create Build Directory
|
|
ansible.builtin.file:
|
|
path: /tmp/vsftpd_build
|
|
state: directory
|
|
mode: '0755'
|
|
|
|
- name: Unarchive VSFTPD
|
|
ansible.builtin.unarchive:
|
|
src: vsftpd-2.3.4.tar.gz
|
|
dest: /tmp/vsftpd_build
|
|
|
|
- name: Create install reqs
|
|
ansible.builtin.file:
|
|
path: "{{ install_dir }}"
|
|
state: directory
|
|
loop:
|
|
- /usr/local/man/man8
|
|
- /usr/local/man/man5
|
|
- /usr/share/empty
|
|
loop_control:
|
|
loop_var: install_dir
|
|
|
|
- name: Make build and install
|
|
make:
|
|
chdir: /tmp/vsftpd_build/vsftpd-2.3.4
|
|
target: "{{ make_target }}"
|
|
loop:
|
|
- vsftpd
|
|
- install
|
|
loop_control:
|
|
loop_var: make_target
|
|
|
|
- name: Copy configuration file
|
|
ansible.builtin.copy:
|
|
src: vsftpd.conf
|
|
dest: /etc/vsftpd.conf
|
|
owner: root
|
|
group: root
|
|
mode: '0644'
|
|
|
|
- name: Create FTP user
|
|
ansible.builtin.user:
|
|
name: ftp
|
|
home: "/usr/share/empty"
|
|
create_home: no
|
|
|
|
- name: Copy service file
|
|
ansible.builtin.copy:
|
|
src: vsftpd.service
|
|
dest: /etc/systemd/system/vsftpd.service
|
|
owner: root
|
|
group: root
|
|
mode: '0644'
|
|
notify:
|
|
- VSFTPD Service
|
|
...
|
|
# tasks file for CVE-2011-2523
|