https://github.com/nleiva/ansible-workstation
https://github.com/nleiva/ansible-workstation
ansible fedora rhel9
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/nleiva/ansible-workstation
- Owner: nleiva
- License: gpl-3.0
- Created: 2022-10-06T17:20:27.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-03T18:26:31.000Z (about 2 years ago)
- Last Synced: 2024-12-28T12:15:46.871Z (4 months ago)
- Topics: ansible, fedora, rhel9
- Language: Shell
- Homepage:
- Size: 84 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
# My workstation
[](https://github.com/nleiva/ansible-workstation/actions/workflows/ansible_lint.yml)I run RHEL9, which you can [get for free](https://developers.redhat.com/articles/faqs-no-cost-red-hat-enterprise-linux#general).
The following playbook installs the software I need and customizes the environment for any time I need to go back to square one.
## Dependencies
```
$ ansible-galaxy collection install community.general --upgrade
```## Running
Need a local user and `become` password. All inputs are in the [inputs.yml](inputs.yml) file.
```
$ ansible-playbook rhel.yml -vK -e "ansible_user=nleiva"
```Use of tags example: Don't re-install RHEL additional repositories and skip RPM Fusion.
```
$ ansible-playbook rhel.yml -vK -e "ansible_user=nleiva" --skip-tags "rhel_repo, fusion_repo"
```## Running on a new install
If you want to run it on a fresh system without Ansible.
```
$ python3 -m pip install --user ansible-core
$ python3 -m pip show ansible-core
```## Internal RH stuff
You need to manually install a couple of RPM's first: [See method 3](https://redhat.service-now.com/help?id=kb_article_view&sysparm_article=KB0005424).
To skip these tasks, use tag `red_hat`:
```
$ ansible-playbook rhel.yml -vK -e "ansible_user=nleiva" --skip-tags "rhel_repo, fusion_repo, red_hat"
```## After restoring files
```
sudo cp MyCA.pem /etc/pki/ca-trust/source/anchors/MyCA.pem
sudo update-ca-trust
```## Disable Wayland
To be able to screen-share during meetings.
`/etc/gdm/custom.conf`
```ini
[daemon]
# Uncomment the line below to force the login screen to use Xorg
WaylandEnable=false
DefaultSession=gnome-xorg.desktop
```
## Hack to fix SFTP for non-interactive sessionsPut following into top of ~/.bashrc on username of id on remote machine if that id uses bash (SOURCE: https://unix.stackexchange.com/a/505642).
```bash
# If not running interactively, don't do anything and return early
[[ $- == *i* ]] || return
```## Fedora
After enabling the RH_internal stuff. To skip these tasks, use tag `red_hat`:
```
$ ansible-playbook fedora.yml -vK -e "ansible_user=nleiva" --skip-tags "rhel_repo, red_hat"
```