oragono/tasks/main.yaml
changeset 114 34c8632d763d
child 118 56bffa9ef826
equal deleted inserted replaced
113:d843011c249d 114:34c8632d763d
       
     1 ---
       
     2 
       
     3 - name: add oragono user
       
     4   become: yes
       
     5   user: name="oragono"
       
     6 
       
     7 - name: download oragono
       
     8   become: yes
       
     9   unarchive:
       
    10     remote_src: yes
       
    11     src: "{{oragono_url}}"
       
    12     dest: "/tmp"
       
    13     creates: "/tmp/{{oragono_tar_name}}/"
       
    14 
       
    15 - name: install oragono
       
    16   become: yes
       
    17   copy:
       
    18     src: "/tmp/{{oragono_tar_name}}/oragono"
       
    19     dest: "/usr/local/bin/"
       
    20     remote_src: yes
       
    21     owner: "root"
       
    22     group: "root"
       
    23     mode: "0755"
       
    24   notify: restart oragono
       
    25 
       
    26 - name: create oragono dirs
       
    27   become: yes
       
    28   file:
       
    29     path: "{{item}}/oragono"
       
    30     owner: "oragono"
       
    31     group: "oragono"
       
    32     mode: "0755"
       
    33     state: "directory"
       
    34   loop:
       
    35     - "/etc"
       
    36     - "/var"
       
    37     - "/run"
       
    38 
       
    39 - name: configure oragono
       
    40   become: yes
       
    41   template:
       
    42     src: "oragono.yaml.j2"
       
    43     dest: "/etc/oragono/oragono.yaml"
       
    44     owner: "oragono"
       
    45     group: "oragono"
       
    46     mode: "0644"
       
    47   notify: restart oragono
       
    48 
       
    49 - name: copy motd file
       
    50   become: yes
       
    51   copy:
       
    52     src: "{{oragono_motd}}"
       
    53     dest: "/etc/oragono/oragono.motd"
       
    54   notify: restart oragono
       
    55 
       
    56 - name: install oragono service
       
    57   become: yes
       
    58   template:
       
    59     src: "oragono.service.j2"
       
    60     dest: "/lib/systemd/system/oragono.service"
       
    61     mode: "0644"
       
    62   notify: restart oragono
       
    63 
       
    64 - name: ensure oragono is started
       
    65   become: yes
       
    66   systemd: service="oragono.service" enabled="yes" state="started" daemon_reload="yes"