From e58b3907a05be9a459531b60bc6d686e4b132861 Mon Sep 17 00:00:00 2001 From: qiaofeng1227 <76487013@qq.com> Date: Mon, 20 Dec 2021 12:07:14 +0800 Subject: [PATCH] Update README.md --- scripts/README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/scripts/README.md b/scripts/README.md index 1e3a3a02..75140861 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -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]# + + ```