Lint fixes
This commit is contained in:
parent
fe0074d80f
commit
14331459d9
1 changed files with 14 additions and 11 deletions
|
@ -1,10 +1,10 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: "deploy workstation"
|
- name: Deploy workstation
|
||||||
hosts: localhost
|
hosts: localhost
|
||||||
connection: local
|
connection: local
|
||||||
become: true
|
become: true
|
||||||
become_method: sudo
|
become_method: ansible.builtin.sudo
|
||||||
|
|
||||||
vars_files:
|
vars_files:
|
||||||
- ../vars/defaults.yml
|
- ../vars/defaults.yml
|
||||||
|
@ -19,11 +19,12 @@
|
||||||
- mutt
|
- mutt
|
||||||
- rpmfusion_nonfree_repo
|
- rpmfusion_nonfree_repo
|
||||||
- spotify
|
- spotify
|
||||||
|
- ssh_known_hosts
|
||||||
- thinlinc
|
- thinlinc
|
||||||
- thunderbird
|
- thunderbird
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: check hostname
|
- name: Check hostname
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
argv:
|
argv:
|
||||||
- hostnamectl
|
- hostnamectl
|
||||||
|
@ -32,7 +33,7 @@
|
||||||
register: hostname_check
|
register: hostname_check
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: set hostname
|
- name: Set random hostname
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
argv:
|
argv:
|
||||||
- hostnamectl
|
- hostnamectl
|
||||||
|
@ -47,7 +48,7 @@
|
||||||
}}
|
}}
|
||||||
when: not hostname_check.stdout
|
when: not hostname_check.stdout
|
||||||
|
|
||||||
- name: remove unneeded packages
|
- name: Remove unneeded packages
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
@ -56,7 +57,7 @@
|
||||||
- mlocate
|
- mlocate
|
||||||
- nano-default-editor
|
- nano-default-editor
|
||||||
|
|
||||||
- name: install extra packages
|
- name: Install extra packages
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: installed
|
state: installed
|
||||||
|
@ -75,20 +76,22 @@
|
||||||
- virt-manager # manage virtual machines
|
- virt-manager # manage virtual machines
|
||||||
- yamllint # linter for yaml files
|
- yamllint # linter for yaml files
|
||||||
|
|
||||||
- name: check for nvidia gpu
|
- name: Check for NVIDIA GPU
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
cmd: lspci -d '0x10de:' -n | grep -E '^[0-9]+:[0-9]+\.[0-9]+ 0300:'
|
cmd: |
|
||||||
|
set -o pipefail
|
||||||
|
lspci -d '0x10de:' -n | grep -E '^[0-9]+:[0-9]+\.[0-9]+ 0300:'
|
||||||
register: nvidia_check
|
register: nvidia_check
|
||||||
failed_when: false
|
failed_when: false
|
||||||
check_mode: false
|
check_mode: false
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: install nvidia gpu drivers
|
- name: Install NVIDIA GPU drivers
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: nvidia_driver
|
name: nvidia_driver
|
||||||
when: nvidia_check.rc == 0
|
when: nvidia_check.rc == 0
|
||||||
|
|
||||||
- name: hide grub menu during boot
|
- name: Hide GRUB menu during boot
|
||||||
ansible.builtin.lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
path: /etc/default/grub
|
path: /etc/default/grub
|
||||||
line: GRUB_TIMEOUT_STYLE=hidden
|
line: GRUB_TIMEOUT_STYLE=hidden
|
||||||
|
@ -96,7 +99,7 @@
|
||||||
notify: reconfigure grub
|
notify: reconfigure grub
|
||||||
|
|
||||||
handlers:
|
handlers:
|
||||||
- name: reconfigure grub
|
- name: Reconfigure GRUB
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
argv:
|
argv:
|
||||||
- grub2-mkconfig
|
- grub2-mkconfig
|
||||||
|
|
Loading…
Add table
Reference in a new issue