ansible/roles/common/tasks/main.yml
2020-02-05 21:13:04 -06:00

34 lines
1.1 KiB
YAML

#!/usr/bin/ansible-playbook
# vim:ft=ansible:
---
- name: Update and upgrade apt packages
apt:
upgrade: yes
update_cache: yes
# One day
cache_valid_time: 86400
become: yes
- name: Install basic packages
apt:
name: "{{ packages }}"
vars:
packages:
- python-apt
- vim
become: yes
- name: Assure Cockpit user
user:
name: cockpit
shell: /bin/bash
groups: sudo
append: yes
become: yes
- name: Authorize key for Cockpit user
authorized_key:
user: cockpit
state: present
manage_dir: yes
key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC8pjK7Z6V9IjxRtLB9Xwt5Rujj0iMQqOVExRkmkIzjEcblV/cqtwx4fOijoN9eQlmrjQg05rBWoHJoUiLH5LimU2HPQt9vSDSt/tTXNafhvi3St3nz+GA9yCwAkJfvz2QL/vnU7sfveYC2xmWZC0xjcG4bl8pL2GJgfyh4OnfS9vNRTpn1kAJ/Fl4vRLtRaFx1WzF3/RJUOkesYLegawSRJsaIamJFI5YxHe5VeTnFefVtssgbGrOj19uRDIZkBW/5uWsnNPVwbGUT089qioS11QFJaVOQCgU/E+4lxCHlRfLQ+gnXvaQV3j0JFk/I1bZNlCcNLHc0ZasXIqV+BUaR4au35QkDBjh38DCxesZ775tudXUp7KP6OHCC9i9ncIkum3mE+4K+0KAlS0oevUQdfguXkRQ6q3vydxEgWbBOx3jHi7i5AwvOnJqZRmUnfFp0qfhGfcS2pLEZhUcd0bOM6qAyK1XD5XRzXoVLS9bdHNUwCaIWie0tOYMLLmNooTU= salt@dsk-cstm-0"
become: yes
become_user: cockpit