main.yml - ansible-roles - A collection of ansible roles I have created over the years.
(HTM) git clone git://jay.scot/ansible-roles
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
main.yml (1507B)
---
1 ---
2 - name: Include OS-specific variables.
3 ansible.builtin.include_vars: "{{ ansible_os_family }}.yml"
4
5 - name: Install required packages
6 ansible.builtin.package:
7 name: "{{ common_packages }}"
8 state: present
9
10 - name: Git checkout
11 ansible.builtin.git:
12 repo: "{{ source_repo }}"
13 dest: "{{ build_path }}"
14 force: false
15 version: "{{ geomyidae.git_branch }}"
16 register: repo_clone
17 failed_when:
18 - repo_clone.failed
19 - not 'Local modifications exist in the destination' in repo_clone.msg
20
21 - name: Disable TLS options
22 ansible.builtin.replace:
23 path: "{{ build_path }}/Makefile"
24 regexp: '^TLS_CFLAGS = -DENABLE_TLS'
25 replace: '#TLS_CFLAGS = -DENABLE_TLS'
26 when: disable_tls
27
28 - name: Disable TLS flags
29 ansible.builtin.replace:
30 path: "{{ build_path }}/Makefile"
31 regexp: '^TLS_LDFLAGS = -ltls'
32 replace: '#TLS_LDFLAGS = -ltls'
33 when: disable_tls
34
35 - name: Build geomyidae
36 community.general.system.make:
37 chdir: "{{ build_path }}"
38 notify: Install geomyidae
39
40 - name: Flush handlers
41 ansible.builtin.meta: flush_handlers
42
43 - name: Create root directory
44 ansible.builtin.file:
45 path: "{{ geomyidae.root_path }}"
46 owner: "{{ geomyidae.user }}"
47 group: "{{ geomyidae.group }}"
48 mode: 0755
49 state: directory
50
51 - name: Create systemd service file
52 ansible.builtin.template:
53 src: templates/geomyidae.service.j2
54 dest: /lib/systemd/system/geomyidae.service
55 owner: root
56 group: root
57 mode: '0644'
58 notify: Restart geomyidae