Fix the syntax.

This commit is contained in:
Andrea Dell'Amico 2023-04-13 22:42:25 +02:00
parent 069840db7d
commit 65953344a4
Signed by: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
3 changed files with 21 additions and 24 deletions

View File

@ -1,17 +1,7 @@
Role Name Role Name
========= =========
A role that A role that installs pandoc on deb systems
Role Variables
--------------
The most important variables are listed below:
``` yaml
users_system_users:
- { login: 'foo', name: "Foo Bar", home: '{{ users_home_dir }}', createhome: 'yes', ssh_key: '{{ foo_ssh_key }}', shell: '/bin/bash', admin: False, log_as_root: False }
```
Dependencies Dependencies
------------ ------------

View File

@ -1,5 +1,5 @@
--- ---
pandoc_install: true pandoc_install_from_pandoc_org: true
pandoc_pkg_version: 3.1.2 pandoc_pkg_version: 3.1.2
pandoc_pkg_file: 'pandoc-{{ pandoc_pkg_version }}-1-amd64.deb' pandoc_pkg_file: 'pandoc-{{ pandoc_pkg_version }}-1-amd64.deb'

View File

@ -1,17 +1,24 @@
--- ---
- block: - name: Download the pandoc deb from the developers and install it
- name: Get the pandoc deb package
get_url: url={{pandoc_pkg_url}} dest=/srv/{{ pandoc_pkg_file }}
- name: Install the pandoc deb package
apt: deb=/srv/{{ pandoc_pkg_file }}
when: ansible_facts['distribution_version'] is version('16.04', '<')
tags: pandoc tags: pandoc
when: pandoc_install_from_pandoc_org
block:
- name: Get the pandoc deb package
ansible.builtin.get_url:
url: "{{ pandoc_pkg_url }}"
dest: "/srv/{{ pandoc_pkg_file }}"
mode: 0644
- block: - name: Install the pandoc deb package
- name: Install the pandoc deb package, distribution version ansible.builtin.apt:
apt: pkg=pandoc state=present cache_valid_time=3600 deb: "/srv/{{ pandoc_pkg_file }}"
when: ansible_facts['distribution_version'] is version('16.04', '>=') - name: Install pandoc from the distribution
tags: pandoc tags: pandoc
when: not pandoc_install_from_pandoc_org
block:
- name: Install the pandoc deb package, distribution version
ansible.builtin.apt:
pkg: pandoc
state: present
cache_valid_time: 3600