mirror of
https://github.com/DO1JLR/ansible_linux_desktop_setup.git
synced 2024-09-14 19:54:51 +02:00
improve linting and pylint
This commit is contained in:
parent
8f48aa768d
commit
c484325f23
8 changed files with 28 additions and 177 deletions
|
@ -9,3 +9,5 @@ rules:
|
||||||
|
|
||||||
ignore: |
|
ignore: |
|
||||||
roles/
|
roles/
|
||||||
|
collections/
|
||||||
|
ansible/
|
||||||
|
|
|
@ -36,7 +36,7 @@ python3 -m venv ansible
|
||||||
source ansible/bin/activate
|
source ansible/bin/activate
|
||||||
|
|
||||||
# Install Ansible
|
# Install Ansible
|
||||||
pip3 install ansible-core
|
pip3 install --upgrade ansible-core ansible-lint pylint
|
||||||
```
|
```
|
||||||
|
|
||||||
Which playbook?
|
Which playbook?
|
||||||
|
|
|
@ -28,7 +28,9 @@ def become_pass(host):
|
||||||
"""
|
"""
|
||||||
return variable for become password using gopass lookup
|
return variable for become password using gopass lookup
|
||||||
"""
|
"""
|
||||||
passstring = str("\"ansible_become_pass\": \"{{ lookup('community.general.passwordstore', 'ansible/hosts/" + host + "/users/root') }}\"")
|
passstring = str("\"ansible_become_pass\": "
|
||||||
|
+ "\"{{ lookup('community.general.passwordstore', 'ansible/hosts/"
|
||||||
|
+ host + "/users/root') }}\"")
|
||||||
return passstring
|
return passstring
|
||||||
|
|
||||||
def env(domain):
|
def env(domain):
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
---
|
|
||||||
- name: check if ansible is not to old
|
|
||||||
hosts: localhost
|
|
||||||
roles:
|
|
||||||
- {role: ansible_version, tags: always, gather_facts: false}
|
|
||||||
|
|
||||||
- name: base packages setup
|
|
||||||
hosts: desk_minni.local
|
|
||||||
roles:
|
|
||||||
- {role: workstation_packages, tags: [base, packages, workstation]}
|
|
||||||
|
|
||||||
- name: user and ssh(d) setup
|
|
||||||
hosts: desk_minni.local
|
|
||||||
roles:
|
|
||||||
- {role: do1jlr.users, tags: [users, base]}
|
|
||||||
- {role: do1jlr.auth, tags: [auth, base]}
|
|
||||||
- {role: do1jlr.sshd, tags: [sshd, base]}
|
|
||||||
- {role: dotfiles, tags: [dotfiles, base]}
|
|
||||||
|
|
||||||
- name: fancy schnickschnack
|
|
||||||
hosts: desk_minni.local
|
|
||||||
roles:
|
|
||||||
- {role: akku-warning, tags: akku}
|
|
||||||
# - {role: pulseaudio, tags: [pulse, audio, pulseaudio]}
|
|
||||||
- {role: networkmanager, tags: networkmanager, when: ansible_os_family == 'Archlinux'}
|
|
||||||
- {role: openvpn, tags: ovpn}
|
|
||||||
- {role: nextcloud, tags: nextcloud, when: ansible_os_family == 'Archlinux'}
|
|
||||||
- {role: bat, tags: bat, when: ansible_os_family == 'Debian'}
|
|
||||||
- {role: install-firefox, tags: firefox}
|
|
||||||
- {role: copy_files}
|
|
||||||
- {role: do1jlr.i3wm, tags: i3wm}
|
|
||||||
- {role: ntp, tags: ntp}
|
|
||||||
- {role: xrandr, tags: xrandr}
|
|
||||||
- {role: arch-fonts, tags: fonts}
|
|
||||||
# - {role: winehq, tags: wine}
|
|
||||||
- {role: no-sleep, tags: sleep}
|
|
||||||
- {role: do1jlr.avahi_daemon, tags: [avahi_daemon, avahi]}
|
|
||||||
- {role: do1jlr.avahi_client, tags: [avahi_client, mdns]}
|
|
|
@ -1,39 +0,0 @@
|
||||||
---
|
|
||||||
- name: check if ansible is not to old
|
|
||||||
hosts: localhost
|
|
||||||
roles:
|
|
||||||
- {role: ansible_version, tags: always, gather_facts: false}
|
|
||||||
|
|
||||||
- name: base packages setup
|
|
||||||
hosts: l14.local
|
|
||||||
roles:
|
|
||||||
- {role: workstation_packages, tags: [base, packages, workstation]}
|
|
||||||
- {role: amdgpu_firmware, tags: [amdgpu, firmware]}
|
|
||||||
|
|
||||||
- name: user and ssh(d) setup
|
|
||||||
hosts: l14.local
|
|
||||||
roles:
|
|
||||||
- {role: do1jlr.users, tags: [users, base]}
|
|
||||||
- {role: do1jlr.auth, tags: [auth, base]}
|
|
||||||
- {role: do1jlr.sshd, tags: [sshd, base]}
|
|
||||||
- {role: dotfiles, tags: [dotfiles, base]}
|
|
||||||
|
|
||||||
- name: fancy schnickschnack
|
|
||||||
hosts: l14.local
|
|
||||||
roles:
|
|
||||||
- {role: akku-warning, tags: akku}
|
|
||||||
# - {role: pulseaudio, tags: [pulse, audio, pulseaudio]}
|
|
||||||
- {role: networkmanager, tags: networkmanager, when: ansible_os_family == 'Archlinux'}
|
|
||||||
- {role: openvpn, tags: ovpn}
|
|
||||||
- {role: nextcloud, tags: nextcloud, when: ansible_os_family == 'Archlinux'}
|
|
||||||
- {role: bat, tags: bat, when: ansible_os_family == 'Debian'}
|
|
||||||
- {role: install-firefox, tags: firefox}
|
|
||||||
- {role: copy_files}
|
|
||||||
- {role: do1jlr.i3wm, tags: i3wm}
|
|
||||||
- {role: ntp, tags: ntp}
|
|
||||||
- {role: xrandr, tags: xrandr}
|
|
||||||
- {role: arch-fonts, tags: fonts}
|
|
||||||
# - {role: winehq, tags: wine}
|
|
||||||
- {role: no-sleep, tags: sleep}
|
|
||||||
- {role: do1jlr.avahi_daemon, tags: [avahi_daemon, avahi]}
|
|
||||||
- {role: do1jlr.avahi_client, tags: [avahi_client, mdns]}
|
|
|
@ -1,38 +0,0 @@
|
||||||
---
|
|
||||||
- name: check if ansible is not to old
|
|
||||||
hosts: localhost
|
|
||||||
roles:
|
|
||||||
- {role: ansible_version, tags: always, gather_facts: false}
|
|
||||||
|
|
||||||
- name: base packages setup
|
|
||||||
hosts: t460p.local
|
|
||||||
roles:
|
|
||||||
- {role: workstation_packages, tags: [base, packages, workstation]}
|
|
||||||
|
|
||||||
- name: user and ssh(d) setup
|
|
||||||
hosts: t460p.local
|
|
||||||
roles:
|
|
||||||
- {role: do1jlr.users, tags: [users, base]}
|
|
||||||
- {role: do1jlr.auth, tags: [auth, base]}
|
|
||||||
- {role: do1jlr.sshd, tags: [sshd, base]}
|
|
||||||
- {role: dotfiles, tags: [dotfiles, base]}
|
|
||||||
|
|
||||||
- name: fancy schnickschnack
|
|
||||||
hosts: t460p.local
|
|
||||||
roles:
|
|
||||||
- {role: akku-warning, tags: akku}
|
|
||||||
# - {role: pulseaudio, tags: [pulse, audio, pulseaudio]}
|
|
||||||
- {role: networkmanager, tags: networkmanager, when: ansible_os_family == 'Archlinux'}
|
|
||||||
- {role: openvpn, tags: ovpn}
|
|
||||||
- {role: nextcloud, tags: nextcloud, when: ansible_os_family == 'Archlinux'}
|
|
||||||
- {role: bat, tags: bat, when: ansible_os_family == 'Debian'}
|
|
||||||
- {role: install-firefox, tags: firefox}
|
|
||||||
- {role: copy_files}
|
|
||||||
- {role: do1jlr.i3wm, tags: i3wm}
|
|
||||||
- {role: ntp, tags: ntp}
|
|
||||||
- {role: xrandr, tags: xrandr}
|
|
||||||
- {role: arch-fonts, tags: fonts}
|
|
||||||
# - {role: winehq, tags: wine}
|
|
||||||
- {role: no-sleep, tags: sleep}
|
|
||||||
- {role: do1jlr.avahi_daemon, tags: [avahi_daemon, avahi]}
|
|
||||||
- {role: do1jlr.avahi_client, tags: [avahi_client, mdns]}
|
|
|
@ -1,38 +0,0 @@
|
||||||
---
|
|
||||||
- name: check if ansible is not to old
|
|
||||||
hosts: localhost
|
|
||||||
roles:
|
|
||||||
- {role: ansible_version, tags: always, gather_facts: false}
|
|
||||||
|
|
||||||
- name: base packages setup
|
|
||||||
hosts: workstation.local
|
|
||||||
roles:
|
|
||||||
- {role: workstation_packages, tags: [base, packages, workstation]}
|
|
||||||
|
|
||||||
- name: user and ssh(d) setup
|
|
||||||
hosts: workstation.local
|
|
||||||
roles:
|
|
||||||
- {role: do1jlr.users, tags: [users, base]}
|
|
||||||
- {role: do1jlr.auth, tags: [auth, base]}
|
|
||||||
- {role: do1jlr.sshd, tags: [sshd, base]}
|
|
||||||
- {role: dotfiles, tags: [dotfiles, base]}
|
|
||||||
|
|
||||||
- name: fancy schnickschnack
|
|
||||||
hosts: workstation.local
|
|
||||||
roles:
|
|
||||||
- {role: akku-warning, tags: akku}
|
|
||||||
- {role: pulseaudio, tags: [pulse, audio, pulseaudio]}
|
|
||||||
- {role: networkmanager, tags: networkmanager, when: ansible_os_family == 'Archlinux'}
|
|
||||||
- {role: openvpn, tags: ovpn}
|
|
||||||
- {role: nextcloud, tags: nextcloud, when: ansible_os_family == 'Archlinux'}
|
|
||||||
- {role: bat, tags: bat, when: ansible_os_family == 'Debian'}
|
|
||||||
- {role: install-firefox, tags: firefox}
|
|
||||||
- {role: copy_files}
|
|
||||||
- {role: do1jlr.i3wm, tags: i3wm}
|
|
||||||
- {role: ntp, tags: ntp}
|
|
||||||
- {role: xrandr, tags: xrandr}
|
|
||||||
- {role: arch-fonts, tags: fonts}
|
|
||||||
- {role: winehq, tags: wine}
|
|
||||||
- {role: no-sleep, tags: sleep}
|
|
||||||
- {role: do1jlr.avahi_daemon, tags: [avahi_daemon, avahi]}
|
|
||||||
- {role: do1jlr.avahi_client, tags: [avahi_client, mdns]}
|
|
Loading…
Reference in a new issue