Initial commit
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -0,0 +1,2 @@
|
||||
[rhel8]
|
||||
azure-rhel8 ansible_host=168.62.187.3 ansible_user=admiller ansible_become=yes
|
||||
Reference in New Issue
Block a user