今川館

都内勤務の地味OLです

Ansible

AnsibleのHost Variablesの使いどころ

Host Variables とは? Inventory — Ansible Documentation [atlanta] host1 http_port=80 maxRequestsPerChild=808 host2 http_port=303 maxRequestsPerChild=909Host Variablesは上記引用の通り、インベントリのホストのセクションに併記する値なのだが、…

Ansibleのハンドラが起動するのはタスクがchangedを返したときだけ

Ansibleのハンドラとは Ansibleのタスクには `notify` という属性を追加してコールバック処理を呼ぶよう設定できる。[roles/nginx/tasks/main.yml] - name: nginx config ensure template: src=my.nginx.conf.j2 dest=/etc/nginx/conf.d/your.conf sudo: yes…