Skip to content

Instantly share code, notes, and snippets.

@platu
Last active March 19, 2024 16:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save platu/8e966ea0efe021721c5c3ec3c443ced1 to your computer and use it in GitHub Desktop.
Save platu/8e966ea0efe021721c5c3ec3c443ced1 to your computer and use it in GitHub Desktop.
IaC Lab01 VM systems bits and pieces tuning
---
- name: CONFIGURE SYSTEM BITS AND PIECES
hosts: vms
become: true
tasks:
- name: CONFIGURE VM LOCALES
community.general.locale_gen:
name: fr_FR.UTF-8
state: present
- name: CONFIGURE VM TIMEZONE
community.general.timezone:
name: Europe/Paris
- name: INSTALL DEBIAN KEYRING
ansible.builtin.apt:
name: debian-keyring
state: present
update_cache: true
- name: UPDATE DEBIAN SOURCES
ansible.builtin.replace:
path: /etc/apt/sources.list.d/debian.sources
regexp: "^(Components: main\n)(?!Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg)"
replace: "Components: main\nSigned-By: /usr/share/keyrings/debian-archive-keyring.gpg\n"
args:
backup: true
- name: ADD LL BASH ALIAS
ansible.builtin.lineinfile:
path: "/home/{{ ansible_user }}/.bash_aliases"
line: alias ll='ls -lAhF --color=auto'
create: true
mode: "0644"
owner: "{{ ansible_user }}"
group: "{{ ansible_user }}"
args:
backup: true
become: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment