Replaced localtunnel with ngrok, changed the supporting scripts pathing, add vars for git, fixed pathing for nfs mounts
This commit is contained in:
@@ -1,11 +1,13 @@
|
|||||||
---
|
---
|
||||||
# Variables listed here are applicable to all host groups
|
# Variables listed here are applicable to all host groups
|
||||||
|
|
||||||
docker_compose_version_to_install: 1.14.0
|
docker_compose_version_to_install: 1.18.0
|
||||||
docker_ce_version_to_install: 17.06.0~ce-0~ubuntu
|
docker_ce_version_to_install: 17.09.1~ce-0~ubuntu
|
||||||
nvm_version: v0.33.5
|
nvm_version: v0.33.5
|
||||||
node_version: 8.4.0
|
node_version: 8.4.0
|
||||||
registry_location: "registry.wimer.local:5000"
|
registry_location: "registry.wimer.local:5000"
|
||||||
nfs_location: 10.0.0.150
|
nfs_location: 10.0.0.150
|
||||||
home_pub_key: https://raw.githubusercontent.com/jcwimer/ubuntu-template/master/post/id_rsa.pub
|
home_pub_key: https://raw.githubusercontent.com/jcwimer/ubuntu-template/master/post/id_rsa.pub
|
||||||
standard_user: cody
|
standard_user: cody
|
||||||
|
git_user: "Jacob Cody Wimer"
|
||||||
|
git_email: "jacob.wimer@gmail.com"
|
||||||
|
|||||||
@@ -56,13 +56,13 @@
|
|||||||
|
|
||||||
- git_config:
|
- git_config:
|
||||||
name: user.name
|
name: user.name
|
||||||
value: 'Jacob {{ standard_user }} Wimer'
|
value: "{{ git_user }}"
|
||||||
become: yes
|
become: yes
|
||||||
become_user: "{{ standard_user }}"
|
become_user: "{{ standard_user }}"
|
||||||
|
|
||||||
- git_config:
|
- git_config:
|
||||||
name: user.email
|
name: user.email
|
||||||
value: 'jacob.wimer@gmail.com'
|
value: "{{ git_email }}"
|
||||||
become: yes
|
become: yes
|
||||||
become_user: "{{ standard_user }}"
|
become_user: "{{ standard_user }}"
|
||||||
|
|
||||||
@@ -77,14 +77,14 @@
|
|||||||
name: America/New_York
|
name: America/New_York
|
||||||
|
|
||||||
- name: Replace sudoers file
|
- name: Replace sudoers file
|
||||||
template: src=../roles/common/templates/sudoers.j2 dest=/etc/sudoers
|
template: src=../roles/common/templates/sudoers.j2 dest=/etc/sudoers
|
||||||
|
|
||||||
- name: Replace docker daemon file
|
- name: Replace docker daemon file
|
||||||
template: src=../roles/common/templates/docker-daemon.json.j2 dest=/etc/docker/daemon.json
|
template: src=../roles/common/templates/docker-daemon.json.j2 dest=/etc/docker/daemon.json
|
||||||
register: dockerdaemon
|
register: dockerdaemon
|
||||||
|
|
||||||
- name: Restart docker if daemon changes
|
- name: Restart docker if daemon changes
|
||||||
service:
|
service:
|
||||||
name: docker
|
name: docker
|
||||||
state: restarted
|
state: restarted
|
||||||
when: dockerdaemon.changed
|
when: dockerdaemon.changed
|
||||||
@@ -92,13 +92,19 @@
|
|||||||
- name: Creates directory
|
- name: Creates directory
|
||||||
file: path=/data state=directory
|
file: path=/data state=directory
|
||||||
|
|
||||||
|
- name: Data is mounted
|
||||||
|
stat: path=/data/swarm
|
||||||
|
register: data_mounted
|
||||||
|
|
||||||
- name: USB lab data in fstab
|
- name: USB lab data in fstab
|
||||||
|
when: not data_mounted.stat.exists
|
||||||
lineinfile: dest=/etc/fstab
|
lineinfile: dest=/etc/fstab
|
||||||
regexp="^{{ nfs_location }}:/volumeUSB1"
|
regexp=\/data
|
||||||
state=present
|
state=present
|
||||||
line="{{ nfs_location }}:/volumeUSB1/usbshare/raw-files/fileserver/shares/lab-data /data nfs defaults 0 0"
|
line="{{ nfs_location }}:/volumeUSB1/usbshare/raw-files/fileserver/shares/lab-data /data nfs defaults 0 0"
|
||||||
|
|
||||||
- name: Mount USB lab data directory
|
- name: Mount USB lab data directory
|
||||||
|
when: not data_mounted.stat.exists
|
||||||
mount:
|
mount:
|
||||||
path: /data
|
path: /data
|
||||||
src: 10.0.0.150:/volumeUSB1/usbshare/raw-files/fileserver/shares/lab-data
|
src: 10.0.0.150:/volumeUSB1/usbshare/raw-files/fileserver/shares/lab-data
|
||||||
@@ -112,7 +118,7 @@
|
|||||||
|
|
||||||
- name: create swapfile
|
- name: create swapfile
|
||||||
when: swapfile|failed
|
when: swapfile|failed
|
||||||
shell: fallocate -l 4G /swapfile
|
shell: fallocate -l 4G /swapfile
|
||||||
|
|
||||||
- name: set swapfile permissions
|
- name: set swapfile permissions
|
||||||
when: swapfile|failed
|
when: swapfile|failed
|
||||||
|
|||||||
@@ -70,12 +70,12 @@
|
|||||||
- name: Install pathogen
|
- name: Install pathogen
|
||||||
become: yes
|
become: yes
|
||||||
become_user: "{{ standard_user }}"
|
become_user: "{{ standard_user }}"
|
||||||
git:
|
git:
|
||||||
repo: https://github.com/tpope/vim-pathogen.git
|
repo: https://github.com/tpope/vim-pathogen.git
|
||||||
dest: /home/{{ standard_user }}/.vim/autoload/pathogen.vim
|
dest: /home/{{ standard_user }}/.vim/autoload/pathogen.vim
|
||||||
|
|
||||||
- name: Install nerdtree
|
- name: Install nerdtree
|
||||||
git:
|
git:
|
||||||
repo: https://github.com/scrooloose/nerdtree.git
|
repo: https://github.com/scrooloose/nerdtree.git
|
||||||
dest: /home/{{ standard_user }}/.vim/bundle/nerdtree
|
dest: /home/{{ standard_user }}/.vim/bundle/nerdtree
|
||||||
become: yes
|
become: yes
|
||||||
@@ -87,25 +87,30 @@
|
|||||||
become_user: "{{ standard_user }}"
|
become_user: "{{ standard_user }}"
|
||||||
|
|
||||||
- name: Creates directory
|
- name: Creates directory
|
||||||
file: path=/data state=directory
|
file: path=/raw-files state=directory
|
||||||
|
|
||||||
|
- name: Raw files is mounted
|
||||||
|
stat: path=/raw-files/backups
|
||||||
|
register: raw_mounted
|
||||||
|
|
||||||
- name: USB raw files in fstab
|
- name: USB raw files in fstab
|
||||||
|
when: not raw_mounted.stat.exists
|
||||||
lineinfile: dest=/etc/fstab
|
lineinfile: dest=/etc/fstab
|
||||||
regexp="^{{ nfs_location }}:/volumeUSB1"
|
regexp=\/raw-files
|
||||||
state=present
|
state=present
|
||||||
line="{{ nfs_location }}:/volumeUSB1/usbshare/raw-files /data nfs defaults 0 0"
|
line="{{ nfs_location }}:/volumeUSB1/usbshare/raw-files /raw-files nfs defaults 0 0"
|
||||||
|
|
||||||
- name: Mount USB raw files to data directory
|
- name: Mount USB raw files to data directory
|
||||||
|
when: not raw_mounted.stat.exists
|
||||||
mount:
|
mount:
|
||||||
path: /data
|
path: /raw-files
|
||||||
src: 10.0.0.150:/volumeUSB1/usbshare/raw-files
|
src: 10.0.0.150:/volumeUSB1/usbshare/raw-files
|
||||||
state: present
|
state: present
|
||||||
fstype: nfs
|
fstype: nfs
|
||||||
|
|
||||||
- name: Install localtunnel
|
- name: Install ngrok
|
||||||
npm:
|
npm:
|
||||||
name: localtunnel
|
name: ngrok
|
||||||
global: yes
|
global: true
|
||||||
executable: /home/{{ standard_user }}/.nvm/versions/node/v{{ node_version }}/bin/npm
|
environment:
|
||||||
|
PATH: "/home/{{ standard_user }}/.nvm/versions/node/v{{ node_version }}/bin:{{ ansible_env.PATH }}"
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i hosts playbooks/site.yml --check --diff
|
#keep adding dirname's to go up more directories.
|
||||||
|
project_dir="$(dirname $( dirname $(readlink -f ${BASH_SOURCE[0]})))"
|
||||||
|
ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i ${project_dir}/hosts ${project_dir}/playbooks/site.yml --check --diff
|
||||||
|
|||||||
Reference in New Issue
Block a user