Skip to content
Ansible role to install and configure code-server.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
defaults
handlers
meta
tasks
templates
tests
vars
.gitignore
LICENSE
README.md

README.md

ansible-role-code-server

Ansible Role

This role installs and configures code-server, supporting both v1 and v2.

Requirements

None.

Role Variables

Variable Default Comment
code_server_ver 2.1665-vsc1.39.2 code-server release name on GitHub
code_server_data_dir ~/.local/share/code-server
code_server_work_dir ~ Working directory
code_server_password (not defined) Leave not defined to use auto-generated password.
Check it with journalctl -u code-server
code_server_user root The user to run code-server
code_server_host 0.0.0.0
code_server_port 8080
tls_cert (not defined) Leave not defined to use self-signed certificate.
tls_key (not defined) Leave not defined to use self-signed certificate.

Dependencies

None.

Example Playbook

#!/usr/bin/env ansible-playbook
---
- hosts: localhost
  gather_facts: yes
  roles:
    - name: pallxk/code_server
      code_server_work_dir: ~/code-server
      code_server_password: SuperSecret
      code_server_user: "{{ ansible_user_id }}"
      code_server_host: 0.0.0.0
      code_server_port: 8443
      tls_cert: /etc/letsencrypt/live/example.com/fullchain.pem
      tls_key: /etc/letsencrypt/live/example.com/privkey.pem

License

The MIT License (MIT)

Author Information

pallxk testcab

You can’t perform that action at this time.