summaryrefslogtreecommitdiffstats
path: root/tools/md-testvnf/playbook.yml
blob: 81a51f5e8d6e8b02614e52e4f96d317f3c000119 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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