yamllint config and fixes

This commit is contained in:
David Kilias 2020-12-28 22:53:53 +01:00
parent 052eeba266
commit 97f33f3bc7
8 changed files with 40 additions and 28 deletions

10
.yamllint Normal file
View file

@ -0,0 +1,10 @@
---
extends: default
rules:
truthy:
allowed-values:
- 'true'
- 'false'
- 'yes'
- 'no'

View file

@ -6,7 +6,7 @@
ansible_python_interpreter: /usr/bin/python3
roles:
- role: ansible.timezone
- role: ansible.timezone
tasks:
- name: Update and clean package cache
@ -25,10 +25,10 @@
name: ansible-role-unattended-upgrades
vars:
unattended_origins_patterns:
- 'origin=Debian,archive=buster-security'
- 'o=Debian,a=buster-updates'
- "origin=Debian,archive=buster-security"
- "o=Debian,a=buster-updates"
unattended_package_blacklist: [cowsay]
unattended_mail: 'root'
unattended_mail: "root"
- name: Setup users
include_role:

View file

@ -1,3 +1,4 @@
---
- hosts: pottwal.n39.eu
become: true
@ -16,10 +17,10 @@
uritools_host_port: 8080
roles:
- role: docker_setup
vars:
docker_data_root: "/srv/docker"
- role: apache
- role: docker_setup
vars:
docker_data_root: "/srv/docker"
- role: apache
tasks:
- name: Ensure apt-cacher container is running
@ -101,8 +102,7 @@
- "{{ openhab_data }}/userdata:/openhab/userdata:rw"
keep_volumes: yes
restart_policy: unless-stopped
env:
EXTRA_JAVA_OPTS="-Duser.timezone=Europe/Berlin"
env: EXTRA_JAVA_OPTS="-Duser.timezone=Europe/Berlin"
- name: Setup proxy site openhab.n39.eu
include_role:

View file

@ -1,3 +1,4 @@
---
- src: git+https://github.com/jnv/ansible-role-unattended-upgrades.git
version: v1.9.0
- src: git+https://github.com/adriagalin/ansible.timezone.git

View file

@ -1,3 +1,4 @@
---
docker_compose_version: "1.25.4"
docker_compose_path: /usr/local/bin/docker-compose
docker_data_root: "/var/lib/docker"

View file

@ -18,10 +18,10 @@
state: present
vars:
packages:
- apt-transport-https
- ca-certificates
- gnupg2
- software-properties-common
- apt-transport-https
- ca-certificates
- gnupg2
- software-properties-common
- name: add Docker apt-key
apt_key:
@ -30,10 +30,10 @@
- name: add Docker's APT repository
apt_repository:
repo: deb https://download.docker.com/linux/debian buster stable
state: present
update_cache: true
filename: 'docker'
repo: deb https://download.docker.com/linux/debian buster stable
state: present
update_cache: true
filename: "docker"
- name: install Docker
package:
@ -41,8 +41,8 @@
state: present
vars:
packages:
- docker-ce
- python3-docker
- docker-ce
- python3-docker
- name: Set docker configuration
template:
@ -73,7 +73,7 @@
- name: Place admin users in docker group
user:
name: "{{ item.logname }}"
groups: docker
groups: [docker]
append: yes
when: item.docker
with_items: "{{ users }}"

View file

@ -1,9 +1,8 @@
---
- name: Ensure sudo is installed
package:
name:
- sudo
- sudo
state: present
- name: Configure group sudo for sudoers without password
@ -11,7 +10,7 @@
path: /etc/sudoers
state: present
regexp: '^%sudo\s'
line: '%sudo ALL=(ALL) NOPASSWD: ALL'
line: "%sudo ALL=(ALL) NOPASSWD: ALL"
validate: /usr/sbin/visudo -cf %s
- name: Add users | create users' shell and home dir
@ -30,12 +29,12 @@
with_subelements:
- "{{ users }}"
- ssh_pub
- skip_missing: True
- skip_missing: true
- name: Place user in sudo group
user:
name: "{{ item.logname }}"
groups: sudo
groups: [sudo]
append: yes
when: item.sudo
with_items: "{{ users }}"

View file

@ -1,3 +1,4 @@
---
- hosts: tau.netz39.de
become: true
@ -5,8 +6,8 @@
ansible_python_interpreter: /usr/bin/python3
roles:
- role: docker_setup
- role: apache
- role: docker_setup
- role: apache
tasks:
- name: Setup docker network