diff --git a/tasks/general/acct_mgmt/provision_config.yml b/tasks/general/acct_mgmt/provision_config.yml index 8bc532d..3318ccf 100644 --- a/tasks/general/acct_mgmt/provision_config.yml +++ b/tasks/general/acct_mgmt/provision_config.yml @@ -22,12 +22,13 @@ ## General ## -- name: General | Account Management | Provisioning Configuration | General | Create +- name: General | Account Management | Provisioning Configuration | General | Create | Basic Options ansible.builtin.blockinfile: path: "{{ gen_file }}" + marker: '; {mark} MANAGED BY ANSIBLE | Generic Config' block: | ; Please note that all portions require lowercase keys and values. - ; + [global] ;;;;;;;;;;;;;;;;;;;; Basic Options ;;;;;;;;;;;;;;;;;;;; ; ; enable : Provide true for the provision to occur. @@ -49,6 +50,16 @@ ; nmap is already provided for reporting ; 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 ;;;;;;;;;;;;;;;;;;;; ; ; For syncing this machine to a Git repository of this Ansible project @@ -74,6 +85,16 @@ ; Example: Ansible, ansible-setup, my-env ; 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_block : Set to the block size if dd should create a swapfile. @@ -90,6 +111,16 @@ ; Example: /usr/local/swap ; 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 ;;;;;;;;;;;;;;;;;;;; ; ; 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. ; 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 ;;;;;;;;;;;;;;;;;;;; ; ; For typing `prod` and getting straight to a server, like in env-termux. @@ -143,11 +184,10 @@ ; Example: /srv/sftp/ ; Default: /srv/sftp/ ; - [global] - marker: '; {mark} MANAGED BY ANSIBLE | Generic Config' state: present create: true backup: true + mode: "0644" - name: General | Account Management | Provisioning Configuration | General | Load ansible.builtin.set_fact: @@ -159,18 +199,18 @@ no_telem: "{{ lookup('ini', 'no_telem 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_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') }}" - 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_user: "{{ lookup('ini', 'git_user file={{gen_file}} default=me') }}" 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_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_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_dir: "{{ lookup('ini', 'prod_data_dir file={{gen_file}} default=/srv/sftp') }}"