Use bash_exec fact for more.

This commit is contained in:
Hyperling 2021-02-02 21:05:46 -06:00
parent 4661e114eb
commit 6f2361832a
4 changed files with 12 additions and 7 deletions

6
facts/general/gather.yml Normal file
View File

@ -0,0 +1,6 @@
---
# Facts that must be gathered by tasks.
- name: Gather | Locate BASH
shell: which bash
register: bash_exec

View File

@ -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

View File

@ -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

View File

@ -8,10 +8,6 @@
comment: Ansible
system: yes
# Get facts
- name: Locate bash
shell: which bash
register: bash_exec
# Superuser
- name: Create User Hyperling