解説(33_persistent-profile.yml)
以下のような記述となっています。
—
– name: Create profile_persistence_cookie
f5networks.f5_modules.bigip_profile_persistence_cookie:
name: “{{ cookie.name }}”
state: “{{ cookie.state }}”
parent: “{{ cookie.parent }}”
partition: Common
cookie_method: “{{ cookie.cookie_method }}”
cookie_name: “{{ cookie.cookie_name }}”
cookie_encryption: “{{ cookie.cookie_encryption }}”
encryption_passphrase: “{{ cookie.encryption_passphrase }}”
http_only: “{{ cookie.http_only }}”
secure: “{{ cookie.secure }}”
provider:
server: “{{ ansible_host }}”
user: “{{ ansible_user }}”
password: “{{ ansible_password }}”
validate_certs: no
register: result
– name: display result of profile_persistence_cookie
debug:
var: result
使用しているモジュールについて
f5networks.f5_modules.bigip_profile_persistence_cookieモジュールを使用します。
また、変数ファイルは以下となります。パラメータは適宜変更してください。
※host_vars/virtualserver-1/vars.ymlより引用
##### persistence profile用の変数を定義 ####
cookie:
name: testcookie
state: present
parent: /Common/cookie
cookie_method: insert
cookie_name: testcookie
cookie_encryption: required
encryption_passphrase: test
http_only: true
secure: true
実行結果は次のようになります(設定済みの場合でも必ずChangedとなります)
コメント