1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- ---
- # tasks file for ffdo.gluon-collector
- - when: ansible_machine != "x86_64"
- set_fact: gluon_collector_download_url="{{gluon_collector_download_url}}-386"
- - name: Create Group for gluon-collector
- group:
- name: "{{gluon_collector_group}}"
- state: present
- system: yes
- - name: Create user for gluon-collector
- user:
- name: "{{gluon_collector_user}}"
- createhome: no
- home: "{{gluon_collector_base_path}}"
- system: yes
- state: present
- groups: "{{gluon_collector_group}}"
- - name: Create install directory for gluon-collector
- file:
- dest: "{{gluon_collector_base_path}}"
- state: directory
- owner: "{{gluon_collector_user}}"
- group: "{{gluon_collector_group}}"
- - name: Create gluon-collector configuration
- template:
- src: config.j2
- dest: "{{gluon_collector_base_path}}/gluon-collector.yml"
- owner: "{{gluon_collector_user}}"
- group: "{{gluon_collector_group}}"
- mode: "u=rw,g=rw,o=r"
- notify: Restart gluon-collector
- - name: Download gluon-collector
- get_url:
- dest: "{{gluon_collector_base_path}}/gluon-collector"
- url: "{{gluon_collector_download_url}}"
- - name: Set permission on gluon-collector executable
- file:
- dest: "{{gluon_collector_base_path}}/gluon-collector"
- owner: "{{gluon_collector_user}}"
- group: "{{gluon_collector_group}}"
- mode: "u=rwx,g=rw,o=r"
- - name: Generate systemd service
- template:
- src: systemd.j2
- dest: /etc/systemd/system/gluon-collector.service
- - name: Ensure gluon-collector is started and enabled via systemd
- service:
- name: gluon-collector
- state: started
- enabled: yes
|