mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-21 23:20:23 +00:00
Update README.md
This commit is contained in:
parent
815be856ac
commit
e58b3907a0
1 changed files with 26 additions and 0 deletions
|
@ -70,4 +70,30 @@ docker run -d --name art -v /root/role_mysql:/ansible/role_mysql art:2.0
|
|||
[root@VM-74-236-centos ~]# docker ps
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
f8ec36905530 art:2.0 "/usr/sbin/init" 9 minutes ago Up 9 minutes art
|
||||
|
||||
[root@f8ec36905530 ansible]# vim role_template/tasks/main.yml
|
||||
- name: Install this role on {{ansible_os_family}}
|
||||
include: "{{ansible_os_family}}.yml"
|
||||
|
||||
- name: Test you add task
|
||||
shell: echo "Your ansible runtime is OK"
|
||||
|
||||
[root@f8ec36905530 ansible]# ansible-playbook role_template/tests/test.yml
|
||||
|
||||
PLAY [localhost] *************************************************************************************************************************************************************************************************************************************************************
|
||||
|
||||
TASK [Gathering Facts] *******************************************************************************************************************************************************************************************************************************************************
|
||||
ok: [localhost]
|
||||
|
||||
TASK [role_template : Install this role on RedHat] ***************************************************************************************************************************************************************************************************************************
|
||||
|
||||
TASK [role_template : Test you add task] *************************************************************************************************************************************************************************************************************************************
|
||||
changed: [localhost]
|
||||
|
||||
PLAY RECAP *******************************************************************************************************************************************************************************************************************************************************************
|
||||
localhost : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
|
||||
|
||||
[root@f8ec36905530 ansible]#
|
||||
|
||||
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue