Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rb:ansible [11/09/2018 16:12]
andrew [Debug command]
rb:ansible [18/09/2018 16:53] (current)
andrew [Tips]
Line 1: Line 1:
 ====== Ansible ====== ====== Ansible ======
 +
 +Ansible is an ssh based configuration management system. These notes are primarily for my benefit so don't believe anything here!
  
 ===== Running a specific section of a playbook ===== ===== Running a specific section of a playbook =====
Line 130: Line 132:
  
 ===== Tips ===== ===== Tips =====
- 
- 
-Command module:- command: creates="/​path/​to/​file.txt"​ cp xxx yyy etc... ​ Tests specify a filename that is used to control whether or not the command needs to be run. 
- 
  
 Copy file to remote system:- Copy file to remote system:-
  
-<​code>​+<​code ​yaml>
   - name: Copy file to system   - name: Copy file to system
     copy:     copy:
Line 145: Line 143:
       group: root       group: root
       mode: 0700       mode: 0700
 +    tags:
 +      - scored
 +</​code>​
 +
 +
 +
 +Command module:- command: creates="/​path/​to/​file.txt"​ cp xxx yyy etc... ​ Tests specify a filename that is used to control whether or not the command needs to be run.
 +
 +
 +<code yaml>
 +  - name: 4.2.1.4 Create and Set Permissions on rsyslog Log Files (Scored)
 +    shell: touch /var/log/{{ item }} creates=/​var/​log/​{{ item }}
 +    with_items:
 +        - messages
 +        - kern.log
 +        - daemon.log
 +        - unused.log
 +        - syslog
     tags:     tags:
       - scored       - scored

rb/ansible.1536678775.txt.gz ยท Last modified: 11/09/2018 16:12 by andrew