diff --git a/facts/general/gather.yml b/facts/general/gather.yml new file mode 100644 index 0000000..3ba1e1d --- /dev/null +++ b/facts/general/gather.yml @@ -0,0 +1,6 @@ +--- +# Facts that must be gathered by tasks. + +- name: Gather | Locate BASH + shell: which bash + register: bash_exec \ No newline at end of file diff --git a/local.yml b/local.yml index ae5016d..bbb1f7c 100644 --- a/local.yml +++ b/local.yml @@ -15,8 +15,8 @@ tasks: - include: tasks/general/software/packages.yml - - include: tasks/general/software/harden.yml - ignore_errors: yes + + - include: facts/general/gather.yml - include: tasks/general/acct_mgmt/groups.yml - include: tasks/general/acct_mgmt/users.yml @@ -26,6 +26,9 @@ - include: tasks/general/cron/ansible.yml + - include: tasks/general/software/harden.yml + ignore_errors: yes + # Workstations - name: UI Setup diff --git a/tasks/general/acct_mgmt/keys.yml b/tasks/general/acct_mgmt/keys.yml index 9ed02e4..16de7c2 100644 --- a/tasks/general/acct_mgmt/keys.yml +++ b/tasks/general/acct_mgmt/keys.yml @@ -9,7 +9,7 @@ - name: SSH Key | Root | Create shell: ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa <<< n args: - executable: /bin/bash + executable: "{{ bash_exec.stdout }}" ignore_errors: yes - name: SSH Key | Root | Copy to 1337 diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index dfcb12a..3caa1ae 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -8,10 +8,6 @@ comment: Ansible system: yes -# Get facts -- name: Locate bash - shell: which bash - register: bash_exec # Superuser - name: Create User Hyperling