Slide 34
Slide 34 text
ڞ௨Խ (Template / Variable)
‣ Variable:
‣ ݅ذTemplateͰར༻͢ΔมΛఆٛ͠ݺग़Մೳ
‣ ॻࣜYAML
‣ playbook, inventry host, varsͳͲ༷ʑͳՕॴͰࢦఆՄೳ
‣ OSͷԼճΓͷใansible͕ࣗಈͰऔಘ͠ݺग़Մೳ (Gathering Facts)
‣ ར༻Մೳͳม `ansible hostname -m setup` Ͱ֬ೝՄೳ
‣ ChefͰݴ͏ ohai
# Variables
innodb_buffer_pool_size: 6144M
innodb_log_file_size: 2048M
max_connections: 1000
…
$ ansible ansible-test02 -m 'setup'
ansible-test02 | success >> {
"ansible_facts": {
"ansible_all_ipv4_addresses": [
"172.31.xx.xx"
],
"ansible_all_ipv6_addresses": [],
"ansible_architecture": "x86_64",
"ansible_bios_date": "NA",
"ansible_bios_version": "NA",
"ansible_cmdline": {
"KEYTABLE": "us",
"LANG": "ja-JP.UTF-8",