mirror of
https://github.com/pigmonkey/spark.git
synced 2026-01-23 10:25:39 +00:00
misc formatting
This commit is contained in:
parent
53e00f14f4
commit
b91c1adace
4 changed files with 60 additions and 19 deletions
|
|
@ -1,5 +1,10 @@
|
|||
---
|
||||
- name: restart paccache
|
||||
service: name=paccache.timer state=restarted
|
||||
service:
|
||||
name: paccache.timer
|
||||
state: restarted
|
||||
|
||||
- name: stop systemd per-user instance
|
||||
service: name="user@{{ user.uid }}" state=stopped
|
||||
service:
|
||||
name: "user@{{ user.uid }}"
|
||||
state: stopped
|
||||
|
|
|
|||
|
|
@ -1,33 +1,56 @@
|
|||
---
|
||||
- name: Create user group
|
||||
group: name={{ user.group }} state=present
|
||||
group:
|
||||
name: "{{ user.group }}"
|
||||
state: present
|
||||
tags:
|
||||
- user
|
||||
|
||||
- name: Create user and assign to group
|
||||
user: name={{ user.name }} group={{ user.group }} password={{ user_password|password_hash('sha512') }} shell={{ user.shell }} update_password=on_create uid={{ user.uid }} groups=uucp append=yes
|
||||
user:
|
||||
name: "{{ user.name }}"
|
||||
group: "{{ user.group }}"
|
||||
password: "{{ user_password|password_hash('sha512') }}"
|
||||
shell: "{{ user.shell }}"
|
||||
update_password: on_create
|
||||
uid: "{{ user.uid }}"
|
||||
groups: uucp
|
||||
append: yes
|
||||
tags:
|
||||
- user
|
||||
|
||||
- name: Create user log dir
|
||||
file: path=/home/{{ user.name }}/{{ user.log.dir }} state=directory owner={{ user.name }} group={{ user.group }}
|
||||
file:
|
||||
path: /home/{{ user.name }}/{{ user.log.dir }}
|
||||
state: directory
|
||||
owner: "{{ user.name }}"
|
||||
group: "{{ user.group }}"
|
||||
when: user.log.dir is defined
|
||||
tags:
|
||||
- user
|
||||
|
||||
- name: Push logrotate config for user logs
|
||||
template: src=logrotate.j2 dest=/etc/logrotate.d/user
|
||||
template:
|
||||
src: logrotate.j2
|
||||
dest: /etc/logrotate.d/user
|
||||
when: user.log.dir is defined
|
||||
tags:
|
||||
- user
|
||||
|
||||
- name: Create user socket directory
|
||||
file: path=/run/user/{{ user.uid }} state=directory owner={{ user.name }} group={{ user.group }} mode=0700
|
||||
file:
|
||||
path: /run/user/{{ user.uid }}
|
||||
state: directory
|
||||
owner: "{{ user.name }}"
|
||||
group: "{{ user.group }}"
|
||||
mode: 0700
|
||||
tags:
|
||||
- user
|
||||
|
||||
- name: Start user systemd instance
|
||||
service: name="user@{{ user.uid }}" state=started
|
||||
service:
|
||||
name: "user@{{ user.uid }}"
|
||||
state: started
|
||||
notify: stop systemd per-user instance
|
||||
tags:
|
||||
- user
|
||||
|
|
|
|||
|
|
@ -1,21 +1,27 @@
|
|||
---
|
||||
- name: Install himawaripy into virtual environment
|
||||
pip: name=git+https://github.com/boramalper/himawaripy#egg=himawaripy
|
||||
virtualenv=/usr/local/env/himawaripy
|
||||
virtualenv_command=virtualenv3
|
||||
pip:
|
||||
name: git+https://github.com/boramalper/himawaripy#egg=himawaripy
|
||||
virtualenv: /usr/local/env/himawaripy
|
||||
virtualenv_command: virtualenv3
|
||||
|
||||
- name: Link himawaripy to bin
|
||||
file: src=/usr/local/env/himawaripy/bin/himawaripy
|
||||
dest=/usr/local/bin/himawaripy
|
||||
state=link
|
||||
file:
|
||||
src: /usr/local/env/himawaripy/bin/himawaripy
|
||||
dest: /usr/local/bin/himawaripy
|
||||
state: link
|
||||
|
||||
- name: Push himawaripy service file
|
||||
template: src=himawaripy.service.j2 dest=/etc/systemd/user/himawaripy.service
|
||||
template:
|
||||
src: himawaripy.service.j2
|
||||
dest: /etc/systemd/user/himawaripy.service
|
||||
notify:
|
||||
- reload systemd config
|
||||
|
||||
- name: Push himawaripy timer file
|
||||
template: src=himawaripy.timer.j2 dest=/etc/systemd/user/himawaripy.timer
|
||||
template:
|
||||
src: himawaripy.timer.j2
|
||||
dest: /etc/systemd/user/himawaripy.timer
|
||||
notify:
|
||||
- reload systemd config
|
||||
- restart himawaripy
|
||||
|
|
|
|||
|
|
@ -1,18 +1,25 @@
|
|||
---
|
||||
- name: Push mail sync script
|
||||
template: src=mailsync.sh.j2 dest=/usr/local/bin/mailsync mode=755
|
||||
template:
|
||||
src: mailsync.sh.j2
|
||||
dest: /usr/local/bin/mailsync
|
||||
mode: 755
|
||||
tags:
|
||||
- mailsync
|
||||
|
||||
- name: Push mailsync service file
|
||||
template: src=mailsync.service.j2 dest=/etc/systemd/user/mailsync.service
|
||||
template:
|
||||
src: mailsync.service.j2
|
||||
dest: /etc/systemd/user/mailsync.service
|
||||
tags:
|
||||
- mailsync
|
||||
notify:
|
||||
- reload systemd config
|
||||
|
||||
- name: Push mailsync timer file
|
||||
template: src=mailsync.timer.j2 dest=/etc/systemd/user/mailsync.timer
|
||||
template:
|
||||
src: mailsync.timer.j2
|
||||
dest: /etc/systemd/user/mailsync.timer
|
||||
tags:
|
||||
- mailsync
|
||||
notify:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue