ce-provision

Ansible

Install Ansible in a Python virtual environment.

Note, it is vitally important that Ansible is not installed via apt or pip globally, or you will likely not get the correct version of Ansible when you try to run shell scripts. The role will try and take care of this for you, but for extra safety you could manually check prior to running ce-provision.

Default variables

---
ce_ansible:
  # These are usually set in the _init role using _venv_path, _venv_command and _venv_install_username but can be overridden.
  #venv_path: "/home/{{ ce_provision.username }}/ansible"
  #venv_command: /usr/bin/python3.11 -m venv
  #venv_install_username: ansible # user to become when creating venv
  upgrade:
    enabled: true # create systemd timer to auto-upgrade Ansible
    command: "{{ _venv_path }}/bin/python3 -m pip install --upgrade ansible" # if you set venv_path above then set it here too
    on_calendar: "*-*-* 01:30:00" # see systemd.time documentation - https://www.freedesktop.org/software/systemd/man/latest/systemd.time.html#Calendar%20Events
    #timer_name: upgrade_ansible
  linters:
    enabled: true # will not install linters if false, installing linters breaks cloud-init