Final install tweaks

This commit is contained in:
2025-07-07 20:20:56 -05:00
parent 6676de9fa9
commit 244de0cbd8
2 changed files with 41 additions and 72 deletions

View File

@@ -8,7 +8,7 @@ vm_boot_wait = "5s"
vm_name = "fedora-42-small" vm_name = "fedora-42-small"
vm_id = "9101" vm_id = "9101"
vm_cpu_sockets = "1" vm_cpu_sockets = "1"
vm_cpu_cores = "4" vm_cpu_cores = "2"
vm_mem_size = "2048" vm_mem_size = "2048"
vm_disk_size = "8" vm_disk_size = "8"
@@ -16,7 +16,6 @@ proxmox_bridge = "vmbr1"
proxmox_vlan = "71" proxmox_vlan = "71"
ssh_username = "wed" ssh_username = "wed"
ssh_password = "1mag!ne3R"
# ISO Objects # ISO Objects

View File

@@ -4,78 +4,48 @@
gather_facts: yes gather_facts: yes
become: yes become: yes
tasks: tasks:
- name: Colorize root shell prompt - name: Colorize root shell prompt
lineinfile: lineinfile:
path: /root/.bashrc 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)\]"' 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 state: present
- name: Alias vi to vim - name: Alias vi to vim
lineinfile: lineinfile:
path: /root/.bashrc path: /root/.bashrc
line: "alias vi='vim'" line: "alias vi='vim'"
state: present state: present
- name: Create vim configuration file - name: Create vim configuration file
file: file:
path: /root/.vimrc path: /root/.vimrc
state: touch state: touch
owner: root owner: root
group: root group: root
mode: 0644 mode: 0644
- name: Configure vim - name: Configure vim
blockinfile: blockinfile:
path: /root/.vimrc path: /root/.vimrc
block: | block: |
set nocompatible set nocompatible
set number set number
set autoindent set autoindent
syntax on syntax on
highlight Comment ctermfg=LightCyan highlight Comment ctermfg=LightCyan
marker: "" marker: ""
state: present state: present
- name: Disable GSSAPIAuthentication - name: Disable GSSAPIAuthentication
lineinfile: lineinfile:
path: /etc/ssh/sshd_config path: /etc/ssh/sshd_config
regexp: "^GSSAPIAuthentication" regexp: "^GSSAPIAuthentication"
line: "GSSAPIAuthentication no" line: "GSSAPIAuthentication no"
state: present state: present
- name: Update CA bundle (RedHat) - name: Update CA bundle (RedHat)
get_url: get_url:
url: https://curl.haxx.se/ca/cacert.pem url: https://curl.haxx.se/ca/cacert.pem
dest: /etc/pki/tls/certs/ca-bundle.crt dest: /etc/pki/tls/certs/ca-bundle.crt
force: yes force: yes
when: ansible_os_family == "RedHat" when: ansible_os_family == "RedHat"
- name: Install epel repo (RedHat)
dnf:
name: "epel-release"
state: latest
when: ansible_os_family == "RedHat"
- name: Install packages (RedHat)
dnf:
name: "{{ packages }}"
state: latest
vars:
packages:
- bash-completion
- curl
- git
- rsync
- screen
- tcpdump
- vim
- wget
when: ansible_os_family == "RedHat"
- name: Install open-vm-tools (RedHat)
dnf:
name: open-vm-tools
state: latest
when:
- ansible_os_family == "RedHat"
- ansible_virtualization_type == "VMware"