Skip to content

Commit

Permalink
Updated Baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
lolli001 committed Jul 19, 2024
1 parent 7ce4f44 commit a88ed68
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 2 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,11 @@ Terraform Workspace for creating and managing AWS Image Pipelines


To SSO Login:
aws sso login --profile 229685449397-csvd-dev-gov.inf-admin-t2
aws sso login --profile 229685449397-csvd-dev-gov.inf-admin-t2

export AWS_PROFILE=229685449397-csvd-dev-gov.inf-admin-t2

aws sts get-caller-identity


rebecaa linn : She does x86 (get context for ARM)
53 changes: 52 additions & 1 deletion ansible/rhel-arm-baseline.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
---

name: RHEL ARM Baseline

hosts: all

become: true

tasks:

- name: Ensure latest packages are installed
yum:
name: '*'
Expand All @@ -15,10 +19,57 @@ tasks:
- vim
- git
- curl
- wget
- net-tools
- unzip
- epel-release
- htop
state: present

- name: Create example user
user:
name: exampleuser
state: present
groups: wheel
groups: wheel
shell: /bin/bash
password: "{{ 'password' | password_hash('sha512') }}" # Need to change password here

- name: Configure SSH for exampleuser
authorized_key:
user: exampleuser
state: present
key: "{{ lookup('file', '/path/to/exampleuser_ssh_key.pub') }}" # Replace with the actual path to the public key

- name: Ensure firewalld is installed and running
yum:
name: firewalld
state: present

- name: Start and enable firewalld
service:
name: firewalld
state: started
enabled: yes

- name: Open SSH port in firewall
firewalld:
service: ssh
permanent: true
state: enabled
immediate: yes

- name: Disable SELinux
selinux:
state: disabled

- name: Set timezone to UTC
command: timedatectl set-timezone UTC

- name: Reboot the system to apply changes
reboot:
msg: "Reboot initiated by Ansible for baseline setup"
connect_timeout: 5
reboot_timeout: 600
pre_reboot_delay: 0
post_reboot_delay: 30
test_command: whoami

0 comments on commit a88ed68

Please sign in to comment.