Add pkg refresh for FreeBSD. Create SSH key with shell instead of fancy module. Still looking into how to (safely) get newer ansible on Debian.

This commit is contained in:
Hyperling 2021-02-01 06:52:28 -06:00
parent a68bafd338
commit e3b5d6b915
3 changed files with 13 additions and 5 deletions

View File

@ -20,8 +20,8 @@
- include: tasks/general/acct_mgmt/groups.yml
- include: tasks/general/acct_mgmt/users.yml
- include: tasks/general/acct_mgmt/sudo.yml
#- include: tasks/general/acct_mgmt/keys.yml
# when: ansible_distribution != "Debian"
- include: tasks/general/acct_mgmt/keys.yml
when: ansible_distribution != "Debian"
- include: tasks/general/acct_mgmt/mounts.yml
- include: tasks/general/cron/ansible.yml

View File

@ -1,9 +1,13 @@
---
# SSH keys for day-to-day system usage.
# Debian's ansible is too old to use this.
#- name: Create Root's SSH Key
# openssh_keypair:
# path: /root/.ssh/id_rsa
- name: Create Root's SSH Key
openssh_keypair:
path: /root/.ssh/id_rsa
shell: ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa <<< n
- name: Join System to 1337 Share
shell: ssh-copy-id -f -i /root/.ssh/id_rsa ling@leet

View File

@ -1,11 +1,15 @@
---
# Cross-platform package management.
- name: Repo Cache Refresh
- name: Repo Cache Refresh (Apt and Pacman)
package:
update_cache: yes
when: ansible_pkg_mgr in ["apt", "pacman"]
- name: Repo Cache Refresh (FreeBSD)
shell: pkg update
when: ansible_system == "FreeBSD"
- name: Repo Install Software
package:
name: