refactor: move Packer templates to top-level packer/ directory
This commit is contained in:
12
packer/fedora-42/scripts/cleanup.sh
Normal file
12
packer/fedora-42/scripts/cleanup.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash -eux
|
||||
|
||||
pip uninstall -y ansible
|
||||
|
||||
dnf clean all
|
||||
|
||||
# Zero out the rest of the free space using dd, then delete the written file.
|
||||
#dd if=/dev/zero of=/EMPTY bs=1M
|
||||
#rm -f /EMPTY
|
||||
|
||||
# Add `sync` so Packer doesn't quit too early, before the large file is deleted.
|
||||
sync
|
||||
51
packer/fedora-42/scripts/setup.yml
Normal file
51
packer/fedora-42/scripts/setup.yml
Normal file
@@ -0,0 +1,51 @@
|
||||
---
|
||||
- name: "Setup.yml"
|
||||
hosts: localhost
|
||||
gather_facts: yes
|
||||
become: yes
|
||||
tasks:
|
||||
- name: Colorize root shell prompt
|
||||
lineinfile:
|
||||
path: /root/.bashrc
|
||||
line: 'export PS1="\[\033[38;5;11m\]\u\[$(tput sgr0)\]\[\033[38;5;15m\]@\h:\[$(tput sgr0)\]\[\033[38;5;6m\][\w]:\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]"'
|
||||
state: present
|
||||
|
||||
- name: Alias vi to vim
|
||||
lineinfile:
|
||||
path: /root/.bashrc
|
||||
line: "alias vi='vim'"
|
||||
state: present
|
||||
|
||||
- name: Create vim configuration file
|
||||
file:
|
||||
path: /root/.vimrc
|
||||
state: touch
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
|
||||
- name: Configure vim
|
||||
blockinfile:
|
||||
path: /root/.vimrc
|
||||
block: |
|
||||
set nocompatible
|
||||
set number
|
||||
set autoindent
|
||||
syntax on
|
||||
highlight Comment ctermfg=LightCyan
|
||||
marker: ""
|
||||
state: present
|
||||
|
||||
- name: Disable GSSAPIAuthentication
|
||||
lineinfile:
|
||||
path: /etc/ssh/sshd_config
|
||||
regexp: "^GSSAPIAuthentication"
|
||||
line: "GSSAPIAuthentication no"
|
||||
state: present
|
||||
|
||||
- name: Update CA bundle (RedHat)
|
||||
get_url:
|
||||
url: https://curl.haxx.se/ca/cacert.pem
|
||||
dest: /etc/pki/tls/certs/ca-bundle.crt
|
||||
force: yes
|
||||
when: ansible_os_family == "RedHat"
|
||||
Reference in New Issue
Block a user