create roles for richard user and home.xai-corp.net
This commit is contained in:
8
home.xai-corp.net.yml
Normal file
8
home.xai-corp.net.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
# playbook to install django test on home.xai-corp.net
|
||||
|
||||
- hosts: home
|
||||
remote_user: root
|
||||
|
||||
roles:
|
||||
- home.xai-corp.net
|
||||
4
roles/_ping/tasks/main.yml
Normal file
4
roles/_ping/tasks/main.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
|
||||
- name: test connection
|
||||
ping:
|
||||
4
roles/devtools/defaults/main.yml
Normal file
4
roles/devtools/defaults/main.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
# defaults/main.yml
|
||||
# define default variable values here
|
||||
|
||||
9
roles/devtools/handlers/main.yml
Normal file
9
roles/devtools/handlers/main.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
# handlers/main.yml
|
||||
# define handlers here
|
||||
|
||||
#- name: restart <service>
|
||||
# service: name=<service> state=restarted
|
||||
|
||||
#- name: stop <service>
|
||||
# service: name=<service> state=stopped
|
||||
8
roles/devtools/meta/main.yml
Normal file
8
roles/devtools/meta/main.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
# meta/main.yml
|
||||
# define dependancies here
|
||||
|
||||
# dependencies:
|
||||
# - { role: geerlingguy.java }
|
||||
|
||||
dependencies: []
|
||||
17
roles/devtools/tasks/main.yml
Normal file
17
roles/devtools/tasks/main.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
# tasks/main.yml
|
||||
# define tasks here
|
||||
|
||||
|
||||
- name: install composer
|
||||
shell: curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/local/bin/composer
|
||||
|
||||
- name: install nodejs and npm
|
||||
apt: pkg={{ item }} state=installed
|
||||
with_items:
|
||||
- nodejs
|
||||
- nodejs-legacy
|
||||
- npm
|
||||
|
||||
- name: install grunt globaly
|
||||
npm: name="grunt-cli" global=yes
|
||||
10
roles/devtools/vars/_extravars.yml
Normal file
10
roles/devtools/vars/_extravars.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
# vars/_extravars.yml
|
||||
# define extra variable values here
|
||||
# this file should be loaded via an include_vars statement in the task.
|
||||
# often this is used for managing differences in os.
|
||||
|
||||
# Variable setup.
|
||||
#- name: Include OS-Specific variables
|
||||
# include_vars: "{{ ansible_os_family }}.yml"
|
||||
|
||||
4
roles/home.xai-corp.net/defaults/main.yml
Normal file
4
roles/home.xai-corp.net/defaults/main.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
# defaults/main.yml
|
||||
# define default variable values here
|
||||
|
||||
9
roles/home.xai-corp.net/handlers/main.yml
Normal file
9
roles/home.xai-corp.net/handlers/main.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
# handlers/main.yml
|
||||
# define handlers here
|
||||
|
||||
#- name: restart <service>
|
||||
# service: name=<service> state=restarted
|
||||
|
||||
#- name: stop <service>
|
||||
# service: name=<service> state=stopped
|
||||
10
roles/home.xai-corp.net/meta/main.yml
Normal file
10
roles/home.xai-corp.net/meta/main.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
# meta/main.yml
|
||||
# define dependancies here
|
||||
|
||||
# dependencies:
|
||||
# - { role: geerlingguy.java }
|
||||
|
||||
dependencies:
|
||||
- _ping
|
||||
- user-richard
|
||||
3
roles/home.xai-corp.net/tasks/main.yml
Normal file
3
roles/home.xai-corp.net/tasks/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
# tasks/main.yml
|
||||
# define tasks here
|
||||
10
roles/home.xai-corp.net/vars/_extravars.yml
Normal file
10
roles/home.xai-corp.net/vars/_extravars.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
# vars/_extravars.yml
|
||||
# define extra variable values here
|
||||
# this file should be loaded via an include_vars statement in the task.
|
||||
# often this is used for managing differences in os.
|
||||
|
||||
# Variable setup.
|
||||
#- name: Include OS-Specific variables
|
||||
# include_vars: "{{ ansible_os_family }}.yml"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
apt: pkg={{ item }} state=installed
|
||||
with_items:
|
||||
- php5-fpm
|
||||
- php5-curl
|
||||
|
||||
# phalcon
|
||||
- apt_repository: repo='ppa:phalcon/stable' state=present
|
||||
|
||||
8
roles/user-richard/defaults/main.yml
Normal file
8
roles/user-richard/defaults/main.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
# defaults/main.yml
|
||||
# define default variable values here
|
||||
|
||||
user:
|
||||
name: richard
|
||||
group: richard
|
||||
home: /home/richard/
|
||||
9
roles/user-richard/handlers/main.yml
Normal file
9
roles/user-richard/handlers/main.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
# handlers/main.yml
|
||||
# define handlers here
|
||||
|
||||
#- name: restart <service>
|
||||
# service: name=<service> state=restarted
|
||||
|
||||
#- name: stop <service>
|
||||
# service: name=<service> state=stopped
|
||||
8
roles/user-richard/meta/main.yml
Normal file
8
roles/user-richard/meta/main.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
# meta/main.yml
|
||||
# define dependancies here
|
||||
|
||||
# dependencies:
|
||||
# - { role: geerlingguy.java }
|
||||
|
||||
dependencies: []
|
||||
6
roles/user-richard/tasks/main.yml
Normal file
6
roles/user-richard/tasks/main.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
# tasks/main.yml
|
||||
# define tasks here
|
||||
|
||||
- name: copy .procmailrc
|
||||
template: src=procmailrc.j2 dest={{ user.home }}/.procmailrc owner={{ user.name }} group={{ user.group }} mode=0640
|
||||
112
roles/user-richard/templates/procmailrc.j2
Normal file
112
roles/user-richard/templates/procmailrc.j2
Normal file
@@ -0,0 +1,112 @@
|
||||
# .procmailrc
|
||||
# routes incoming mail to appropriate mailboxes
|
||||
PATH=/usr/bin:/usr/local/bin
|
||||
MAILDIR=$HOME/Maildir/
|
||||
PMDIR=$MAILDIR
|
||||
LOGFILE=/var/log/procmail.log
|
||||
VERBOSE=yes
|
||||
LOGABSTRACT=no
|
||||
SHELL=/bin/sh
|
||||
DROPPRIVS=yes
|
||||
DELIVER=/usr/libexec/dovecot/deliver
|
||||
|
||||
# --------------------------------------------------
|
||||
# TEST
|
||||
#:0:
|
||||
#* ^Subject.*test
|
||||
#| $DELIVER -m Systems
|
||||
|
||||
# --------------------------------------------------
|
||||
# Family and Friends
|
||||
:0:
|
||||
* ^(From|Cc).*ellen.morgan@talk21.com
|
||||
* ^(From|Cc).*tessier_vero@hotmail.com
|
||||
* ^(From|Cc).*richard@xai-corp.net
|
||||
| $DELIVER -m Family
|
||||
|
||||
# --------------------------------------------------
|
||||
# Musicians
|
||||
:0:
|
||||
* ^(From|Cc).*m.a.berube@hotmail.com
|
||||
| $DELIVER -m Music
|
||||
|
||||
# --------------------------------------------------
|
||||
# Reverb Nation
|
||||
:0:
|
||||
* ^(From|Cc|To).*updates@reverbnation.com
|
||||
| $DELIVER -m Notifications
|
||||
|
||||
:0:
|
||||
* ^(From|Cc|To).*noreply@reverbnation.com
|
||||
| $DELIVER -m Publicity
|
||||
|
||||
# --------------------------------------------------
|
||||
# Code Project
|
||||
:0:
|
||||
* ^(From|Cc|To).*maillist.codeproject.com
|
||||
* ^(Subject).*(Offers)
|
||||
| $DELIVER -m Publicity
|
||||
|
||||
:0:
|
||||
* ^(From|Cc|To).*maillist.codeproject.com
|
||||
| $DELIVER -m Newsletters
|
||||
|
||||
|
||||
# --------------------------------------------------
|
||||
# Social Media Notifications
|
||||
:0:
|
||||
* ^(From|Cc).*@facebookmail.com
|
||||
| $DELIVER -m Notifications
|
||||
|
||||
:0:
|
||||
* ^(From|Cc).*@twitter.com
|
||||
| $DELIVER -m Notifications
|
||||
|
||||
|
||||
# --------------------------------------------------
|
||||
# Newsletters
|
||||
:0:
|
||||
* ^(From|Cc).*(dzone|messages4|folkalley|info.docker|accuradio).com
|
||||
| $DELIVER -m Newsletters
|
||||
|
||||
:0:
|
||||
* ^From.*news@linkedin.com
|
||||
| $DELIVER -m Newsletters
|
||||
|
||||
:0:
|
||||
* ^From.*news@linkedin.com
|
||||
| $DELIVER -m Newsletters
|
||||
|
||||
# --------------------------------------------------
|
||||
# Paypal receipts
|
||||
:0:
|
||||
* ^From.*intl.paypal.com
|
||||
| $DELIVER -m Paypal
|
||||
|
||||
|
||||
# --------------------------------------------------
|
||||
# Publicity
|
||||
:0:
|
||||
* ^From.*e.paypal.com
|
||||
| $DELIVER -m Publicity
|
||||
|
||||
:0:
|
||||
* ^From.*@codeanywhere.net
|
||||
| $DELIVER -m Publicity
|
||||
|
||||
:0:
|
||||
* ^From.*Google(\+| Analytics| AdSense)
|
||||
| $DELIVER -m Publicity
|
||||
|
||||
:0:
|
||||
* ^From.*Netflix
|
||||
| $DELIVER -m Publicity
|
||||
|
||||
|
||||
|
||||
|
||||
# --------------------------------------------------
|
||||
# --------------------------------------------------
|
||||
# Default Inbox
|
||||
:0 w
|
||||
| $DELIVER
|
||||
10
roles/user-richard/vars/_extravars.yml
Normal file
10
roles/user-richard/vars/_extravars.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
# vars/_extravars.yml
|
||||
# define extra variable values here
|
||||
# this file should be loaded via an include_vars statement in the task.
|
||||
# often this is used for managing differences in os.
|
||||
|
||||
# Variable setup.
|
||||
#- name: Include OS-Specific variables
|
||||
# include_vars: "{{ ansible_os_family }}.yml"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
roles:
|
||||
- jenkins
|
||||
- devtools
|
||||
- {
|
||||
role: website,
|
||||
server_hostname: "htmlgames.xai-corp.net",
|
||||
|
||||
Reference in New Issue
Block a user