main, add lock file scripts and clean some areas up.
This commit is contained in:
@@ -9,16 +9,27 @@
|
|||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
|
####### Lock #######
|
||||||
|
# Ensure a process is not already running.
|
||||||
|
- name: Main | Lock
|
||||||
|
block:
|
||||||
|
|
||||||
|
- include_tasks: tasks/general/tests/lock_check.yml
|
||||||
|
- include_tasks: tasks/general/tests/lock_create.yml
|
||||||
|
|
||||||
|
|
||||||
####### Gather #######
|
####### Gather #######
|
||||||
# Load facts for all systems.
|
# Load facts for all systems.
|
||||||
|
- name: Main | Gather
|
||||||
|
block:
|
||||||
|
|
||||||
- include_tasks: facts/general/gather.yml
|
- include_tasks: facts/general/gather.yml
|
||||||
- include_tasks: tasks/general/acct_mgmt/provision_config.yml
|
- include_tasks: tasks/general/acct_mgmt/provision_config.yml
|
||||||
|
|
||||||
- include_tasks: facts/general/system.yml
|
- include_tasks: facts/general/system.yml
|
||||||
- include_tasks: facts/general/package.yml
|
- include_tasks: facts/general/package.yml
|
||||||
- include_tasks: facts/general/service.yml
|
- include_tasks: facts/general/service.yml
|
||||||
- include_tasks: facts/general/user.yml
|
- include_tasks: facts/general/user.yml
|
||||||
|
|
||||||
|
|
||||||
####### Start #######
|
####### Start #######
|
||||||
@@ -35,13 +46,11 @@
|
|||||||
|
|
||||||
####### NixOS #######
|
####### NixOS #######
|
||||||
# Install the .nix files and do a little data setup.
|
# Install the .nix files and do a little data setup.
|
||||||
|
|
||||||
- name: Main | NixOS Setup
|
- name: Main | NixOS Setup
|
||||||
block:
|
block:
|
||||||
|
|
||||||
- include_tasks: tasks/general/software/nixos.yml
|
- include_tasks: tasks/general/software/nixos.yml
|
||||||
|
|
||||||
|
|
||||||
# TBD if we are going to use this many, then just have IF statements
|
# TBD if we are going to use this many, then just have IF statements
|
||||||
# and use blocks within the General area for NixOS vs not-NixOS.
|
# and use blocks within the General area for NixOS vs not-NixOS.
|
||||||
- include_tasks: tasks/general/software/swap.yml
|
- include_tasks: tasks/general/software/swap.yml
|
||||||
@@ -77,7 +86,6 @@
|
|||||||
|
|
||||||
####### General #######
|
####### General #######
|
||||||
# Basic setup for all enabled systems.
|
# Basic setup for all enabled systems.
|
||||||
|
|
||||||
- name: Main | General Setup
|
- name: Main | General Setup
|
||||||
block:
|
block:
|
||||||
|
|
||||||
@@ -117,7 +125,6 @@
|
|||||||
|
|
||||||
####### Workstations #######
|
####### Workstations #######
|
||||||
# Additional setup for systems with GUI.
|
# Additional setup for systems with GUI.
|
||||||
|
|
||||||
- name: Main | Workstation Setup
|
- name: Main | Workstation Setup
|
||||||
block:
|
block:
|
||||||
|
|
||||||
@@ -163,7 +170,6 @@
|
|||||||
- include_tasks: tasks/workstation/mac-os/software/brew.yml
|
- include_tasks: tasks/workstation/mac-os/software/brew.yml
|
||||||
when: ansible_system == "Darwin"
|
when: ansible_system == "Darwin"
|
||||||
|
|
||||||
|
|
||||||
## Configuration Tasks ##
|
## Configuration Tasks ##
|
||||||
- block:
|
- block:
|
||||||
- include_tasks: tasks/workstation/shared/settings/gnome.yml
|
- include_tasks: tasks/workstation/shared/settings/gnome.yml
|
||||||
@@ -240,7 +246,6 @@
|
|||||||
|
|
||||||
####### Servers #######
|
####### Servers #######
|
||||||
# Easy to deploy server configurations.
|
# Easy to deploy server configurations.
|
||||||
|
|
||||||
- name: Main | Server Setup
|
- name: Main | Server Setup
|
||||||
block:
|
block:
|
||||||
|
|
||||||
@@ -284,10 +289,6 @@
|
|||||||
- name: Main | Finish
|
- name: Main | Finish
|
||||||
block:
|
block:
|
||||||
|
|
||||||
- name: Main | Finish | Notify | Touch File
|
- include_tasks: tasks/general/acct_mgmt/notify.yml
|
||||||
include_tasks: tasks/general/acct_mgmt/notify.yml
|
|
||||||
|
|
||||||
- name: Main | Finish | Notify | Add Message
|
- include_tasks: tasks/general/tests/lock_remove.yml
|
||||||
shell : echo "'Ansible' 'Provisioning finished @ `date`'" >> "{{ notify_log_file }}"
|
|
||||||
|
|
||||||
when: workstation == true
|
|
||||||
|
|||||||
@@ -6,3 +6,6 @@
|
|||||||
loop:
|
loop:
|
||||||
- touch "{{ notify_log_file }}"
|
- touch "{{ notify_log_file }}"
|
||||||
- chmod 777 "{{ notify_log_file }}"
|
- chmod 777 "{{ notify_log_file }}"
|
||||||
|
|
||||||
|
- name: General | Notify | Add Message
|
||||||
|
shell : echo "'Ansible' 'Provisioning finished @ `date`'" >> "{{ notify_log_file }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user