summaryrefslogtreecommitdiffstats
path: root/tools/md-testvnf/playbook.yml
diff options
context:
space:
mode:
authorShubham Mishra <shivam828787@gmail.com>2020-11-03 14:43:08 +0530
committerShubham Mishra <shivam828787@gmail.com>2020-11-03 14:58:07 +0530
commit656acff48dfba2f2945a3baf8d696007b8229200 (patch)
treebacd96e80c7811ad008b36ae8c287c4e7a3450ed /tools/md-testvnf/playbook.yml
parent605102bb6a8a3b48f0c66d817614eec0ef42e017 (diff)
Add image builder for testvnf using packer tool
Signed-off-by: Shubham Mishra <shivam828787@gmail.com> Change-Id: I76b25903bdd328c9dbaeaa6041f114f8e2b8dccf
Diffstat (limited to 'tools/md-testvnf/playbook.yml')
-rw-r--r--tools/md-testvnf/playbook.yml36
1 files changed, 36 insertions, 0 deletions
diff --git a/tools/md-testvnf/playbook.yml b/tools/md-testvnf/playbook.yml
new file mode 100644
index 00000000..81a51f5e
--- /dev/null
+++ b/tools/md-testvnf/playbook.yml
@@ -0,0 +1,36 @@
+---
+- hosts: all
+ vars:
+ username: "testvnf"
+ password: "testvnf"
+ become: true
+ tasks:
+
+ - name: create a new user
+ user:
+ name: "{{ username }}"
+ state: present
+ groups: "wheel"
+ password: "{{ password | password_hash('sha512') }}"
+ comment: "user for ansible connection"
+
+ - lineinfile:
+ path: /etc/sudoers
+ state: present
+ regexp: '^%wheel'
+ line: '%wheel ALL=(ALL) NOPASSWD: ALL'
+ validate: 'visudo -cf %s'
+
+ - name: Ansible create file if it doesn't exist example
+ file:
+ path: "temp"
+ state: touch
+
+
+ - name: install epel-release
+ package:
+ name: epel-release
+ state: present
+
+ - name: Execute the deployment script
+ command: /home/centos/deploycentostools.sh deploy \ No newline at end of file