Initial commit

This commit is contained in:
Jon Ervine
2021-03-03 11:36:53 +08:00
parent a5dc995324
commit 4cdbe9a6d5
137 changed files with 12374 additions and 2 deletions
+7
View File
@@ -0,0 +1,7 @@
FROM registry.access.redhat.com/ubi8/ubi
RUN yum -y install python3-pip gcc python3-devel openssh-clients
RUN pip3 install https://github.com/ansible/ansible/archive/devel.tar.gz
RUN pip3 install https://github.com/ansible/ansible-runner/archive/devel.tar.gz
+41
View File
@@ -0,0 +1,41 @@
---
- name: Run some basic system automation stuff
hosts: rhel8
tasks:
- name: install some basic packages
yum:
name:
- tmux
- git
- vim-enhanced
- python3
- name: enable journald persistent storage
file:
path: /var/log/journal
state: directory
- name: Get tuned profile
slurp:
src: /etc/tuned/active_profile
register: tuned_active_profile
- debug:
msg: "{{ tuned_active_profile['content'] | b64decode | trim }}"
- name: tuned-adm set throughput-performance
shell: /usr/sbin/tuned-adm profile throughput-performance
when: "tuned_active_profile['content'] | b64decode | trim != 'throughput-performance'"
- name: don't allow password based ssh
lineinfile:
path: /etc/ssh/sshd_config
regexp: '^PasswordAuthentication'
line: "PasswordAuthentication no"
notify: restart sshd
handlers:
- name: restart sshd
service:
name: sshd
state: restarted
+2
View File
@@ -0,0 +1,2 @@
[rhel8]
azure-rhel8 ansible_host=168.62.187.3 ansible_user=admiller ansible_become=yes