diff --git a/README.md b/README.md index 4bd2746..a2570ef 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,7 @@ Role Name ========= -A role that - -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 } -``` +A role that installs pandoc on deb systems Dependencies ------------ diff --git a/defaults/main.yml b/defaults/main.yml index 29c149f..8fc20e6 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,5 +1,5 @@ --- -pandoc_install: true +pandoc_install_from_pandoc_org: true pandoc_pkg_version: 3.1.2 pandoc_pkg_file: 'pandoc-{{ pandoc_pkg_version }}-1-amd64.deb' diff --git a/tasks/main.yml b/tasks/main.yml index 6f781df..a240571 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,17 +1,24 @@ --- -- block: - - 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', '<') +- name: Download the pandoc deb from the developers and install it 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, distribution version - apt: pkg=pandoc state=present cache_valid_time=3600 + - name: Install the pandoc deb package + ansible.builtin.apt: + deb: "/srv/{{ pandoc_pkg_file }}" - when: ansible_facts['distribution_version'] is version('16.04', '>=') +- name: Install pandoc from the distribution 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