1
0
Fork 0
home-stack-ansible/roles/common/tasks/main.yml

48 lines
1.0 KiB
YAML
Raw Normal View History

2021-08-25 04:33:56 +00:00
- name: Install basic packages
apt:
update_cache: yes
2021-08-25 04:33:56 +00:00
name:
- curl
- vim
- tmux
2022-08-29 13:23:19 +00:00
- gpg
2021-08-25 04:33:56 +00:00
2023-03-14 19:00:28 +00:00
- name: Set system journal limits
lineinfile:
path: /etc/systemd/journald.conf
line: SystemMaxUse=1G
regexp: '^#?SystemMaxUse='
notify: Restart systemd-journald.service
2021-08-25 04:33:56 +00:00
- name: Set default editor to vim
lineinfile:
path: /etc/environment
line: EDITOR=vim
- name: Disable root login
user:
name: root
password: '*'
- name: Ensure sudoers is correctly configured
lineinfile:
path: /etc/sudoers
line: '%sudo ALL=(ALL:ALL) ALL'
regexp: '^%sudo\s+'
validate: '/usr/sbin/visudo -cf %s'
- name: Configure users
include_tasks: user.yml
with_dict: '{{ users }}'
- name: Configure hostname
hostname:
name: '{{ inventory_hostname }}'
2021-11-12 22:19:02 +00:00
# - name: Configure hostname in /etc/hosts
# blockinfile:
# dest: /etc/hosts
# marker: '# {mark} ANSIBLE MANAGED BLOCK HOSTNAME'
# block: |
# 127.0.0.1 {{ inventory_hostname }}
# ::1 {{ inventory_hostname }}