Automated changes from linter ;P

This commit is contained in:
Mark Janssen 2024-07-11 20:47:52 +02:00
parent 44b73a216f
commit f7f04e7a41
Signed by: foobar
GPG key ID: D8674D8FC4F69BD2
65 changed files with 392 additions and 324 deletions

View file

@ -1,11 +1,11 @@
---
- name: Install dependencies
apt:
ansible.builtin.apt:
name: [ links, python3-pyquery ]
state: present
- name: Clone revbank-inflatinator source
git:
ansible.builtin.git:
repo: https://github.com/bitlair/revbank-inflatinator.git
version: main
dest: /opt/revbank-inflatinator

View file

@ -1,6 +1,6 @@
---
- name: Add user
user:
ansible.builtin.user:
name: bank
password: $6$idklol$QrOE/21LDR0vhZBAXwgA7AvnmR6Ju4ZqzAzgeazC08i2yw9kyQjgwu.uuV692iL/cyE7AteDYUxCpcorONXom. # "bank"
home: /home/{{ bank_user }}
@ -8,7 +8,7 @@
update_password: always
- name: Allow password auth for bank user
blockinfile:
ansible.builtin.blockinfile:
path: /etc/ssh/sshd_config
insertafter: EOF
block: |-
@ -17,12 +17,12 @@
notify: reload sshd
- name: Clear motd
copy:
ansible.builtin.copy:
content: ""
dest: /etc/motd
- name: Remove autologin
file:
ansible.builtin.file:
path: /etc/systemd/system/getty@tty1.service.d/override.conf
state: absent
notify: daemon reload
@ -31,19 +31,20 @@
- when: bank_local_tty
block:
- name: Locate agetty
command: command -v agetty
ansible.builtin.command:
cmd: command -v agetty
register: agetty_location_cmd
- set_fact:
- ansible.builtin.set_fact:
agetty_location: "{{ agetty_location_cmd.stdout_lines | join }}"
- name: Create getty dir
file:
ansible.builtin.file:
path: /etc/systemd/system/getty@tty1.service.d
state: directory
- name: Autologin User
template:
ansible.builtin.template:
src: tty_autologin.conf
dest: /etc/systemd/system/getty@tty1.service.d/override.conf
owner: root

View file

@ -1,9 +1,12 @@
---
- tags: [ bank, bank_login ]
import_tasks: login.yaml
ansible.builtin.import_tasks:
file: login.yaml
- tags: [ bank, bank_revbank ]
import_tasks: revbank.yaml
ansible.builtin.import_tasks:
file: revbank.yaml
- tags: [ bank, bank_inflatinator ]
import_tasks: inflatinator.yaml
ansible.builtin.import_tasks:
file: inflatinator.yaml

View file

@ -1,18 +1,18 @@
---
- name: Install dependencies
apt:
ansible.builtin.apt:
name: [ git, libterm-readline-gnu-perl, libcurses-ui-perl, qrencode ]
state: present
- name: Clone revbank source
git:
ansible.builtin.git:
repo: "{{ bank_revbank_git }}"
version: master
dest: /home/{{ bank_user }}/revbank.git
accept_hostkey: yes
- name: Create data files
command: cp /home/{{ bank_user }}/revbank.git/{{ item }} /home/{{ bank_user }}/{{ item }}
ansible.builtin.command: cp /home/{{ bank_user }}/revbank.git/{{ item }} /home/{{ bank_user }}/{{ item }}
args:
creates: /home/{{ bank_user }}/{{ item }}
with_items:
@ -21,7 +21,7 @@
- revbank.products
- name: Ensure data file permissions
file:
ansible.builtin.file:
path: /home/{{ bank_user }}/{{ item }}
state: touch
owner: "{{ bank_user }}"
@ -33,7 +33,7 @@
- revbank.products
- name: Link plugins
file:
ansible.builtin.file:
state: link
path: /home/{{ bank_user }}/{{ item }}
src: /home/{{ bank_user }}/revbank.git/{{ item }}
@ -42,11 +42,11 @@
- revbank.plugins
- name: Create git data dir
file:
ansible.builtin.file:
path: /home/{{ bank_user }}/data.git
state: directory
- name: Install git cronjob
template:
ansible.builtin.template:
src: git.cron
dest: /etc/cron.d/revbank-git