# Ansible - Setup fresh new ubuntu server

```yaml
#################################################
# SMT Playbooks: Initial Server Setup
#################################################

# Run on Mac OS: (https://github.com/ansible/ansible/issues/76322)
# export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
# ansible-playbook -i hosts.ini setup-new-instance-playbook.yml
---
- name: Setup new Ubuntu Server
  hosts: aws_node_01
  become: true
  roles:
    - ngtrieuvi92.setup_ubuntu_sever
    - ansible-node-exporter
    - role: geerlingguy.docker
      become: true
  become_user: "{{target_user}}"

  vars:
    ansible_user: ubuntu
    ansible_ssh_private_key_file: ~/.ssh/main_private_key.pem
    target_user: nimbus
    ssh_public_key_paths:
      - ~/.ssh/id_rds.pub
    # control docker install
    docker_users:
      - "{{target_user}}"
    docker_install_compose_plugin: true
    docker_compose_package: docker-compose-plugin
    docker_compose_package_state: present
    docker_install_compose: false

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dev-notes.vinguyen.blog/notes/deployment-and-operation/ansible/ansible-setup-fresh-new-ubuntu-server.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
