diff options
author | Yuya Kusakabe <yuya.kusakabe@gmail.com> | 2018-06-28 01:23:02 +0900 |
---|---|---|
committer | Yuya Kusakabe <yuya.kusakabe@gmail.com> | 2018-06-28 01:23:02 +0900 |
commit | 86f71d4334f2269ff8f0268d200f03b73e1c26b7 (patch) | |
tree | 1fe8415733cdf993549ae6bcf067f4ea6c272e03 /roles/install-config | |
parent | ebf269e8926d3dbd2a543aabe598ef4cfa68a5ff (diff) | |
download | vyos-vm-images-86f71d4334f2269ff8f0268d200f03b73e1c26b7.tar.gz vyos-vm-images-86f71d4334f2269ff8f0268d200f03b73e1c26b7.zip |
Cleanup playbook
Diffstat (limited to 'roles/install-config')
-rw-r--r-- | roles/install-config/files/config.boot | 41 | ||||
-rw-r--r-- | roles/install-config/tasks/main.yml | 12 | ||||
-rw-r--r-- | roles/install-config/tests/inventory | 2 | ||||
-rw-r--r-- | roles/install-config/tests/test.yml | 4 |
4 files changed, 59 insertions, 0 deletions
diff --git a/roles/install-config/files/config.boot b/roles/install-config/files/config.boot new file mode 100644 index 0000000..f1ec4f5 --- /dev/null +++ b/roles/install-config/files/config.boot @@ -0,0 +1,41 @@ +service { + ssh { + port 22 + } +} +system { + host-name vyos + login { + user vyos { + authentication { + encrypted-password "$6$MjV2YvKQ56q$QbL562qhRoyUu8OaqrXagicvcsNpF1HssCY06ZxxghDJkBCfSfTE/4FlFB41xZcd/HqYyVBuRt8Zyq3ozJ0dc." + plaintext-password "" + } + level admin + } + } + syslog { + global { + facility all { + level notice + } + facility protocols { + level debug + } + } + } + ntp { + server "0.pool.ntp.org" + server "1.pool.ntp.org" + server "2.pool.ntp.org" + } + config-management { + commit-revisions 100 + } +} +interfaces { + ethernet eth0 { + address dhcp + } + loopback lo +} diff --git a/roles/install-config/tasks/main.yml b/roles/install-config/tasks/main.yml new file mode 100644 index 0000000..4447f87 --- /dev/null +++ b/roles/install-config/tasks/main.yml @@ -0,0 +1,12 @@ +- name: Make sure that config partition marker exists + become: true + file: + path: "{{ vyos_install_root }}/opt/vyatta/etc/config/.vyatta_config" + state: touch + +- name: Copy the default config for QEMU to the installed image + become: true + copy: + src: files/config.boot + dest: "{{ vyos_install_root }}/opt/vyatta/etc/config/config.boot" + mode: 0755 diff --git a/roles/install-config/tests/inventory b/roles/install-config/tests/inventory new file mode 100644 index 0000000..878877b --- /dev/null +++ b/roles/install-config/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/install-config/tests/test.yml b/roles/install-config/tests/test.yml new file mode 100644 index 0000000..c0b6814 --- /dev/null +++ b/roles/install-config/tests/test.yml @@ -0,0 +1,4 @@ +--- +- hosts: localhost + roles: + - install-config |