- name: Insert audit rules
lineinfile:
path: "/etc/audit/audit.rules"
line: "{{ item.line }}"
regexp: "{{ item.regexp }}"
state: present
insertafter: EOF
notify: Restart auditd
with_items:
- { line: '-w /home/GOMER/Scripts -p w -k copperfield', regexp: '.*GOMER.*Scripts.*' }
when: directories.results.0.stat.exists
- { line: '-w /home/PYLE/Scripts -p w -k copperfield', regexp: '.*PYLE*Scripts.*' }
when: directories.results.1.stat.exists
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/d5c1708b-13f8-4dd0-858c-dfacd40cdc2a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/d5c1708b-13f8-4dd0-858c-dfacd40cdc2a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
---
- hosts: localhost
vars:
x: ['a','b','c']
y: ['1','2','3']
z: ['first','second','third']
tasks:
- name: Testing
debug: msg="x is {{ item.0 }}, y is {{ item.1 }} and z is {{ item.2 }}"
with_together:
- "{{ x }}"
- "{{ y }}"
- "{{ z }}"
PLAY [localhost] *************************************************************************************************************************************************************************************************************************
TASK [Gathering Facts] *******************************************************************************************************************************************************************************************************************
ok: [localhost]
TASK [Testing] ***************************************************************************************************************************************************************************************************************************
ok: [localhost] => (item=[u'a', u'1', u'first']) => {
"changed": false,
"item": [
"a",
"1",
"first"
],
"msg": "x is a, y is 1 and z is first"
}
ok: [localhost] => (item=[u'b', u'2', u'second']) => {
"changed": false,
"item": [
"b",
"2",
"second"
],
"msg": "x is b, y is 2 and z is second"
}
ok: [localhost] => (item=[u'c', u'3', u'third']) => {
"changed": false,
"item": [
"c",
"3",
"third"
],
"msg": "x is c, y is 3 and z is third"
}
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c0d13b53-c95d-4a73-84c1-8f2777067766%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c0d13b53-c95d-4a73-84c1-8f2777067766%40googlegroups.com.