lnurld/server/tasks/main.yaml
changeset 31 562b76293a66
equal deleted inserted replaced
30:ff5ba9f5d7ab 31:562b76293a66
       
     1 ---
       
     2 
       
     3 - name: add lnurld user
       
     4   become: yes
       
     5   user: name="{{lnurld_user}}" shell="/bin/false" system="yes"
       
     6 
       
     7 - name: install lnurld bin
       
     8   become: yes
       
     9   get_url:
       
    10     url: "{{lnurld_bin_url}}"
       
    11     dest: "/usr/local/bin/lnurld"
       
    12     mode: "0755"
       
    13   notify: restart lnurld service
       
    14 
       
    15 - name: create lnurld data dir
       
    16   become: yes
       
    17   file:
       
    18     path: "{{lnurld_data_dir}}"
       
    19     mode: "0710"
       
    20     owner: "{{lnurld_user}}"
       
    21     group: "{{lnurld_user}}"
       
    22     state: "directory"
       
    23 
       
    24 - name: create lnurld etc dir
       
    25   become: yes
       
    26   file:
       
    27     path: "/etc/lnurld/"
       
    28     mode: "0755"
       
    29     state: "directory"
       
    30 
       
    31 - name: install lnurld config
       
    32   become: yes
       
    33   template:
       
    34     src: "config.yaml.j2"
       
    35     dest: "/etc/lnurld/config.yaml"
       
    36     owner: "{{lnurld_user}}"
       
    37     group: "{{lnurld_user}}"
       
    38     mode: "0600"
       
    39   notify: restart lnurld service
       
    40 
       
    41 - name: install lnurld systemd service
       
    42   become: yes
       
    43   template:
       
    44     src: "lnurld.service.j2"
       
    45     dest: "/lib/systemd/system/lnurld.service"
       
    46   notify: restart lnurld service
       
    47 
       
    48 - name: ensure service is started
       
    49   become: yes
       
    50   systemd: name="lnurld.service" enabled="yes" state="started"