If you see the error below: 1ERROR! The field 'loop' is supposed to be a string type, however the incoming data structure is a <class 'ansible.parsing.yaml.objects.AnsibleSequence'> Upgrade your ansible to at least version 2.5. The 'loop' keyword is defined starting that version. See …
Read MoreEncountered this issue: 1The full traceback is: 2File "/tmp/ansible_f1UXSi/ansible_module_unarchive.py", line 151, in <module> 3from shlex import quote 45fatal: [206.81.5.18]: FAILED! => { 6"changed": false, 7"invocation": { 8"module_args": { 9"attributes": null, …
Read MoreManual 1sudo rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm In Ansible: 1- name: Add Web Static Repo 2yum: 3name: https://mirror.webtatic.com/yum/el7/webtatic-release.rpm 4state: present
Read MoreManual 1sudo yum install -y mod_php71w php71w-cli php71w-common php71w-gd php71w-mbstring php71w-mcrypt php71w-mysqlnd php71w-xml In Ansible: 1- name: Install needed php7 packages 2yum: 3name={{ item }} 4state=present 5with_items: 6- mod_php71w 7- php71w-cli 8- php71w-common 9- php71w-gd 10- php71w-mbstring 11- …
Read MoreTo be able to change versions, it's best to use pip 1pip install -I ansible==2.0.2 More details in https://askubuntu.com/questions/820892/how-to-downgrade-ansible-2-1-1-0-to-2-0-2
Read Morehttps://www.jeffgeerling.com/blog/2018/reboot-and-wait-reboot-complete-ansible-playbook and https://stackoverflow.com/questions/29955605/how-to-reboot-centos-7-with-ansible
Read MoreWhen an issue such as "Timeout, waiting for priviledged escalation" happens Run the playbook as follows: 1ansible-playbook -c paramiko ansible/ansible-usermgr.yml -i "cool.example.com, " -vvv suggested in https://github.com/ansible/ansible/issues/14426
Read More1ansible-playbook ansible/web-apache-ubuntu.yml -u root --private-key ~/.ssh/ansible-only.ppk -i "67.217.89.118, " -vvv
Read MoreTest playbook: 1[root@lampp lampp]# cat test.yml 2--- 3- name: LAMPP Dev (MySQL/CentOS7) 4hosts: 127.0.0.1 5connection: local 6become: true 78tasks: 9- name: Get the mysql root default password 10command: awk '/temporary password/ {print $NF}' /var/log/mysqld.log 11register: command_output 1213- set_fact: …
Read More1- name: Display Result In Loop 2debug: msg="Version is {{ result.stdout[:5] }}" See https://stackoverflow.com/questions/32091667/ansible-fetch-first-few-character-of-a-register-value
Read More