diff --git a/defaults/main.yml b/defaults/main.yml index 61fdeca..5636e68 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -15,4 +15,4 @@ win_security_SeRemoteInteractiveLogonRight: '*S-1-5-32-544' win_security_SeTcbPrivilege: '*S-1-0-0' win_security_SeMachineAccountPrivilege: '*S-1-5-32-544' win_security_SeTrustedCredManAccessPrivilege: '*S-1-0-0' -win_security_SeNetworkLogonRight: '*S-1-0-0' +win_security_SeNetworkLogonRight: '*S-1-5-32-544' diff --git a/handlers/main.yml b/handlers/main.yml new file mode 100644 index 0000000..a777f40 --- /dev/null +++ b/handlers/main.yml @@ -0,0 +1,2 @@ +- name: load gpo configuration locally + raw: "secedit /configure /cfg {{win_security_policy_template_location}}\\ansible_windows_hardening_security_policy.inf /db {{ win_security_policy_database_location }}\\ansible_windows_hardening.db /quiet" \ No newline at end of file diff --git a/tasks/main.yml b/tasks/main.yml index ce13819..1ef7ebe 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,30 +1,30 @@ --- -- include: access.yml +- import_tasks: access.yml tags: access -- include: account.yml +- import_tasks: account.yml tags: account -- include: audit.yml +- import_tasks: audit.yml tags: audit -- include: ie.yml +- import_tasks: ie.yml tags: ie -- include: misc.yml +- import_tasks: misc.yml tags: misc -- include: password_policy.yml +- import_tasks: password_policy.yml tags: password_policy -- include: powershell.yml +- import_tasks: powershell.yml tags: powershell -- include: rdp.yml +- import_tasks: rdp.yml tags: rdp -- include: security_policy.yml +- import_tasks: security_policy.yml tags: security_policy -- include: user_rights.yml +- import_tasks: user_rights.yml tags: user_rights diff --git a/tasks/security_policy.yml b/tasks/security_policy.yml index f1a497e..a10d6f7 100644 --- a/tasks/security_policy.yml +++ b/tasks/security_policy.yml @@ -12,8 +12,6 @@ win_template: src: security_policy.inf.yml dest: "{{win_security_policy_template_location}}\\ansible_windows_hardening_security_policy.inf" - register: security_policy + notify: load gpo configuration locally -- name: load gpo configuration locally - raw: "secedit /configure /cfg {{win_security_policy_template_location}}\\ansible_windows_hardening_security_policy.inf /db {{ win_security_policy_database_location }}\\ansible_windows_hardening.db /quiet" - when: security_policy.changed +- meta: flush_handlers \ No newline at end of file