diff --git a/group_vars/all b/group_vars/all index f685ab7..d0e664f 100644 --- a/group_vars/all +++ b/group_vars/all @@ -6,7 +6,8 @@ docker_ce_version_to_install: 17.09.1~ce-0~ubuntu nvm_version: v0.33.5 node_version: 8.4.0 registry_location: "registry.wimer.home:5000" -nfs_location: 10.0.0.150 +nfs_location: 10.0.0.150i +nfs_share: /volumeUSB5/usbshare home_pub_key: https://raw.githubusercontent.com/jcwimer/ubuntu-template/master/post/id_rsa.pub standard_user: cody git_user: "Jacob Cody Wimer" diff --git a/playbooks/reboot.yml b/playbooks/reboot.yml new file mode 100644 index 0000000..0f5e9fa --- /dev/null +++ b/playbooks/reboot.yml @@ -0,0 +1,10 @@ +--- + +- name: Create machine and set up ip + hosts: all + user: root + gather_facts: no + serial: 100% + tasks: + - name: Reboot + command: reboot diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 2895c62..bc304fd 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -109,12 +109,12 @@ lineinfile: dest=/etc/fstab regexp=\/data state=present - line="{{ nfs_location }}:/volumeUSB1/usbshare/raw-files/fileserver/shares/lab-data /data nfs defaults,nolock 0 0" + line="{{ nfs_location }}:{{ nfs_share }}/raw-files/fileserver/shares/lab-data /data nfs defaults,nolock 0 0" - name: Mount USB lab data directory mount: path: /data - src: 10.0.0.150:/volumeUSB1/usbshare/raw-files/fileserver/shares/lab-data + src: 10.0.0.150:{{ nfs_share }}/raw-files/fileserver/shares/lab-data state: mounted fstype: nfs ignore_errors: true diff --git a/roles/configure-interfaces/tasks/main.yml b/roles/configure-interfaces/tasks/main.yml index 6567da1..c3eb603 100644 --- a/roles/configure-interfaces/tasks/main.yml +++ b/roles/configure-interfaces/tasks/main.yml @@ -10,11 +10,9 @@ template: src=../roles/configure-interfaces/templates/eth.cfg.j2 dest=/etc/network/interfaces.d/{{ interface_name }}.cfg - name: Up down interface - # shell: bash -c "(ifdown {{ interface_name }} && ifup {{ interface_name }}) &" - shell: "(sleep 1; ifdown {{ interface_name }} && ifup {{ interface_name }}) &" - #shell: "ifdown --exclude=lo -a; sleep 1; ifup --exclude=lo -a" - async: 100 - poll: 0 + shell: "(sleep 3s; ifdown {{ interface_name }} && ifup {{ interface_name }};) &" ignore_errors: true vars: interface_name: eth0 + async: 100 + poll: 0 diff --git a/roles/developer-machine/tasks/main.yml b/roles/developer-machine/tasks/main.yml index 4a8410c..3614177 100644 --- a/roles/developer-machine/tasks/main.yml +++ b/roles/developer-machine/tasks/main.yml @@ -101,13 +101,13 @@ lineinfile: dest=/etc/fstab regexp=\/raw-files state=present - line="{{ nfs_location }}:/volumeUSB1/usbshare/raw-files /raw-files nfs defaults 0 0" + line="{{ nfs_location }}:{{ nfs_share }}/raw-files /raw-files nfs defaults 0 0" - name: Mount USB raw files to data directory when: not raw_mounted.stat.exists mount: path: /raw-files - src: 10.0.0.150:/volumeUSB1/usbshare/raw-files + src: 10.0.0.150:{{ nfs_share }}/raw-files state: mounted fstype: nfs ignore_errors: true diff --git a/supporting-scripts/ad-hoc-command.sh b/supporting-scripts/ad-hoc-command.sh new file mode 100644 index 0000000..5f5422e --- /dev/null +++ b/supporting-scripts/ad-hoc-command.sh @@ -0,0 +1 @@ +ANSIBLE_HOST_KEY_CHECKING=False ansible all -i hosts -u root -a "reboot"