An Ansible role for preparing a linux system to be managed by ansible.
This role uses the ansible.builtin.raw
module
in combination with an own-implemented "Operating System determination system"
to install the minimum required set of packages (python
and sudo
)
in order to allow Ansible to manage a system.
This role also ensures an up-to-date package cache for most systems.
In most cases, you will want to use this role in combination with my
core_dependencies
-role.
ℹ️
|
DISCLAIMER
This role is a fork of robertdebock/ansible-role-bootstrap v5.2.12 (27 January, 2022)
(Apache License 2.0, Copyright Robert de Bock ([email protected]))
with various changes/fixes.
|
Below you can find information on…
-
the role’s required Ansible version
-
the role’s supported platforms
-
the role’s role dependencies
link:meta/main.yml[role=include]
bootstrap_user: root
Username
used to connect to the machine for the primary raw
tasks of gathering simple facts / installing.
bootstrap_become: false
bootstrap_become_user: root
become
and become_user
variables passed to most actual tasks.
The default value of bootstrap_become
was set to false
because of the assumption that sudo
is not available
before bootstrapping.
bootstrap_wait_for_host: false
Whether to wait for the host to be available on ansible_port
(22).
bootstrap_timeout: 3
Maximum number of seconds to wait for the remote system to be reachable/usable before failing.
Each variable listed in this section
is dynamically defined when executing this role (and can only be overwritten using ansible.builtin.set_facts
) and
is meant to be used not just internally.
Tasks are tagged with the following tags:
Tag | Purpose |
---|---|
This role does not have officially documented tags yet. |
You can use Ansible to skip tasks, or only run certain tasks by using these tags. By default, all tasks are run when no tags are specified.
❗
|
You must disable the No tasks must come before this role. |
---
- hosts: servers:&provisioned
name: Bootstrap linux machines to be managed by Ansible.
become: false
gather_facts: false
roles:
- role: jonaspammer.bootstrap
---
- hosts: servers:&provisioned
name: Bootstrap linux machines to be managed by Ansible.
become: false
gather_facts: false
vars:
bootstrap_user: "{{ ansible_user }}"
roles:
- role: jonaspammer.bootstrap
---
- hosts: servers:&provisioned
name: Bootstrap linux machines to be managed by Ansible.
become: true
gather_facts: false
vars:
bootstrap_user: "{{ ansible_user }}"
bootstrap_become: true
roles:
- role: jonaspammer.bootstrap
A role may work on different distributions, like Red Hat Enterprise Linux (RHEL), even though there is no test for this exact distribution.
OS Family | Distribution | Distribution Release Date | Distribution End of Life | Accompanying Docker Image |
---|---|---|---|---|
Rocky |
Rocky Linux 8 (RHEL/CentOS 8 in disguise) |
2021-06 |
2029-05 |
|
Rocky |
Rocky Linux 9 |
2022-07 |
2032-05 |
|
RedHat |
Fedora 39 |
2023-11 |
2024-12 |
|
Debian |
Ubuntu 20.04 LTS |
2021-04 |
2025-04 |
|
Debian |
Ubuntu 22.04 LTS |
2022-04 |
2027-04 |
|
Debian |
Debian 11 |
2021-08 |
2024-06 (2026-06 LTS) |
|
Debian |
Debian 12 |
2023-06 |
2026-06 (2028-06 LTS) |
The tested ansible versions try to stay equivalent with the
support pattern of Ansible’s community.general
collection.
As of writing this is:
-
2.13 (Ansible 6)
-
2.14 (Ansible 7)
-
2.15 (Ansible 8)
-
2.16 (Ansible 9)
Please refer to the Release Page of this Repository for a human changelog of the corresponding Tags (Versions) of this Project.
Note that this Project adheres to Semantic Versioning. Please report any accidental breaking changes of a minor version update.
link:LICENSE[role=include]