Vlad's Common Ansible Role.
N/A
Available variables are listed below, along with default values (see defaults/main.yml)
Check https://docs.ansible.com/ansible/latest/modules/user_module.html for a complete list of parameters
local_users:
- name: username
comment: My User Name
uid: 8888
groups: mygroup
append: yes
shell: /bin/bash
authorized_keys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE0yyqRUbBGOW9PcYyuaUMaRi/EFwL59E3wwMn5dJAKQ MyKey
Check https://docs.ansible.com/ansible/latest/modules/group_module.html for a complete list of parameters
local_groups:
- name: mygroup
gid: 1234
Check https://docs.ansible.com/ansible/latest/modules/apt_repository_module.html for a complete list of parameters
apt_repositories:
- name: GIT
repo: ppa:git-core/ppa
Check https://docs.ansible.com/ansible/latest/modules/cron_module.html for a complete list of parameters
cron_jobs:
- name: Docker CleanUp
minute: '2'
hour: '2'
job: docker system prune --force 2>&1 | /usr/bin/logger -t DockerCleanUp
Check https://docs.ansible.com/ansible/latest/modules/mount_module.html for a complete list of parameters
mounts:
- name: MyBackup
path: /data/backup
src: UUID=1234-1234-1234-1234-1234
fstype: ext4
state: mounted
Using SystemD mount points
systemd_mounts:
- name: NFS auto mount
automount: yes
what: 192.168.1.10:/media
where: /mnt/media
options: _netdev,auto
type: nfs
Install Fail2ban and Unattended Upgrades
fail2ban_enabled: yes
unattended_upgrades_autoupdate_enabled: yes
disable_lid_switch
: Set to yes to disable lid switch on laptops (defaults tono
)
additional_packages
: A list of packages to install using APT/YUM
Check https://docs.ansible.com/ansible/latest/modules/pip_module.html for more info
# System wide install
pip_install_packages: [ipaddress]
# User install
pip_user_install_packages:
- user: test
packages: [colorama]
state: latest
N/A
- hosts: all
become: yes
roles:
- vladgh.common
Contributions are always welcome! Please read the contribution guidelines and the code of conduct.
Licensed under the Apache License, Version 2.0. See LICENSE file.