You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
913 B
YAML
48 lines
913 B
YAML
---
|
|
- name: Add sources list
|
|
ansible.builtin.copy:
|
|
src: sources_list
|
|
dest: /etc/apt/sources.list
|
|
owner: root
|
|
group: root
|
|
mode: 0440
|
|
|
|
- name: Update Packages
|
|
ansible.builtin.apt:
|
|
upgrade: dist
|
|
update_cache: true
|
|
|
|
- name: Install Sudo
|
|
ansible.builtin.apt:
|
|
pkg:
|
|
- sudo
|
|
|
|
#- name: Create ansible user
|
|
# ansible.builtin.user:
|
|
# name: ansible
|
|
# groups: root
|
|
# shell: /bin/bash
|
|
#
|
|
#- name: Add ssh key for ansible
|
|
# authorized_key:
|
|
# user: ansible
|
|
# state: present
|
|
# key: "{{ lookup('file', '~/.ssh/ansible.pub') }}"
|
|
|
|
- name: Ensure the sudoers.d directory exists
|
|
ansible.builtin.file:
|
|
path: /etc/sudoers.d
|
|
state: directory
|
|
mode: '0440'
|
|
|
|
- name: Add sudoers files
|
|
ansible.builtin.template:
|
|
src: sudoer_file
|
|
dest: "/etc/sudoers.d/{{ item }}"
|
|
owner: root
|
|
group: root
|
|
mode: 0440
|
|
with_items:
|
|
# - ansible
|
|
- cianhatton
|