geerlingguy / ansible-role-ansible Goto Github PK
View Code? Open in Web Editor NEWAnsible Role - Ansible
Home Page: https://galaxy.ansible.com/geerlingguy/ansible/
License: MIT License
Ansible Role - Ansible
Home Page: https://galaxy.ansible.com/geerlingguy/ansible/
License: MIT License
If installation is done using pip there's no need to mess arround with apt sources.
Thanks!
Due to this bug
"python27-jmespath-0.9.2-1.12.amzn1.noarch conflicts python-jmespath <= 0.5.0-1.1.amzn1".
To be honest, I'm new to Ansible itself.
Does it make sense that installation of Ansible is possible by ansible-playbook ?
As I understand, installation of Ansible is prerequisite for running any playbook.
Please correct me if I have wrong information.
Thanks in advance.
I was updating tests to work with 20.04, but it seems that it's not yet supported by Ansible's official PPA: ansible/ansible#69161
Tracking here; for now, people on Ubuntu 20.04 using this role should just use the pip install method instead of package.
To install ansible via pip on fresh installs, it might needs somes dependancies (ex : gcc, python-devel, openssl-devel on RHEL)
Example in tasks.yml
- name: Install dependancies for pip installation.
package:
name: "{{ ansible_pip_dependancies }}"
state: present
The role is said to support Debian, but it fails to install the ansible repository on Debian systems, like that:
TASK [ansible : Add ansible repository.] ***********************************
fatal: [host.example.com]: FAILED! => {"changed": false, "failed": true, "msg": "Invalid repository string: ppa:ansible/ansible"}
accordingly to the documentation: http://docs.ansible.com/ansible/apt_repository_module.html
# On Ubuntu target: add nginx stable repository from PPA and install its signing key.
# On Debian target: adding PPA is not available, so it will fail immediately.
apt_repository: repo='ppa:nginx/stable'
As the title says.
I'm running Ansible 2.7.0 against a Debian Stretch server.
Ansible:
[user@ansible-host: /etc/ansible]$ ansible --version
ansible 2.7.0
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 3.7.0 (default, Sep 15 2018, 19:13:07) [GCC 8.2.1 20180831]
Playbook:
---
- hosts: "{{ server }}"
become: true
roles:
- role: geerlingguy.ansible
The error I'm receiving:
TASK [geerlingguy.ansible : Set the default_release option for older Debian versions.] ********************************************************************************************************************************************
fatal: [cdc-s-ansibleci01]: FAILED! => {"msg": "The conditional check 'ansible_distribution_version < 9' failed. The error was: Unexpected templating type error occurred on ({% if ansible_distribution_version < 9 %} True {% else %} False {% endif %}): '<' not supported between instances of 'AnsibleUnsafeText' and 'int'[...]"}
I was able to resolve this by adding "| int" to ~/.ansible/roles/geerlingguy.ansible/tasks/setup-Debian.yml
:
-when: ansible_distribution_version < 9
+when: ansible_distribution_version | int < 9
I am still learning, so I do not know what causes this issue, nor if this is the proper way to fix this.
Hi,
Nice script, I would however like to have the possibility to give an extra argument to the pip install command. In my case I would like to be able to pass on "--user".
I have created a PR to enable this that I will commit shortly.
Comments?
If using the example playbook
The Task fails:
TASK [geerlingguy.ansible : Install Ansible via Pip.] **************************************************************************
fatal: [examle_host]: FAILED! => {"changed": false, "msg": "Unable to find any of to use. pip needs to be installed."}
Full run:
TASK [geerlingguy.pip : Ensure Pip is installed.] ******************************************************************************
ok: [examle_host]
TASK [geerlingguy.pip : Ensure pip_install_packages are installed.] ************************************************************
skipping: [examle_host]
TASK [geerlingguy.ansible : Set the package state based on how Ansible is installed.] ******************************************
ok: [examle_host]
TASK [geerlingguy.ansible : Set up Ansible on RedHat.] *************************************************************************
skipping: [examle_host]
TASK [geerlingguy.ansible : Set up Ansible on Fedora.] *************************************************************************
skipping: [examle_host]
TASK [geerlingguy.ansible : Set up Ansible on Ubuntu.] *************************************************************************
skipping: [examle_host]
TASK [geerlingguy.ansible : Set up Ansible on Debian.] *************************************************************************
skipping: [examle_host]
TASK [geerlingguy.ansible : Set up Ansible using Pip.] *************************************************************************
included: /home/[example_user]/.ansible/roles/geerlingguy.ansible/tasks/setup-pip.yml for [example_host]
TASK [geerlingguy.ansible : Install Ansible via Pip.] **************************************************************************
fatal: [examle_host]: FAILED! => {"changed": false, "msg": "Unable to find any of to use. pip needs to be installed."}
The ansible_pip_executable: pip3
needs to be set as in the CI build
Hey,
I'm trying to run this role and I get:
TASK [geerlingguy.ansible : Add ansible repository.] ****************************************************************************
fatal: [192.168.1.14]: FAILED! => {"changed": false, "msg": "apt cache update failed"}
Would it be a good idea to add options for ansible-lint and yamllint, or should those rather be separate roles?
Hi,
unfortunately, this role is not installable via Ansible Galaxy due to strange error: https://galaxy.ansible.com/list#/roles/1007. As you can see there's some weird issue with role name under Installation
section: $ ansible-galaxy install geerlingguy.
.
The output of the installation process via ansible-galaxy
:
andrzej@PC:~/workspace$ ansible-galaxy install -r requirements.yml
- downloading role 'ansible', owned by geerlingguy
- sorry, geerlingguy.ansible was not found on galaxy.ansible.com.
- you can use --ignore-errors to skip failed roles.
It seems like ansible is not available in epel repo in rhel7
https://linuxacademy.com/community/posts/show/topic/21119-ansible-not-available-in-epel-repo-installed-on-rhel-7
To install system wide, if we have defined different default umask, it might be usefull to add umask to the setup-pip.yml
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.