x
This commit is contained in:
+13
-16
@@ -17,7 +17,7 @@
|
|||||||
#### !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
#### !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
####
|
####
|
||||||
|
|
||||||
- name: bootstrap.yml
|
- name: Bootstrap playbook
|
||||||
hosts: all
|
hosts: all
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
@@ -28,19 +28,19 @@
|
|||||||
- name: Update repositories
|
- name: Update repositories
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
update_cache: yes
|
update_cache: true
|
||||||
|
|
||||||
- name: Install bootstrap packages
|
- name: Install bootstrap packages
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
state: latest
|
state: present
|
||||||
pkg:
|
pkg:
|
||||||
- bash
|
- bash
|
||||||
- curl
|
- curl
|
||||||
- python3
|
- python3
|
||||||
- python3-pip
|
- python3-pip
|
||||||
- python3-venv
|
- python3-venv
|
||||||
- python3-virtualenv
|
- python3-virtualenv
|
||||||
|
|
||||||
|
|
||||||
#### Configure sudo
|
#### Configure sudo
|
||||||
@@ -84,7 +84,6 @@
|
|||||||
|
|
||||||
#### Configure sshd
|
#### Configure sshd
|
||||||
|
|
||||||
## New
|
|
||||||
- name: Make sure /etc/ssh/sshd_config.d exists
|
- name: Make sure /etc/ssh/sshd_config.d exists
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
@@ -94,7 +93,6 @@
|
|||||||
group: root
|
group: root
|
||||||
mode: u=rwx,go=rx
|
mode: u=rwx,go=rx
|
||||||
|
|
||||||
## New
|
|
||||||
- name: Get /etc/ssh/sshd_config.d/hpf.conf
|
- name: Get /etc/ssh/sshd_config.d/hpf.conf
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
@@ -103,7 +101,7 @@
|
|||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: u=rwx,go=rx
|
mode: u=rwx,go=rx
|
||||||
backup: yes
|
backup: true
|
||||||
validate: /usr/sbin/sshd -t -f %s
|
validate: /usr/sbin/sshd -t -f %s
|
||||||
notify: Restart sshd
|
notify: Restart sshd
|
||||||
|
|
||||||
@@ -169,7 +167,7 @@
|
|||||||
uid: 800
|
uid: 800
|
||||||
group: hpf-ans
|
group: hpf-ans
|
||||||
groups: hpf-sudo-np
|
groups: hpf-sudo-np
|
||||||
append: yes
|
append: true
|
||||||
create_home: true
|
create_home: true
|
||||||
shell: /usr/bin/bash
|
shell: /usr/bin/bash
|
||||||
|
|
||||||
@@ -269,14 +267,13 @@
|
|||||||
- name: Remove packages installed as dependencies that are no longer required and purge their configuration files
|
- name: Remove packages installed as dependencies that are no longer required and purge their configuration files
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
autoremove: yes
|
autoremove: true
|
||||||
purge: true
|
purge: true
|
||||||
|
|
||||||
- name: Remove old downloaded packages
|
- name: Remove old downloaded packages
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
autoclean: yes
|
autoclean: true
|
||||||
# changed_when: false
|
|
||||||
|
|
||||||
|
|
||||||
#### Handlers
|
#### Handlers
|
||||||
|
|||||||
Reference in New Issue
Block a user