Firman's Ansible repository
Find a file
2026-10-22 12:13:55 +07:00
files feat(playbooks): add Podman setup playbook 2026-05-24 23:32:51 +07:00
inventory feat(inventory): remove unused VM, add entries for a520 and l380yoga hosts 2026-10-21 12:44:46 +07:00
playbooks feat(playbooks): add new playbooks for setting up Debian or BlankOn Linux with GNOME 2026-10-21 13:17:17 +07:00
roles feat!(roles): remove GNOME Debian setup Nocturne flatpak install 2026-10-22 12:13:55 +07:00
ansible.cfg feat: initial ansible repo setup with playbooks to setup ansible user 2026-05-16 21:36:19 +07:00
LICENSE feat: initial ansible repo setup with playbooks to setup ansible user 2026-05-16 21:36:19 +07:00
README.md docs: rewrite README.md 2026-10-21 12:40:39 +07:00

M.R. Firmansyah's Ansible Repository

This is Ansible playbooks for setting up my personal configuration on:

  1. Arch Linux
  2. Alma Linux server with minimal Wayland Window Manager
  3. Debian desktop with GNOME Desktop Environment

Some term need to be noted are:

  • Control node: the workspace machine, the place where you type into terminal the ansible commands
  • Managed node: the remote machine, ansible will execute commands here
  • Inventory: lists of hosts which stated in inventory/hosts.yml, to do execution only on specific host use limit argument (-l)
  • Become: access root/super user access similar to sudo in traditional console commands
  • Playbook: In this reposity, the playbook is the one that will be executed from control node, in which will call the roles
  • Role: Compilation of tasks, some playbook can share same roles
  • Task: the actual commands that will executed on managed node

Most of the commands will be executed with ansible user from both control and managed nodes, in which atleast ansible command with community modules installed required on control node. While managed nodes requires only ansible user with sudo access, for convinience this user will grants passwordless sudo access, this user is system user, it can't login normally except from ssh with only ssh key or using sudo/su. The next section will help you to setup both control and manages nodes ansible user.

Setup ansible user

From existing (not ansible) user on control node this user required sudo access. Vault password is required for decrypting my personal ansible private SSH key which will be send into newly created ansible user. Replace vault-password with actual Ansible vault password:

$ mkdir ~/.ansible
$  echo 'vault-password' > ~/.ansible/vault_pass
$ git clone https://git.mrfirmansyah.my.id/firman/ansible.git
$ cd ansible
$ ansible-playbook -K -i inventory playbooks/00_setup_ansible_user_control_node.yml

Atleast single user with sudo access on managed node required for creating ansible user on control node. Let's called this user with sudo access foo, and assume the control node's IP already listed on inventory under the name bar. Do following command to create ansible user with my SSH public key, so later you don't need manually put SSH password for each ansible from control node execute playbooks to the managed node. You can drop -k argument if your control node's non ansible user SSH public key already copied to foo user.

$ ansible-playbook -K -k -i inventory -u foo -l bar playbooks/00_setup_ansible_user_managed_nodes.yml

How to use

After creating ansible user on both control and managed nodes. You can switch user to ansible user, from previous playbook this git repo should already be cloned. For this example, let's say we want run playbooks/01_setup_system_almalinux_server.yml on host named foo which already stated in inventory.

$ sudo -iu ansible
$ cd ansible
$ ansible-playbook -i inventory -l foo playbooks/01_setup_system_almalinux_server.yml