test
This commit is contained in:
@@ -1,2 +1,3 @@
|
|||||||
|이름|상태 요약|상세 보기|
|
|이름|상태 요약|상세 보기|
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
|
|cmoa-master-1|취약|http://10.10.43.42:8080/cmoa-master-1.txt|
|
||||||
|
|||||||
@@ -16,4 +16,12 @@
|
|||||||
src: README.md.j2
|
src: README.md.j2
|
||||||
dest: "{{ playbook_dir }}/README.md"
|
dest: "{{ playbook_dir }}/README.md"
|
||||||
delegate_to: 127.0.0.1
|
delegate_to: 127.0.0.1
|
||||||
when: "'nas' in group_names"
|
when: "'nas' in group_names"
|
||||||
|
|
||||||
|
- name: git push
|
||||||
|
shell: |
|
||||||
|
git add .
|
||||||
|
git commit -m "test"
|
||||||
|
git push
|
||||||
|
delegate_to: 127.0.0.1
|
||||||
|
when: "'nas' in group_names"
|
||||||
@@ -3,7 +3,6 @@
|
|||||||
file:
|
file:
|
||||||
path: ~/checklist/
|
path: ~/checklist/
|
||||||
state: directory
|
state: directory
|
||||||
become: false
|
|
||||||
delegate_to: 127.0.0.1
|
delegate_to: 127.0.0.1
|
||||||
when: "'nas' in group_names"
|
when: "'nas' in group_names"
|
||||||
|
|
||||||
@@ -18,11 +17,12 @@
|
|||||||
dest: /tmp/ubuntu.sh
|
dest: /tmp/ubuntu.sh
|
||||||
when: ansible_distribution == 'Ubuntu'
|
when: ansible_distribution == 'Ubuntu'
|
||||||
|
|
||||||
- name: Start Security Check Script
|
- name: Start Security Check Script (become -> true)
|
||||||
shell: |
|
shell: |
|
||||||
chdir
|
chdir
|
||||||
bash /tmp/ubuntu.sh
|
bash /tmp/ubuntu.sh
|
||||||
rm -rf /tmp/ubuntu.sh
|
rm -rf /tmp/ubuntu.sh
|
||||||
|
become: true
|
||||||
when: ansible_distribution == 'Ubuntu'
|
when: ansible_distribution == 'Ubuntu'
|
||||||
|
|
||||||
- name: Copy Result File to Local
|
- name: Copy Result File to Local
|
||||||
@@ -32,16 +32,16 @@
|
|||||||
flat: yes
|
flat: yes
|
||||||
when: ansible_distribution == 'Ubuntu'
|
when: ansible_distribution == 'Ubuntu'
|
||||||
|
|
||||||
- name: Delete Result File
|
- name: Delete Result File (become -> true)
|
||||||
file:
|
file:
|
||||||
path: "/tmp/{{ ansible_hostname }}.txt"
|
path: "/tmp/{{ ansible_hostname }}.txt"
|
||||||
state: absent
|
state: absent
|
||||||
|
become: true
|
||||||
when: ansible_distribution == 'Ubuntu'
|
when: ansible_distribution == 'Ubuntu'
|
||||||
|
|
||||||
- name: Find Copy File Name
|
- name: Find Copy File Name
|
||||||
shell: ls -l ~/checklist/ | awk 'NR>1 {print $9}'
|
shell: ls -l ~/checklist/ | awk 'NR>1 {print $9}'
|
||||||
register: copy_file
|
register: copy_file
|
||||||
become: false
|
|
||||||
delegate_to: 127.0.0.1
|
delegate_to: 127.0.0.1
|
||||||
when: "'nas' in group_names"
|
when: "'nas' in group_names"
|
||||||
|
|
||||||
@@ -56,10 +56,9 @@
|
|||||||
with_items: "{{ copy_file.stdout_lines }}"
|
with_items: "{{ copy_file.stdout_lines }}"
|
||||||
when: "'nas' in group_names"
|
when: "'nas' in group_names"
|
||||||
|
|
||||||
- name: Delete Result File
|
- name: Delete Result File (become -> true)
|
||||||
file:
|
file:
|
||||||
path: "~/checklist/"
|
path: "~/checklist/"
|
||||||
state: absent
|
state: absent
|
||||||
become: false
|
|
||||||
delegate_to: 127.0.0.1
|
delegate_to: 127.0.0.1
|
||||||
when: ansible_distribution == 'Ubuntu'
|
when: "'nas' in group_names"
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- hosts: all
|
- hosts: all
|
||||||
become: true
|
become: false
|
||||||
gather_facts: true
|
gather_facts: true
|
||||||
vars:
|
vars:
|
||||||
user: byeonjeonghun
|
user: byeonjeonghun
|
||||||
|
|||||||
Reference in New Issue
Block a user