priovision, refactor the general.ini file.

This commit is contained in:
me
2026-10-09 15:44:52 -07:00
parent f6dfa4f81f
commit 29e989fae9
+49 -9
View File
@@ -22,12 +22,13 @@
## General ## ## General ##
- name: General | Account Management | Provisioning Configuration | General | Create - name: General | Account Management | Provisioning Configuration | General | Create | Basic Options
ansible.builtin.blockinfile: ansible.builtin.blockinfile:
path: "{{ gen_file }}" path: "{{ gen_file }}"
marker: '; {mark} MANAGED BY ANSIBLE | Generic Config'
block: | block: |
; Please note that all portions require lowercase keys and values. ; Please note that all portions require lowercase keys and values.
; [global]
;;;;;;;;;;;;;;;;;;;; Basic Options ;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;; Basic Options ;;;;;;;;;;;;;;;;;;;;
; ;
; enable : Provide true for the provision to occur. ; enable : Provide true for the provision to occur.
@@ -49,6 +50,16 @@
; nmap is already provided for reporting ; nmap is already provided for reporting
; Default: false ; Default: false
; ;
state: present
create: true
backup: true
mode: "0644"
- name: General | Account Management | Provisioning Configuration | General | Create | Git Polling
ansible.builtin.blockinfile:
path: "{{ gen_file }}"
marker: '; {mark} MANAGED BY ANSIBLE | Generic Config | Git Polling'
block: |
;;;;;;;;;;;;;;;;;;;; Git Polling ;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;; Git Polling ;;;;;;;;;;;;;;;;;;;;
; ;
; For syncing this machine to a Git repository of this Ansible project ; For syncing this machine to a Git repository of this Ansible project
@@ -74,6 +85,16 @@
; Example: Ansible, ansible-setup, my-env ; Example: Ansible, ansible-setup, my-env
; Default: env-ansible ; Default: env-ansible
; ;
state: present
create: true
backup: true
mode: "0644"
- name: General | Account Management | Provisioning Configuration | General | Create | Swap File
ansible.builtin.blockinfile:
path: "{{ gen_file }}"
marker: '; {mark} MANAGED BY ANSIBLE | Generic Config | Swap File'
block: |
;;;;;;;;;;;;;;;;;;;; Swap File ;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;; Swap File ;;;;;;;;;;;;;;;;;;;;
; ;
; swap_block : Set to the block size if dd should create a swapfile. ; swap_block : Set to the block size if dd should create a swapfile.
@@ -90,6 +111,16 @@
; Example: /usr/local/swap ; Example: /usr/local/swap
; Default: /swapfile ; Default: /swapfile
; ;
state: present
create: true
backup: true
mode: "0644"
- name: General | Account Management | Provisioning Configuration | General | Create | Sync Frequency
ansible.builtin.blockinfile:
path: "{{ gen_file }}"
marker: '; {mark} MANAGED BY ANSIBLE | Generic Config | Sync Frequency'
block: |
;;;;;;;;;;;;;;;;;;;; Sync Frequency ;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;; Sync Frequency ;;;;;;;;;;;;;;;;;;;;
; ;
; no_telem : Set to true to avoid setting up telemetry services. ; no_telem : Set to true to avoid setting up telemetry services.
@@ -101,6 +132,16 @@
; Slows down the rate of services such as telegraf and cron. ; Slows down the rate of services such as telegraf and cron.
; Default: false ; Default: false
; ;
state: present
create: true
backup: true
mode: "0644"
- name: General | Account Management | Provisioning Configuration | General | Create | Server Shortcuts
ansible.builtin.blockinfile:
path: "{{ gen_file }}"
marker: '; {mark} MANAGED BY ANSIBLE | Generic Config | Server Shortcuts'
block: |
;;;;;;;;;;;;;;;;;;;; Server Shortcuts ;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;; Server Shortcuts ;;;;;;;;;;;;;;;;;;;;
; ;
; For typing `prod` and getting straight to a server, like in env-termux. ; For typing `prod` and getting straight to a server, like in env-termux.
@@ -143,11 +184,10 @@
; Example: /srv/sftp/ ; Example: /srv/sftp/
; Default: /srv/sftp/ ; Default: /srv/sftp/
; ;
[global]
marker: '; {mark} MANAGED BY ANSIBLE | Generic Config'
state: present state: present
create: true create: true
backup: true backup: true
mode: "0644"
- name: General | Account Management | Provisioning Configuration | General | Load - name: General | Account Management | Provisioning Configuration | General | Load
ansible.builtin.set_fact: ansible.builtin.set_fact:
@@ -159,18 +199,18 @@
no_telem: "{{ lookup('ini', 'no_telem file={{gen_file}} default=false') | bool }}" no_telem: "{{ lookup('ini', 'no_telem file={{gen_file}} default=false') | bool }}"
battery: "{{ lookup('ini', 'battery file={{gen_file}} default=false') | bool }}" battery: "{{ lookup('ini', 'battery file={{gen_file}} default=false') | bool }}"
swap_block: "{{ lookup('ini', 'swap_block file={{gen_file}} default=false') }}" swap_block: "{{ lookup('ini', 'swap_block file={{gen_file}} default=false') }}"
swap_count: "{{ lookup('ini', 'swap_count file={{gen_file}} default=1') }}" swap_count: "{{ lookup('ini', 'swap_count file={{gen_file}} default=1') | int }}"
swap_file: "{{ lookup('ini', 'swap_file file={{gen_file}} default=/swapfile') }}" swap_file: "{{ lookup('ini', 'swap_file file={{gen_file}} default=/swapfile') }}"
sshd_port: "{{ lookup('ini', 'sshd_port file={{gen_file}} default=22') }}" sshd_port: "{{ lookup('ini', 'sshd_port file={{gen_file}} default=22') | int }}"
git_host: "{{ lookup('ini', 'git_host file={{gen_file}} default=git.hyperling.com') }}" git_host: "{{ lookup('ini', 'git_host file={{gen_file}} default=git.hyperling.com') }}"
git_user: "{{ lookup('ini', 'git_user file={{gen_file}} default=me') }}" git_user: "{{ lookup('ini', 'git_user file={{gen_file}} default=me') }}"
git_project: "{{ lookup('ini', 'git_project file={{gen_file}} default=env-ansible') }}" git_project: "{{ lookup('ini', 'git_project file={{gen_file}} default=env-ansible') }}"
git_ssh_port: "{{ lookup('ini', 'git_ssh_port file={{gen_file}} default=22') }}" git_ssh_port: "{{ lookup('ini', 'git_ssh_port file={{gen_file}} default=22') | int }}"
prod_host: "{{ lookup('ini', 'prod_host file={{gen_file}} default=hyperling.com') }}" prod_host: "{{ lookup('ini', 'prod_host file={{gen_file}} default=hyperling.com') }}"
prod_port: "{{ lookup('ini', 'prod_port file={{gen_file}} default=22') }}" prod_port: "{{ lookup('ini', 'prod_port file={{gen_file}} default=22') | int }}"
prod_user: "{{ lookup('ini', 'prod_user file={{gen_file}} default=user') }}" prod_user: "{{ lookup('ini', 'prod_user file={{gen_file}} default=user') }}"
prod_data_host: "{{ lookup('ini', 'prod_data_host file={{gen_file}} default=hyperling.com') }}" prod_data_host: "{{ lookup('ini', 'prod_data_host file={{gen_file}} default=hyperling.com') }}"
prod_data_port: "{{ lookup('ini', 'prod_data_port file={{gen_file}} default=22') }}" prod_data_port: "{{ lookup('ini', 'prod_data_port file={{gen_file}} default=22') | int }}"
prod_data_user: "{{ lookup('ini', 'prod_data_user file={{gen_file}} default=user') }}" prod_data_user: "{{ lookup('ini', 'prod_data_user file={{gen_file}} default=user') }}"
prod_data_dir: "{{ lookup('ini', 'prod_data_dir file={{gen_file}} default=/srv/sftp') }}" prod_data_dir: "{{ lookup('ini', 'prod_data_dir file={{gen_file}} default=/srv/sftp') }}"