Ansible variable register task being skipped -


i trying come playbook determine corresponding ossec release agent package install on remote servers. playbook first runs shell command determine matching release rpm install, variable register task being skipped when run playbook in check mode.

tasks:  - name: determine lateast ossec release rpm centos version   shell: curl -s https://www.atomicorp.com/channels/ossec/centos/$(cat /etc/redhat-release | awk '{print $3}' | cut -c1)/x86_64/rpms/ | grep ossec-release | sed "s/'/ /g" | awk '{print $6}' | tail -1   ignore_errors: yes   register: ossec_release_rpm  - name: install latest centos 6 ossec release rpm   yum: name=https://www.atomicorp.com/channels/ossec/centos/6/x86_64/rpms/{{ item }}     state=present   with_items: ossec_release_rpm.stdout  - name: install ossec-hids-client   yum: pkg=ossec-hids-client     state=present 

the output getting following. specifically, register task being skipped , can't seem figure out why. check completed i'm not work is.

play [install ossec client/server on linux servers] ***************************   gathering facts ***************************************************************  ok: [dev-php1]  task: [determine lateast ossec release rpm centos version] ****************  skipping: [dev-php1]  task: [install latest centos 6 ossec release rpm] *****************************  changed: [dev-php1] => (item=ossec_release_rpm.stdout)  task: [install ossec-hids-client] *********************************************  ok: [dev-php1]  task: [check if client.keys exists] *******************************************  ok: [dev-php1]  task: [register client] *******************************************************  skipping: [dev-php1]  task: [installing ossec-agent.conf] ***************************************  changed: [dev-php1]  notified: [restart ossec-agent] ***********************************************  changed: [dev-php1]  play recap ********************************************************************  dev-php1                   : ok=6    changed=3    unreachable=0    failed=0    

problem solved. running check , expecting shell command execute, skip default.


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -