From 6155f074c8109e9ee4db83bf0532b87c745ea6cb Mon Sep 17 00:00:00 2001 From: dave Date: Sat, 31 Dec 2022 14:29:39 +0300 Subject: [PATCH] feat: template infra-dependent files --- .gitignore | 2 + group_vars/all.yml | 2 +- group_vars/infra.yml | 126 ---------------------------------- group_vars/infra.yml.template | 16 +++++ hosts => hosts.template | 1 - 5 files changed, 19 insertions(+), 128 deletions(-) create mode 100644 .gitignore delete mode 100644 group_vars/infra.yml create mode 100644 group_vars/infra.yml.template rename hosts => hosts.template (96%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d544e20 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +hosts +keys/ diff --git a/group_vars/all.yml b/group_vars/all.yml index adf36e1..a1d2c2c 100644 --- a/group_vars/all.yml +++ b/group_vars/all.yml @@ -1,7 +1,7 @@ ansible_user: root ansible_dir: /etc/ansible ansible_key_dir: keys -alpine_version: "3.16" +alpine_version: "3.17" mac_prefix: 02:FF diff --git a/group_vars/infra.yml b/group_vars/infra.yml deleted file mode 100644 index 4bf9af0..0000000 --- a/group_vars/infra.yml +++ /dev/null @@ -1,126 +0,0 @@ -timezone: Europe/Kirov -org: Organization Name -org_localized: Название организации -tld: org.local -int_net: 10.0.0.0/8 - -int_tld: "corp.{{ tld }}" -maintainer_email: "admin@{{ tld }}" - -timezone_win: Russian Standard Time - -container_default_nameserver: 10.40.0.1 - -networks: - srv: - gw: 10.41.0.1/16 - tag: 11 - priv: - gw: 10.42.0.1/16 - tag: 12 - dmz: - gw: 10.43.0.1/16 - tag: 13 - - -services: - db: - hostname: postgres - vault: - hostname: vault - backup: - hostname: rest-server - port: 443 - internal_ns: - hostname: ns - recursive_ns: - hostname: ns-rec - filtering_ns: - - hostname: blocky1 - - hostname: blocky2 - acme_dns: - hostname: acme-dns - rest_server: - hostname: rest-server - mariadb: - hostname: mariadb - smb: - hostname: smb - -use_alternative_apk_repo: yes - -mail_server: - tld: "{{ tld }}" - max_mail_size_bytes: 75000000 - admin_email: "admin@{{ tld }}" - - db_server_hostname: postgres - db_name: mail - db_user: mail - db_pass: pass - - mta_hostname: postfix - mua_hostname: dovecot - rspamd_hostname: rspamd - webmail_hostname: mail - clamav_hostname: clamav - - mua_lmtp_port: 11001 - mua_quota_port: 11002 - mua_auth_port: 11003 - mua_managesieve_port: 4190 - rspamd_port: 11332 - mta_sts_port: 11000 - clamav_port: 7357 - - mta_actual_hostname: smtp - mua_actual_hostname: imap - - allowed_spf: - - 1.1.1.1 - - domains: - - "{{ tld }}" - - aliases: - - { source: 'postmaster', source_domain: "{{ tld }}", target: 'admin', target_domain: "{{ tld }}" } - - { source: 'hostmaster', source_domain: "{{ tld }}", target: 'admin', target_domain: "{{ tld }}" } - - { source: 'webmaster', source_domain: "{{ tld }}", target: 'admin', target_domain: "{{ tld }}" } - - { source: 'abuse', source_domain: "{{ tld }}", target: 'admin', target_domain: "{{ tld }}" } - - { source: 'caa-report', source_domain: "{{ tld }}", target: 'admin', target_domain: "{{ tld }}" } - - { source: 'dkim-report', source_domain: "{{ tld }}", target: 'admin', target_domain: "{{ tld }}" } - - { source: 'dmarc-report', source_domain: "{{ tld }}", target: 'admin', target_domain: "{{ tld }}" } - - { source: 'smtp-tls-report', source_domain: "{{ tld }}", target: 'admin', target_domain: "{{ tld }}" } - - - - -acme_preferred_chain: ISRG Root X1 - -winrm_remote_user: remote-admin -winrm_bootstrap_password: bootstrap123 - - -backup_filters: - none: - - "*" - - "!*/" - - office: - - "!*.doc" - - "!*.docx" - - "!*.xls" - - "!*.xlsx" - - "!*.ppt" - - "!*.pptx" - - "!*.txt" - - "!*.ods" - - "!*.odt" - - "!*.odp" - - "!*.pdf" - - images: - - "!*.jpg" - - "!*.jpeg" - - "!*.png" - - "!*.tiff" diff --git a/group_vars/infra.yml.template b/group_vars/infra.yml.template new file mode 100644 index 0000000..c523518 --- /dev/null +++ b/group_vars/infra.yml.template @@ -0,0 +1,16 @@ +timezone: Europe/Kirov +org: Organization Name +org_localized: Название организации +tld: org.local +int_net: 10.0.0.0/8 + +int_tld: "corp.{{ tld }}" +maintainer_email: "admin@{{ tld }}" + +container_default_nameserver: 10.0.0.1 + +networks: + srv: + gw: 10.0.0.1/16 + +services: \ No newline at end of file diff --git a/hosts b/hosts.template similarity index 96% rename from hosts rename to hosts.template index 7d43589..3875869 100644 --- a/hosts +++ b/hosts.template @@ -19,7 +19,6 @@ all: ansible_ssh_extra_args: -o StrictHostKeyChecking=no external_ipv4: 1.1.1.1 primary_role: proxmox - container_mtu: 1390 windows: