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