From 244de0cbd8100028ca4e166b3d28f272b5719012 Mon Sep 17 00:00:00 2001 From: rblundon Date: Mon, 7 Jul 2025 20:20:56 -0500 Subject: [PATCH] Final install tweaks --- .../fedora-42/fedora-42-small.pkrvars.hcl | 3 +- .../fedora-42/scripts/setup.yml | 110 +++++++----------- 2 files changed, 41 insertions(+), 72 deletions(-) diff --git a/infra-config/04-vm-templates/fedora-42/fedora-42-small.pkrvars.hcl b/infra-config/04-vm-templates/fedora-42/fedora-42-small.pkrvars.hcl index e754e7f..b16b6d6 100755 --- a/infra-config/04-vm-templates/fedora-42/fedora-42-small.pkrvars.hcl +++ b/infra-config/04-vm-templates/fedora-42/fedora-42-small.pkrvars.hcl @@ -8,7 +8,7 @@ vm_boot_wait = "5s" vm_name = "fedora-42-small" vm_id = "9101" vm_cpu_sockets = "1" -vm_cpu_cores = "4" +vm_cpu_cores = "2" vm_mem_size = "2048" vm_disk_size = "8" @@ -16,7 +16,6 @@ proxmox_bridge = "vmbr1" proxmox_vlan = "71" ssh_username = "wed" -ssh_password = "1mag!ne3R" # ISO Objects diff --git a/infra-config/04-vm-templates/fedora-42/scripts/setup.yml b/infra-config/04-vm-templates/fedora-42/scripts/setup.yml index 1b746dd..a4a7df0 100644 --- a/infra-config/04-vm-templates/fedora-42/scripts/setup.yml +++ b/infra-config/04-vm-templates/fedora-42/scripts/setup.yml @@ -4,78 +4,48 @@ 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: 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: 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: 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: 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: 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" - - - 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" + - 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"