migrate
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
---
|
||||
- name: Post install configuration
|
||||
hosts: all
|
||||
become: true # Use this if you need sudo privileges
|
||||
tasks:
|
||||
|
||||
- name: Update and Upgrade all packages
|
||||
apt:
|
||||
update_cache: yes
|
||||
upgrade: dist
|
||||
when: ansible_os_family == "Debian"
|
||||
|
||||
- name: create ansible user
|
||||
user:
|
||||
name: ansible
|
||||
shell: '/bin/bash'
|
||||
|
||||
- name: Install public keys
|
||||
authorized_key:
|
||||
user: ansible
|
||||
key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINxwwGO69n2Ljbip4h43T4SRgzRu6iaUPWXR/R25rPjr ansible@ubuntu03"
|
||||
|
||||
- name: add ansible to sudoers
|
||||
copy:
|
||||
src: sudoer_ansible
|
||||
dest: /etc/sudoers.d/ansible
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0440
|
||||
Reference in New Issue
Block a user