If you see an error such as this: 1ERROR! 'sudo' is not a valid attribute for a Play You need to replace: 1sudo: yes with 1become:true See https://stackoverflow.com/questions/60162859/error-sudo-is-not-a-valid-attribute-for-a-play
Read MorePersonally, I'd like to use other's work as much as possible in its original state. With ansible roles, authors usually name their repos as 'ansible-role-java' but internally, it's something like 'geerlingguy.java' which is what they put in dependencies. Now, if you simply clone as is, you will need to change the …
Read More1example@user:/opt/ansible-playbooks$ cat vars/jenkins.yml 2## Search names from https://plugins.jenkins.io/ 3jenkins_plugins: 4- git 5- hipchat 6- log-parser 7- mask-passwords 8- ssh-agent 9- ssh
Read MoreThere are a lot of ways on doing it. One of it is as follows: 1tasks: 2- name: "shut down CentOS 6 and Debian 7 systems" 3command: /sbin/shutdown -t now 4when: (ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "6") or …
Read More1- name: Download drush phar file (8.3.0) 2become: yes 3get_url: 4url: https://github.com/drush-ops/drush/releases/download/8.3.0/drush.phar 5dest: /usr/local/bin 6mode: +x 7checksum: sha256:ddfe6d529e44e98c2cf74c143c1fcdf67c927d6f9a5eb2ae10fbe47ef9b8eaf0 8group: root 9owner: root See get_url module in …
Read MoreRemi modules are installed in non-standard location. Geerlingguy's ansible role harmonizes it and install it in standard locations. So, if you're not familiar with standard locations, just do the following trick NOTE: In this case, I installed the memcache module for php7.1 from Remi's repo. 1yum install -y …
Read More1sudo apt-get remove python-openssl 2curl -o ./get-pip.py https://bootstrap.pypa.io/get-pip.py 3sudo python2 ./get-pip.py Replace with yum if in RH-based OS. See https://stackoverflow.com/questions/43267157/python-attributeerror-module-object-has-no-attribute-ssl-st-init for details.
Read MoreIt's in syslog. In ubuntu, do the following: 1grep -i ansible /var/log/syslog See details in https://serverfault.com/questions/531004/where-do-i-find-the-latest-ansible-error-log
Read Morehttps://serversforhackers.com/c/how-ansible-vault-works https://gist.github.com/tristanfisher/e5a306144a637dc739e7
Read More