test
This commit is contained in:
@@ -16,4 +16,12 @@
|
||||
src: README.md.j2
|
||||
dest: "{{ playbook_dir }}/README.md"
|
||||
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:
|
||||
path: ~/checklist/
|
||||
state: directory
|
||||
become: false
|
||||
delegate_to: 127.0.0.1
|
||||
when: "'nas' in group_names"
|
||||
|
||||
@@ -18,11 +17,12 @@
|
||||
dest: /tmp/ubuntu.sh
|
||||
when: ansible_distribution == 'Ubuntu'
|
||||
|
||||
- name: Start Security Check Script
|
||||
- name: Start Security Check Script (become -> true)
|
||||
shell: |
|
||||
chdir
|
||||
bash /tmp/ubuntu.sh
|
||||
rm -rf /tmp/ubuntu.sh
|
||||
become: true
|
||||
when: ansible_distribution == 'Ubuntu'
|
||||
|
||||
- name: Copy Result File to Local
|
||||
@@ -32,16 +32,16 @@
|
||||
flat: yes
|
||||
when: ansible_distribution == 'Ubuntu'
|
||||
|
||||
- name: Delete Result File
|
||||
- name: Delete Result File (become -> true)
|
||||
file:
|
||||
path: "/tmp/{{ ansible_hostname }}.txt"
|
||||
state: absent
|
||||
become: true
|
||||
when: ansible_distribution == 'Ubuntu'
|
||||
|
||||
- name: Find Copy File Name
|
||||
shell: ls -l ~/checklist/ | awk 'NR>1 {print $9}'
|
||||
register: copy_file
|
||||
become: false
|
||||
delegate_to: 127.0.0.1
|
||||
when: "'nas' in group_names"
|
||||
|
||||
@@ -56,10 +56,9 @@
|
||||
with_items: "{{ copy_file.stdout_lines }}"
|
||||
when: "'nas' in group_names"
|
||||
|
||||
- name: Delete Result File
|
||||
- name: Delete Result File (become -> true)
|
||||
file:
|
||||
path: "~/checklist/"
|
||||
state: absent
|
||||
become: false
|
||||
delegate_to: 127.0.0.1
|
||||
when: ansible_distribution == 'Ubuntu'
|
||||
when: "'nas' in group_names"
|
||||
Reference in New Issue
Block a user