This is a draft cheat sheet. It is a work in progress and is not finished yet.
FAQ
Show only the serverplaybook content configure-cm $servername
|
How do I add a role? configure-cm --role $role $servername
|
Remove a role? configure-cm --delete --role $role $server --message "$reason"
|
Add a Blueprint? configure-cm -b $blueprint $servername
|
Remove a Blueprint? configure-cm --delete --blueprint $blueprint $server
|
Show the documentation of an Ansible module ansible-doc $modulename
|
Add playbook variables? key-value configure-cm --var timezone=UTC degtlun7904
|
Add playbook variables? JSON configure-cm --var '[{ntp_servers: [145.228.39.44,145.228.145.3]}]' degtlun7904
|
Add playbook variables? YAML-FILE configure-cm --var @/tmp/yaml_file degtlun7904
|
How do I fix non-commited playbook changes? configure-cm --commit-only $servername
|
Add a variable with role configure-cm --role postfix --var relayhost=cmail.transnetbw.net $srvname
|
|
|
Add sudoers
configure-cm $servername --sudoers TOMCAT_sudoers |
Add Task from YAML file - User limits
$ cat /tmp/ansible_task.yml
---
- name: degtlun7904.yml | /etc/security/limits.conf | Set user limits nofile
pam_limits:
domain: '*'
limit_type: "-"
limit_item: "nofile"
value: 8192
tags: limits
$ configure-cm degtlun7904 --task /tmp/ansible_task.yml
$ run-cm degtlun7904 -t limits
|
Add a package
# Tabcompletion for packages from csrepo
$ configure-cm $servername --pkg dba-tomcat-7047-core
$ run-cm $servername -t pkgs
|
Add a netgroup
# Tabcompletion
$ configure-cm $srvname --netgroup ng_dba_ext
$ run-cm $srvname -t netgroups
|
|
|
Tools on degtlun1235
run-cm |
Run the Ansible playbook |
configure-cm |
Configure the server playbook |
distribute_jumpserver.sh |
Update jumpserver role on all jumpservers |
Roles
asmlib |
apache |
clamav |
CORE |
corosync |
csrepo |
cups |
docker |
extras_repo |
nfs_mount |
nfs_server |
postfix |
sdk_repo |
symantec |
symantec_hids |
Blueprints
apache |
check_mk |
chef |
cs_nrpe_client |
ggaddm |
hana |
mysql |
ORA |
postgres |
SAP |
SYB |
WEB |
CORE - Important variables tags
dns_search |
dns_search: as.lekkerland.com otg.corp.int server.arvato-systems.de bertelsmann.de |
dns |
dns_servers |
dns_servers: - 172.25.192.31 - 172.25.192.20 - 172.25.168.12 |
dns |
dns_no_shuffle |
dns_no_shuffle: True |
dns |
kernel_ip_forwarding |
kernel_ip_forwarding: 1 |
ipforwarding |
pe_numbers |
pe_numbers: - number: PE00001111 reason: FTP enddate: 20170616 |
motd |
sshd_only_dialogip |
sshd_only_dialogip: True |
sshd |
timezone |
timezone: UTC |
timezone |
|