Sign in Join
Wiki copytemporary

Revision 1 of 1, by Serbod on 6-25-2018. The page as it is now.

Installation on Linux with Ansible

Headless installation (fpclazup)

File lazarus_vars.yml containing the user under which Lazarus should be installed:

yaml
---
lazarus_user: "lazar"

The actual playbook:

yaml
---
- hosts: 192.168.1.43
  vars_files:
          - lazarus_vars.yml

  tasks:

# prerequisites
  - name: update packages
    become: yes
    apt: "update_cache=yes"

  - name: install dependencies
    become: yes
    apt: name= state=latest
    with_items:
          - "make"
          - "binutils"
          - "build-essential"
          - "gdb"
          - "subversion"
          - "zip"
          - "unzip"
          - "libx11-dev"
          - "libgtk2.0-dev"
          - "libgdk-pixbuf2.0-dev"
          - "libcairo2-dev"
          - "libpango1.0-dev"
          - "unrar"
          - "libxtst-dev"
          - "libgl1-mesa-dev"
          - "libatk-adaptor"

  - name: create user for Lazarus installation
    become: yes
    user: name=""

  - name: get url for latest fpclazup
    local_action:
       module: uri
       url: https://api.github.com/repos/LongDirtyAnimAlf/Reiniero-fpcup/releases/latest
       return_content: yes
       method: GET
    register: json_info

  - name: download latest fpclazup
    become: yes
    become-user: ""
    get_url:
      url: ""
      dest: "/home//"

  - name: make downloaded executable
    become: yes
    become-user: ""
    shell: chmod +x /home//fpclazup-x86_64-linux

  - name: install 64bit
    become: yes
    become-user: ""
    shell: /home//fpclazup-x86_64-linux --fpcURL="stable" --lazURL="stable" --installdir=usr/share/fpclazstable --fpcsplit --noconfirm

Installer with GUI (Fpcupdeluxe)

File lazarus_vars.yml containing the user under which Lazarus should be installed:

yaml
---
lazarus_user: "lazar"

The actual playbook:

yaml
---
- hosts: 192.168.1.43
  vars_files:
          - lazarus_vars.yml

  tasks:

# prerequisites
  - name: update packages
    become: yes
    apt: "update_cache=yes"

  - name: install dependencies
    become: yes
    apt: name= state=latest
    with_items:
          - "make"
          - "binutils"
          - "build-essential"
          - "gdb"
          - "subversion"
          - "zip"
          - "unzip"
          - "libx11-dev"
          - "libgtk2.0-dev"
          - "libgdk-pixbuf2.0-dev"
          - "libcairo2-dev"
          - "libpango1.0-dev"
          - "unrar"
          - "libxtst-dev"
          - "libgl1-mesa-dev"
          - "libatk-adaptor"

  - name: create user for Lazarus installation
    become: yes
    user: name=""

  - name: get url for latest FPCUPDeluxe
    local_action:
       module: uri
       url: https://api.github.com/repos/newpascal/fpcupdeluxe/releases/latest
       return_content: yes
       method: GET
    register: json_info

  - name: download latest FPCUPDeluxe
    become: yes
    become-user: ""
    get_url:
      url: ""
      dest: "/home//"

  - name: make downloaded executable
    become: yes
    become-user: ""
    shell: chmod +x /home//fpcupdeluxe-x86_64-linux

From the Free Pascal wiki, page "Installation on Linux with Ansible", as it stood on 2018-06-25 after a change by Serbod, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.