Questions tagged [ansible]

51 questions
7
votes
1 answer

ansible: How to avoid warnings

I am using ansible for monitoring my home computing net, which consists several Linux machines (x64 and Raspberries). How can I avoid warnings from every Raspberry client? [WARNING]: Platform linux on host raspi6.local is using the…
Pascal Klein
  • 116
  • 1
  • 1
  • 6
6
votes
1 answer

Ansible: dpkg-reconfigure -plow unattended-upgrades stopped while running

Here we are trying to start auto updating packages in Ubuntu through Ansible playbook. dpkg-reconfigure -plow unattended-upgrades When we run this command manually, it shows the following prompt, and it starts updating packages :- Configuring…
karan
  • 61
5
votes
2 answers

git@git:~$ ansible --version ERROR: Ansible requires the locale encoding to be UTF-8; Detected ISO8859-1

Installing Ansible on Ubuntu Ubuntu builds are available in a PPA here. To configure the PPA on your system and install Ansible run these commands: $ sudo apt update $ sudo apt install software-properties-common $ sudo add-apt-repository --yes…
4
votes
1 answer

"[Errno 2]. No such file or directory: b'apt-get'", "rc": 2

I don't know why when I run my ansible-playbook to install packages on ec2-instances using apt-get this appears.[WARNING]: Updating cache and auto-installing missing dependency: python3-apt fatal: [localhost]: FAILED! => {"changed": false, "cmd":…
demetri
  • 41
3
votes
1 answer

Permission denied (publickey). while using SCP command

I have tried to copy some file in tomcat using SCP command scp ubuntu@xxxxxxx:/opt/apache-tomcat-9.0.48/conf/server.xml . ubuntu@xxxxxxx: Permission denied (publickey). help me to get out this Thank in advance :)
3
votes
1 answer

Reinstall GRUB on second disk's EFI partition from running system

I am trying to do something like this: How can I reinstall GRUB to the EFI partition? However, I don't see how I can run chroot because it's an automated process (with Ansible, but that shouldn't matter; if this can be scripted in Bash, that'd work…
godfool
  • 51
2
votes
2 answers

How to redirect output to a text file in bash and have it show in the terminal at the same time?

If I use the text re-directors > and >> they output to a text file which is fine for long term logging but, I also need them to be present on screen in the traditional Standard Input, Standard Output format as I'm running code through the shell…
Michael
  • 51
2
votes
0 answers

What's the difference between dist-upgrade and upgrading /usr/lib/update-notifier/apt-check --package-names?

What is the difference between upgrading packages using the dist-upgrade and upgrading the packages from /usr/lib/update-notifier/apt-check --package-names ? The reason I'm asking is, the machine I'm upgrading is running the service…
N. J
  • 171
2
votes
2 answers

Nested Command in sed substitution

I'm trying to used sed to find and encrypt ansible_password field in an inventory file and encrypt it with ansible-vault command. But ansible-command is failing throwing an sed error, where as a simple echo is working fine. sed -n "s/\(…
2
votes
1 answer

Ansible to reconnect after reboot

I have a task that needs to run after a reboot. I know that checking connection can be done with wait_for_connection. I have the following draft: - name: Reboot host reboot: - name: Wait 300 seconds, but only start checking after 60 seconds …
2
votes
3 answers

How to noninteractively add Certificate Authority (CA) ssl certificates from script

I have an ansible play that calls a script. The script copies .crt files for my private key infrastructure in to /usr/share/ca-certificates/my.domain.tld Then the script calls: sudo update-ca-certificates sudo dpkg-reconfigure ca-certificates The…
2
votes
2 answers

How can I use Ansible to claim that I accept the Microsoft EULA agreement for ttf-mscorefonts-installer?

How can I accept the Microsoft EULA agreement for ttf-mscorefonts-installer? lists some ways to achieve this (GUI, script, puppet config). But I am at loss how to handle echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select…
2
votes
0 answers

Dependencies problem when installing ansible in ubuntu 18.04

I try to reinstall ansible in my ubuntu18.04 laptop. I've got this dependencies problem : $ LANG=C sudo apt-get install ansible Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not…
2
votes
2 answers

How to connect Ansible to AWS-EC2 via ssh

I want to connect ansible to EC2 via ssh. I created a key pair on my local machine(ubuntu) and copied it to my EC2 instances using ssh-copy-id. The copy was successful, but I get the error below when I want to connect to my instance: Failed to…
1
vote
0 answers

Ansible playbook and docker_compose task failing after updates

Would anyone be kind enough to help me? I'm continuing to have issues with this after an update. I'm running an ansible playbook with each service defined as a role and individual tasks bringing up the containers. Experiencing error this error:…
Dozzly
  • 11
1
2 3 4