Removed vars file inclusion to specify defaults for roles inclusion instead, added task to install ProFTPd ftpasswd utility and certbot Porkbun API plugin

This commit is contained in:
Alex Tavarez
2025-07-23 15:31:46 -04:00
parent 36ed8f5015
commit 381911304a

View File

@@ -9,7 +9,8 @@
# ansible_password: "{{ admin_auths[0].password }}"
FAMILY: "{{ ansible_facts['os_family'] }}"
CORE_PKGS: "core_pkgs@{{ ansible_facts['os_family'] }}.yml"
want_extra_pkgs: yes
want_extra_pkgs: no
porkbun_certbot_plugin: yes
tasks:
- name: Install core packages
@@ -31,25 +32,28 @@
tags: ['foreign_pkgs']
register: core_done
tags: ['default', 'core']
- name: Install additional packages
block:
# - name: Get core package list
# include_vars:
# file: "{{ roles_path }}/bootstrap/defaults/core_pkgs@{{ FAMILY }}.yml"
# name: pkgs
# register: pkgs_src
- name: Get custom package list
include_vars:
file: "{{ roles_path }}/bootstrap/defaults/custom_pkgs@{{ FAMILY }}.yml"
name: cpkgs
register: cpkgs_src
- name: Install additional packages
become: yes
become_method: sudo
include_role:
tasks_from: extra_installations.yml
vars:
extra_packages: ["{{ cpkgs.my_pkgs }}"]
defaults_from: "custom_pkgs@{{ FAMILY }}.yml"
register: extra_pkgs_done
when: want_extra_pkgs
tags: ['extra_pkgs']
tags: ['default', 'extra_pkgs']
- name: Install a Porkbun API plugin for Certbot
become: yes
become_method: sudo
pip:
name: 'git+https://github.com/infinityofspace/certbot_dns_porkbun.git'
state: present
when: porkbun_certbot_plugin
tags: ['default', 'with_porkbun_api']
- name: Get ftpasswd utility for ProFTPd
become: yes
become_method: sudo
get_url:
url: http://www.castaglia.org/proftpd/contrib/ftpasswd
dest: /usr/local/bin/ftpasswd
mode: "0755"
tags: ['default', 'with_ftp']